Kevin Wolf wrote:
> Am 09.05.2012 11:23, schrieb Jim Meyering:
>> From: Jim Meyering
>>
>> strncpy does not guarantee NUL-termination.
>> Setting dest[n-1] = '\0' *before* calling strncpy(dest, src, n-1)
>> is a no-op. Use pstrcpy to ensure NUL-termination, not strncpy.
>
> It's not, it would onl
From: Jim Meyering
strncpy does not guarantee NUL-termination.
Setting dest[n-1] = '\0' *before* calling strncpy(dest, src, n-1)
is a no-op. Use pstrcpy to ensure NUL-termination, not strncpy.
Signed-off-by: Jim Meyering
---
block/vmdk.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
Am 09.05.2012 14:09, schrieb Jim Meyering:
> Kevin Wolf wrote:
>> Am 09.05.2012 11:23, schrieb Jim Meyering:
>>> From: Jim Meyering
>>>
>>> strncpy does not guarantee NUL-termination.
>>> Setting dest[n-1] = '\0' *before* calling strncpy(dest, src, n-1)
>>> is a no-op. Use pstrcpy to ensure NUL-t
Am 09.05.2012 11:23, schrieb Jim Meyering:
> From: Jim Meyering
>
> strncpy does not guarantee NUL-termination.
> Setting dest[n-1] = '\0' *before* calling strncpy(dest, src, n-1)
> is a no-op. Use pstrcpy to ensure NUL-termination, not strncpy.
It's not, it would only be a no-op before strncpy