diff options
Diffstat (limited to 'common/path.c')
-rw-r--r-- | common/path.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/common/path.c b/common/path.c index 5cf0e1a..17a6230 100644 --- a/common/path.c +++ b/common/path.c @@ -218,7 +218,10 @@ p11_path_build (const char *path, while (path != NULL) { size_t old_len = len; len += strlen (path) + 1; - return_val_if_fail (len >= old_len, NULL); + if (len < old_len) { + va_end (va); + return_val_if_reached (NULL); + } path = va_arg (va, const char *); } va_end (va); |