Merge pull request #3281 from stoeckmann/warc_bid_check

(cherry picked from commit ade8de6f77)
This commit is contained in:
Dustin L. Howett authored and Martin Matuska committed 2026-07-26 20:22:34 +02:00
1 parent 32e07d6c8e
commit 2631a5fb75
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. */