Merge pull request #3281 from stoeckmann/warc_bid_check

This commit is contained in:
Dustin L. Howett authored and GitHub committed 2026-07-11 07:14:05 -05:00
commit ade8de6f77
1 file changed
+1 -4
@@ -192,12 +192,9 @@ _warc_bid(struct archive_read *a, int best_bid)
(void)best_bid; /* UNUSED */
/* Check the first line, which should already be a record header. */
if ((hdr = __archive_read_ahead(a, 12U, &nrd)) == NULL) {
if ((hdr = __archive_read_ahead(a, 12, &nrd)) == NULL) {
/* Not enough data to identify this format. */
return -1;
} else if (nrd < 12) {
/* Not WARC; the magic string is at least 12 bytes. */
return -1;
}
/* Parse the record version number. */