Re: [PATCH] arch: mips: ralink: using strlcpy() instead of strncpy()

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

 



On 26/05/13 10:01, Chen Gang wrote:
'compatible' is used by strlen() in __of_device_is_compatible().

So for NUL terminated string, need always be sure of ended by zero.

'of_ids' is not a structure in "include/uapi/*", so not need initialize
all bytes, just use strlcpy() instead of strncpy().


Signed-off-by: Chen Gang<gang.chen@xxxxxxxxxxx>
Acked-by: John Crispin <blogic@xxxxxxxxxxx>


[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux