diff options
Diffstat (limited to 'udev_libc_wrapper.c')
-rw-r--r-- | udev_libc_wrapper.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/udev_libc_wrapper.c b/udev_libc_wrapper.c index 23cb7b4316..d69f2ac48e 100644 --- a/udev_libc_wrapper.c +++ b/udev_libc_wrapper.c @@ -58,7 +58,8 @@ size_t strlcpy(char *dst, const char *src, size_t size) bytes++; } - *q = '\0'; + if (size) + *q = '\0'; return bytes; } @@ -82,7 +83,8 @@ size_t strlcat(char *dst, const char *src, size_t size) bytes++; } - *q = '\0'; + if (size) + *q = '\0'; return bytes; } #endif /* __OWN_STRLCPYCAT__ */ |