From a787bb1da9d64940bca6fa37209108addfbad54d Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Sun, 26 Jul 2015 22:04:59 -0700 Subject: [PATCH] dump: Title section sometimes has 0x31 plus fixed block in place of 0x58. --- dump.c | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/dump.c b/dump.c index a7ccbdc88b..140050d6cb 100644 --- a/dump.c +++ b/dump.c @@ -280,7 +280,25 @@ dump_value_31(FILE *stream) } else match_byte_assert(0x58); - match_byte_assert(0x58); + if (match_byte(0x31)) + { + /* All the examples in the corpus, all from one SPV file, are + exactly like this. */ + match_u32_assert(0); + match_u32_assert(0); + match_u32_assert(0); + match_u32_assert(0); + match_byte_assert(1); + match_byte_assert(0); + match_byte_assert(8); + match_byte_assert(0); + match_byte_assert(8); + match_byte_assert(0); + match_byte_assert(10); + match_byte_assert(0); + } + else + match_byte_assert(0x58); if (pos != outer_end) { fprintf(stderr, "outer end discrepancy\n"); -- 2.30.2