Closed vathpela closed 6 years ago
…bounds
New gcc rightly comlplains when we do the following:
strncpy (dest, src, strlen(src));
For two reasons: a) it doesn't copy the NUL byte b) it's otherwise the same thing strcpy() would have done
This patch replaces that with stpncpy (just because it's slightly easier to use) and the real bounds for the destination.
Signed-off-by: Peter Jones pjones@redhat.com
…bounds
New gcc rightly comlplains when we do the following:
strncpy (dest, src, strlen(src));
For two reasons: a) it doesn't copy the NUL byte b) it's otherwise the same thing strcpy() would have done
This patch replaces that with stpncpy (just because it's slightly easier to use) and the real bounds for the destination.
Signed-off-by: Peter Jones pjones@redhat.com