From: David Levine Date: Thu, 23 Oct 2008 18:38:22 +0000 (+0000) Subject: * h/mh.h: raised NAMESZ from 128 to 999. RFC 2822 limits line X-Git-Tag: PRE_POSIX_CONVERSION~19 X-Git-Url: http://git.marmaro.de/?a=commitdiff_plain;h=2d4bd0ad2d574ffff2359a88bfcf53e792c3c830;p=mmh * h/mh.h: raised NAMESZ from 128 to 999. RFC 2822 limits line lengths to 998 characters, so a header name can be at most that long. m_getfld limits header names to 2 less than NAMESZ, which is fine, because header names must be followed by a colon. Add one for terminating NULL. --- diff --git a/ChangeLog b/ChangeLog index 2ce209a..d69cbca 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,13 @@ 2008-10-23 David Levine + * h/mh.h: raised NAMESZ from 128 to 999. RFC 2822 limits line + lengths to 998 characters, so a header name can be at most that long. + m_getfld limits header names to 2 less than NAMESZ, which is fine, + because header names must be followed by a colon. Add one for + terminating NULL. + +2008-10-23 David Levine + * sbr/m_getfld.c: in warning message, use NAMESZ-2 instead of NAMESZ-1 bytes because the message says "exceeds", not "is greater than or equal to". diff --git a/h/mh.h b/h/mh.h index 97c7769..6513f24 100644 --- a/h/mh.h +++ b/h/mh.h @@ -223,7 +223,15 @@ struct msgs { * m_getfld() message parsing */ -#define NAMESZ 128 /* Limit on component name size */ +#define NAMESZ 999 /* Limit on component name size. + RFC 2822 limits line lengths to + 998 characters, so a header name + can be at most that long. + m_getfld limits header names to 2 + less than NAMESZ, which is fine, + because header names must be + followed by a colon. Add one for + terminating NULL. */ #define LENERR (-2) /* Name too long error from getfld */ #define FMTERR (-3) /* Message Format error */