RE: [PATCH v2 1/4] libusbg: Fix readlink/buffer overrun issue. CID#56130, CID#56129

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

 



Hi,

Sorry that I'm writing it so late, but in previous versions I have
focused on code and only run through commit messages.

> -----Original Message-----
> From: Philippe De Swert [mailto:philippedeswert@xxxxxxxxx]
> Sent: Tuesday, May 13, 2014 4:13 PM
> To: Krzysztof Opasiak; linux-usb@xxxxxxxxxxxxxxx
> Cc: mporter@xxxxxxxxxx; Philippe De Swert
> Subject: [PATCH v2 1/4] libusbg: Fix readlink/buffer overrun issue.
> CID#56130, CID#56129
> 
> Readlink can return the total length of the buffer (here 4096), so
> we do not
> want to dereference target[4096] as that would give an off by one
> error.
> 

Please don't use extract numbers but use appropriative defines
(USBG_MAX_PATH_LENGTH). Please also add () to function names to make it
easier to notice that we are talking about functions for example
readlink().


--
BR's
Krzysztof Opasiak


--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




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

  Powered by Linux