]> Dogcows Code - chaz/tar/commitdiff
Bugfix
authorSergey Poznyakoff <gray@gnu.org>
Mon, 10 Feb 2014 17:51:55 +0000 (19:51 +0200)
committerSergey Poznyakoff <gray@gnu.org>
Mon, 10 Feb 2014 17:51:55 +0000 (19:51 +0200)
* src/suffix.c (find_compression_suffix): Fix eventual coredump.

src/suffix.c

index cf4d954ad1839bd5eac6ef056fc6e4a32a96b27d..ac34cba20e372ceaa0b137817cb159a3130dc895 100644 (file)
@@ -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;
            }
        }
This page took 0.022064 seconds and 4 git commands to generate.