diff options
Diffstat (limited to 'common/compat.c')
-rw-r--r-- | common/compat.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/common/compat.c b/common/compat.c index 5a9702d..48614fa 100644 --- a/common/compat.c +++ b/common/compat.c @@ -525,7 +525,10 @@ strconcat (const char *first, for (arg = first; arg; arg = va_arg (va, const char*)) { size_t old_length = length; length += strlen (arg); - return_val_if_fail (length >= old_length, NULL); + if (length < old_length) { + va_end (va); + return_val_if_reached (NULL); + } } va_end (va); |