We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e64e68d commit 654a04aCopy full SHA for 654a04a
1 file changed
cram/cram_io.c
@@ -1421,6 +1421,10 @@ cram_block *cram_read_block(cram_fd *fd) {
1421
//fprintf(stderr, "Block at %d\n", (int)ftell(fd->fp));
1422
1423
if (-1 == (b->method = hgetc(fd->fp))) { free(b); return NULL; }
1424
+ if (b->method > TOK3) {
1425
+ hts_log_error("Unknown block compression method %d", (int) b->method);
1426
+ free(b); return NULL;
1427
+ }
1428
c = b->method; crc = crc32(crc, &c, 1);
1429
if (-1 == (b->content_type= hgetc(fd->fp))) { free(b); return NULL; }
1430
c = b->content_type; crc = crc32(crc, &c, 1);
0 commit comments