diff options
Diffstat (limited to 'src/core/wee-string.c')
-rw-r--r-- | src/core/wee-string.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/wee-string.c b/src/core/wee-string.c index 70f595553..2593ed279 100644 --- a/src/core/wee-string.c +++ b/src/core/wee-string.c @@ -76,7 +76,7 @@ string_strndup (const char *string, int length) { char *result; - if (!string) + if (!string || (length < 0)) return NULL; if ((int)strlen (string) < length) |