Re: [PATCH] usb: core: devices: use scnprintf() instead of sprintf()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Apr 19, 2022 at 10:50:22PM +0300, Sergey Shtylyov wrote:
> The USB device dump code uses the sprintf() calls with a 2-page buffer,
> leaving 256 bytes at the end of that buffer to prevent buffer overflow.
> Using scnprntf() instead eliminates the very possibility of the buffer
> overflow, while also simplifying the code. This however is achieved at
> the expense of not printing the "(truncated)" line anymore when the end
> of that buffer is actually reached; instead a possible partial line at
> the end of buffer (not ending with '\n') is now not printed.

So you just changed a user-visable abi :(

Please no, obviously that is not allowed.

greg k-h



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux