2014-06-11 7:45 GMT+02:00 Dan Carpenter dan.carpen...@oracle.com:
On Tue, Jun 10, 2014 at 10:48:35PM +0200, Rickard Strandqvist wrote:
Hi
True!
Sorry :-(
But then one would either operate strcpy outright.
Or use strlcpy then the code would be:
/* strlcpy() handles not include \0 */
On Thu, Jun 12, 2014 at 11:09:20PM +0200, Rickard Strandqvist wrote:
I agree that you should not do patches just to silence a static control
program.
Concerning (len = BUSID_SIZE) I agree! But I usually try to change as
little as possible in the patches I do. But perhaps I should not think
Hi
True!
Sorry :-(
But then one would either operate strcpy outright.
Or use strlcpy then the code would be:
/* strlcpy() handles not include \0 */
len = strlcpy(busid, buf + 4, BUSID_SIZE);
/* busid needs to include \0 termination */
if (!(len BUSID_SIZE))
return