Re: [PATCH] staging: fbtft: fix out of bound access

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

 



On Thu, Jun 04, 2015 at 03:36:31PM +0300, Dan Carpenter wrote:
> On Thu, Jun 04, 2015 at 05:12:01PM +0530, Sudip Mukherjee wrote:
> > size of str is 16, but in snprintf the size was mentioned as 128.
> > 
> > Signed-off-by: Sudip Mukherjee <sudip@xxxxxxxxxxxxxxx>
> > ---
<snip>
> Good eye.  How did you find this?
:) not me. cppcheck. 
> 
> The good news is buf[j] is <= 0xFFFF so it won't actually overflow.  Who
> knows why it is zero padded 2 spaces...  But use sizeof(str) instead of
> 16.
but my v2 will remove the use of msg and str.

regards
sudip
> 
> regards,
> dan carpenter
> 
_______________________________________________
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