about summary refs log tree commit diff
path: root/blaze822.c
diff options
context:
space:
mode:
authorLeah Neukirchen <leah@vuxu.org>2018-03-02 20:43:01 +0100
committerLeah Neukirchen <leah@vuxu.org>2018-03-02 20:43:01 +0100
commit35c11688ebf6607d45a7bd643ba2a4b03e3f8945 (patch)
tree2b92640b87b520bef08b0571e229003a8d422116 /blaze822.c
parent372450cd70bfe81567f07db9d729f1b434ac96fb (diff)
downloadmblaze-35c11688ebf6607d45a7bd643ba2a4b03e3f8945.tar.gz
mblaze-35c11688ebf6607d45a7bd643ba2a4b03e3f8945.tar.xz
mblaze-35c11688ebf6607d45a7bd643ba2a4b03e3f8945.zip
blaze822: compress_hdr: avoid stepping h too far
This resulted in the message consisting of the empty line to contain a
single header which consisted of only a space.
Diffstat (limited to 'blaze822.c')
-rw-r--r--blaze822.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/blaze822.c b/blaze822.c
index 6665115..188182d 100644
--- a/blaze822.c
+++ b/blaze822.c
@@ -342,7 +342,7 @@ compress_hdr(char *s, char *end)
 		while (h < end && *h) {
 			if (*h == '\n') {
 				*t++ = ' ';
-				while (*h && isfws(*h))
+				while (*h && isfws(*h) && *(h+1))
 					h++;
 			}
 			*t++ = *h++;