Re: [PATCH RESEND] staging: greybus: loopback_test: Use scnprintf() for avoiding potential buffer overflow

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

 



On Wed, Mar 11, 2020 at 11:09:59AM +0100, Johan Hovold wrote:
> On Wed, Mar 11, 2020 at 11:05:35AM +0100, Takashi Iwai wrote:
> > Since snprintf() returns the would-be-output size instead of the
> > actual output size, the succeeding calls may go beyond the given
> > buffer limit.  Fix it by replacing with scnprintf().
> > 
> > Signed-off-by: Takashi Iwai <tiwai@xxxxxxx>
> > ---
> > 
> > Just corrected the subject prefix per request.
> 
> Acked-by: Johan Hovold <johan@xxxxxxxxxx>

I take that back, this patch should NOT be applied.

This is user-space code so using scnprintf() doesn't make sense.

Johan
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux