summaryrefslogtreecommitdiff
path: root/libarchive/archive_read_support_format_ar.c
diff options
context:
space:
mode:
authorTim Kientzle <kientzle@gmail.com>2009-01-31 21:30:07 -0500
committerTim Kientzle <kientzle@gmail.com>2009-01-31 21:30:07 -0500
commit044e041c48c452770f3b6efff7b87a98872bf0d5 (patch)
tree7e2581d31868f969c395a4055df1175950f4616a /libarchive/archive_read_support_format_ar.c
parentb216a917458bdf2af3b917573d80a5b48eeb3bc5 (diff)
downloadlibarchive-044e041c48c452770f3b6efff7b87a98872bf0d5.tar.gz
Some ar writers seem to pad the filename table with `.
Permit this. SVN-Revision: 525
Diffstat (limited to 'libarchive/archive_read_support_format_ar.c')
-rw-r--r--libarchive/archive_read_support_format_ar.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/libarchive/archive_read_support_format_ar.c b/libarchive/archive_read_support_format_ar.c
index b82cb812..c2bd869c 100644
--- a/libarchive/archive_read_support_format_ar.c
+++ b/libarchive/archive_read_support_format_ar.c
@@ -513,11 +513,10 @@ ar_parse_gnu_filename_table(struct archive_read *a)
}
}
/*
- * Sanity check, last two chars must be `/\n' or '\n\n',
- * depending on whether the string table is padded by a '\n'
- * (string table produced by GNU ar always has a even size).
+ * GNU ar always pads the table to an even size.
+ * The pad character is either '\n' or '`'.
*/
- if (p != ar->strtab + size && *p != '\n')
+ if (p != ar->strtab + size && *p != '\n' && *p != '`')
goto bad_string_table;
/* Enforce zero termination. */