]> diplodocus.org Git - nmh/commit
Make many m_getfld() buffer parameters NMH_BUFSIZ big.
authorRalph Corderoy <ralph@inputplus.co.uk>
Sun, 7 May 2017 12:03:01 +0000 (13:03 +0100)
committerRalph Corderoy <ralph@inputplus.co.uk>
Sun, 7 May 2017 12:03:01 +0000 (13:03 +0100)
commita23477eb9bd7d1af5f66a171041bf72af932488e
tree3b7494a8652aebb20ba6a28711c9383b89a59df2
parentc347c3bbba2b3eea2442b641a11a381dea709cd8
Make many m_getfld() buffer parameters NMH_BUFSIZ big.

char arrays were often stdio.h's BUFSIZ large, and that's 8192 with here
with glibc 2.25-1 on Linux x86_64, so using NMH_BUFSIZ is no different
as that's max(BUFSIZ, 8192).  But some were 256 or 512 with a local
SBUFSIZ macro and they caused scan(1) to truncate a field, or pick(1) to
not spot text because the field was truncated.

Delete bad-input/test-header's test for m_getfld()'s detection for a
header without a colon that's under the header-length NAMESZ limit, but
longer than the passed in buffer.  This no longer happens in scan as the
buffer is larger than the longest allowed header.
21 files changed:
sbr/readconfig.c
sbr/seq_read.c
test/bad-input/test-header
uip/distsbr.c
uip/forwsbr.c
uip/mhbuildsbr.c
uip/mhcachesbr.c
uip/mhlsbr.c
uip/mhparse.c
uip/new.c
uip/picksbr.c
uip/post.c
uip/prompter.c
uip/rcvdist.c
uip/replsbr.c
uip/scansbr.c
uip/sendsbr.c
uip/show.c
uip/slocal.c
uip/sortm.c
uip/whatnowsbr.c