]> diplodocus.org Git - nmh/commit
Fix bug where single-character headers were sometimes missed.
authorRalph Corderoy <ralph@inputplus.co.uk>
Sun, 16 Oct 2016 13:19:56 +0000 (14:19 +0100)
committerRalph Corderoy <ralph@inputplus.co.uk>
Sun, 16 Oct 2016 13:19:56 +0000 (14:19 +0100)
commit41a82a7ecba04be5b27b3ffc813e2f34d2786a38
treeb736bc3fc02e857650f18fd399e67e480948140d
parent45a84738dfab22fecb11a493fac946c23217b6eb
Fix bug where single-character headers were sometimes missed.
The hash function used to check if a header was of interest always used
its first three characters.  For a single-character header that third
byte wasn't particularly set and so it was pot luck if the two hashes
matched, swayed by what was previously in the format string and in the
email's headers.  Alter it to cope, including with an empty string.
Comment that it never gives 127 so leaves the last element of the
hash-table array unused.  Alter test-header-parsing to stop declaring it
expects to fail.
sbr/fmt_compile.c
test/scan/test-header-parsing