From e9e94531f0fb4a24a0e8faa3246eb1ff6695e436 Mon Sep 17 00:00:00 2001 From: Sergey Poznyakoff Date: Mon, 10 Feb 2014 19:51:55 +0200 Subject: [PATCH] Bugfix * src/suffix.c (find_compression_suffix): Fix eventual coredump. --- src/suffix.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/suffix.c b/src/suffix.c index cf4d954..ac34cba 100644 --- a/src/suffix.c +++ b/src/suffix.c @@ -51,7 +51,7 @@ static struct compression_suffix compression_suffixes[] = { }; static struct compression_suffix const * -find_compression_suffix (const char *name, size_t *base_len) +find_compression_suffix (const char *name, size_t *ret_len) { char *suf = strrchr (name, '.'); @@ -67,8 +67,8 @@ find_compression_suffix (const char *name, size_t *base_len) { if (p->length == len && memcmp (p->suffix, suf, len) == 0) { - if (*base_len) - *base_len = strlen (name) - len - 1; + if (ret_len) + *ret_len = strlen (name) - len - 1; return p; } } -- 2.45.2