Giter Site home page Giter Site logo

Comments (2)

jimklimov avatar jimklimov commented on August 25, 2024

The decoding should have started earlier, with 34 64 00 00 00 00 00 00 d0 12 2d 0b 1b 5d 00 00 line - and it ends the string with 0x00 after two bytes of data ;)

On one hand, it is indeed odd that it returns 512 bytes, using an uninitialized memory block. By content, it was memory that once belonged to the process and was since freed. So the bytes in it are not too much surprising, the length is. Code comments are about broken device report descriptors, so maybe that's just it - many vendors can't read USB specs well.

from nut.

fenugrec avatar fenugrec commented on August 25, 2024

Just some notes as I look at this superficially ;

HIDGetEvents() has

        r = (interrupt_size > 0 && interrupt_size < sizeof(buf))
                 ? interrupt_size : sizeof(buf);

where sizeof(buf) == SMALLBUF == 512. This would be used if interrupt_size is <=0; this (global !) variable is set in usbhid-ups.c from (I think) a config key "interruptsize". I wonder if it's set to 0 by default ?

from nut.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.