blob: a5c788a772c734a2354d63fe59316d8700f0e12c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
$NetBSD: patch-af,v 1.3 2002/10/21 14:46:27 mycroft Exp $
--- src/cookies.c.orig Sun May 27 19:34:56 2001
+++ src/cookies.c Mon Oct 21 14:27:38 2002
@@ -474,7 +474,12 @@
{
case S_NAME_PRE:
if (ISSPACE (c))
- FETCH (c, p);
+ {
+ FETCH1 (c, p);
+ /* drop trailing whitespace */
+ if (!c)
+ state = S_DONE;
+ }
else if (ATTR_NAME_CHAR (c))
{
name_b = p - 1;
@@ -605,7 +610,11 @@
}
}
if (state == S_DONE)
- return cookie;
+ {
+ if (!cookie->attr)
+ goto eof;
+ return cookie;
+ }
delete_cookie (cookie);
if (state == S_ERROR)
|