diff options
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/xargs/strnsubst.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.bin/xargs/strnsubst.c b/usr.bin/xargs/strnsubst.c index 6baa3f0..5ca2773 100644 --- a/usr.bin/xargs/strnsubst.c +++ b/usr.bin/xargs/strnsubst.c @@ -48,7 +48,7 @@ strnsubst(char **str, const char *match, const char *replstr, size_t maxsize) if (this == NULL) break; if ((strlen(s2) + ((uintptr_t)this - (uintptr_t)s1) + - (strlen(replstr) - 1)) > maxsize) { + (strlen(replstr) - 1)) > maxsize && *replstr != '\0') { strlcat(s2, s1, maxsize); goto done; } |