bConfigurationValue in sysfs can be 3 digits (1byte value) + 1 new line = 4 
bytes

In it's current form a bConfigurationValue of 128 will be detected as not 
null terminated due to the trailing newline, simple fix is to just extend the 
array size to 5
You can merge this Pull Request by running:

  git pull https://github.com/remur/libusbx master

Or you can view, comment on it, or merge it online at:

  https://github.com/libusbx/libusbx/pull/148

-- Commit Summary --

  * take newline into account for sysfs_get_active_config

-- File Changes --

    M libusb/os/linux_usbfs.c (2)

-- Patch Links --

https://github.com/libusbx/libusbx/pull/148.patch
https://github.com/libusbx/libusbx/pull/148.diff
------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk
_______________________________________________
libusbx-devel mailing list
libusbx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libusbx-devel

Reply via email to