Menu

#3 find_usb_devices - out of bounds access

Unstable_(example)
closed
None
5
2013-12-29
2013-12-24
No

valgrind showed a small out-of-bounds access inside find_usb_devices(). The problem is that fread() reads 1024 bytes of data and then strstr scans the data. Since the data is not 0-terminated, strstr accesses beyond the 1024 bytes and valgrind (correctly) complains. The attached patch fixes the issue.

1 Attachments

Discussion

  • John Tsiombikas

    John Tsiombikas - 2013-12-29
    • status: open --> closed
     
  • John Tsiombikas

    John Tsiombikas - 2013-12-29

    Thanks! commited in svn revision 174.

     

Log in to post a comment.