diff options
author | Matthias Andree <matthias.andree@gmx.de> | 2005-07-26 16:00:42 +0000 |
---|---|---|
committer | Matthias Andree <matthias.andree@gmx.de> | 2005-07-26 16:00:42 +0000 |
commit | 80ac250f8c9a468fbb0dd13e683a12964f6e0328 (patch) | |
tree | 604d78409e25fe41e6f47073e4d7f65926799c9d /rfc822.c | |
parent | 1fab1b96e1481c343dbf80dc9afbb61c8fef7ac3 (diff) | |
download | fetchmail-80ac250f8c9a468fbb0dd13e683a12964f6e0328.tar.gz fetchmail-80ac250f8c9a468fbb0dd13e683a12964f6e0328.tar.bz2 fetchmail-80ac250f8c9a468fbb0dd13e683a12964f6e0328.zip |
Fix buffer underrun when buffer starts with whitespace.
svn path=/trunk/; revision=4183
Diffstat (limited to 'rfc822.c')
-rw-r--r-- | rfc822.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -264,7 +264,8 @@ unsigned char *nxtaddr(const unsigned char *hdr /* header to be parsed, NUL to c state = ENDIT_ALL; if (tp) { - while (isspace(address[--tp])) + --tp; + while (tp >= 0 && isspace(address[tp--])) continue; address[++tp] = '\0'; tp = 0; |