(all_names_found): Check if the argument

contains valid filename. Fixes coredump on "not_a_tar_file"
This commit is contained in:
Sergey Poznyakoff
2003-11-13 08:46:53 +00:00
parent cc8628df0c
commit c95535bae8

View File

@@ -608,9 +608,11 @@ bool
all_names_found (struct tar_stat_info *p)
{
struct name const *cursor;
size_t len = strlen (p->file_name);
if (occurrence_option == 0 || p->had_trailing_slash)
size_t len;
if (!p->file_name || occurrence_option == 0 || p->had_trailing_slash)
return false;
len = strlen (p->file_name);
for (cursor = namelist; cursor; cursor = cursor->next)
{
if (cursor->regexp