adjust lowest possible block length from 0 to 12 bytes
@@ -5448,7 +5448,7 @@ while(1)
printf("unsupported pcapng version: %d\n", pcapngshb.major_version);
break;
}
- if(pcapngbh.total_length == 0)
+ if(pcapngbh.total_length < 12)
{
pcapreaderrors++;
printf("empty block detected\n");
@@ -5484,7 +5484,7 @@ while(1)
pcapngbh.block_type = byte_swap_32(pcapngbh.block_type);
pcapngbh.total_length = byte_swap_32(pcapngbh.total_length);
}
- if(pcapngbh.total_length == 0)
+ if(pcapngbh.total_length < 12)
{
pcapreaderrors++;
printf("empty block detected\n");
