From: Ben Pfaff Date: Mon, 27 Jul 2015 05:04:59 +0000 (-0700) Subject: dump: Title section sometimes has 0x31 plus fixed block in place of 0x58. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a787bb1da9d64940bca6fa37209108addfbad54d;p=pspp dump: Title section sometimes has 0x31 plus fixed block in place of 0x58. --- 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");