Skip to content

Commit

Permalink
Minor improvement in the mtree bidder.
Browse files Browse the repository at this point in the history
 - During checking NetBSD mtree -D format, if the first character of
   the last filed in an entry line is '/', fail the test bidding mtree
   format.
  • Loading branch information
ggcueroad committed Sep 26, 2012
1 parent d44b4a9 commit 66b1a0b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions libarchive/archive_read_support_format_mtree.c
Original file line number Diff line number Diff line change
Expand Up @@ -548,6 +548,10 @@ bid_entry(const char *p, ssize_t len, ssize_t nl, int *last_is_path)
}
if (name_len == 0 || slash == 0)
return (-1);
/* If '/' is placed at the first in this field, this is not
* a valid filename. */
if (pb[1] == '/')
return (-1);
ll = len - nl - name_len;
pp = p;
*last_is_path = 1;
Expand Down

0 comments on commit 66b1a0b

Please sign in to comment.