Skip to content
Permalink
Browse files Browse the repository at this point in the history
Fix libarchive/archive_read_support_format_mtree.c:1388:11: error: ar…
…ray subscript is above array bounds
  • Loading branch information
mfont-ws committed Jun 10, 2016
1 parent 74fe16d commit a550dae
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libarchive/archive_read_support_format_mtree.c
Expand Up @@ -1385,12 +1385,12 @@ parse_device(dev_t *pdev, struct archive *a, char *val)
"Missing number");
return ARCHIVE_WARN;
}
numbers[argc++] = (unsigned long)mtree_atol(&p);
if (argc > MAX_PACK_ARGS) {
if (argc >= MAX_PACK_ARGS) {
archive_set_error(a, ARCHIVE_ERRNO_FILE_FORMAT,
"Too many arguments");
return ARCHIVE_WARN;
}
numbers[argc++] = (unsigned long)mtree_atol(&p);
}
if (argc < 2) {
archive_set_error(a, ARCHIVE_ERRNO_FILE_FORMAT,
Expand Down

0 comments on commit a550dae

Please sign in to comment.