diff options
-rw-r--r-- | misc/bstr.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/misc/bstr.c b/misc/bstr.c index 7a5a1a1270..7db7015e1c 100644 --- a/misc/bstr.c +++ b/misc/bstr.c @@ -379,6 +379,8 @@ static void resize_append(void *talloc_ctx, bstr *s, size_t append_min) // talloc_ctx will be used as parent context, if s->start is NULL. void bstr_xappend(void *talloc_ctx, bstr *s, bstr append) { + if (!append.len) + return; resize_append(talloc_ctx, s, append.len + 1); memcpy(s->start + s->len, append.start, append.len); s->len += append.len; |