Hello, i detected an overlapping data buffer at file "linux-2.6.29.3/drivers/usb/atm/usbatm.c" For detection, i used the static code analysis tool cppcheck. It prints the following message: [linux-2.6.29.3/drivers/usb/atm/usbatm.c:1393]: (error) Overlapping data buffer buffer Take a loop at file usbatm.cat line 1393: sprintf(buffer, "%s %2.2x", buffer, data[i]); Here, var "buffer" is used by iteself, this is dangerous!!!! Best regards Ettl Martin
On Thu, Jun 04, 2009 at 04:05:46PM +0000, bugzilla-daemon@bugzilla.kernel.org wrote: > Take a loop at file usbatm.cat line 1393: > > sprintf(buffer, "%s %2.2x", buffer, data[i]); > > Here, var "buffer" is used by iteself, this is dangerous!!!! This is only a debugging message, and only happens if you build the driver to enable that debugging (which is not the default). If this bothers you, can you provide a patch and send it to the linux-usb mailing list to use the standard kernel functions to output hex data like this and not open-code it?
Thank you for the fast reply. I know, this is only activated on debugging. But, no offense, debugging with obviously wrong code is a bad idea (just my opinion)! I have no time to submit a patch. Best regards Martin
Ok, will just close this out for now then.