openbsd-ports/www/snownews/patches/patch-net-support_c
martynas bbb4070e93 - make a bunch of feeds work. rfc2616 says field-content is octet.
checkValidHTTPHeader assumes the whole header is ascii, while only
token should be
- update to snownews-1.5.9
ok maintainer cathcart@ and kili@
2008-02-18 17:48:48 +00:00

22 lines
685 B
Plaintext

$OpenBSD: patch-net-support_c,v 1.1 2008/02/18 17:48:48 martynas Exp $
--- net-support.c.orig Tue Jan 8 11:41:02 2008
+++ net-support.c Mon Feb 18 00:07:00 2008
@@ -243,7 +243,7 @@ int NetSupportAuth (struct feed * cur_ptr, const char
return 0;
}
-/* HTTP header may only contain ASCII characters.
+/* HTTP token may only contain ASCII characters.
*
* Ensure that we don't hit the terminating \0 in a string
* with the for loop.
@@ -262,6 +262,8 @@ int checkValidHTTPHeader (const unsigned char * header
if (((header[i] < 32) || (header[i] > 127)) &&
(header[i] != '\r') && (header[i] != '\n'))
return -1;
+ if (header[i] == ':')
+ break;
}
return 0;
}