You are viewing a plain text version of this content. The canonical link for it is here.
Posted to apreq-cvs@httpd.apache.org by jo...@apache.org on 2003/09/26 15:58:33 UTC
cvs commit: httpd-apreq-2/src apreq_cookie.c
joes 2003/09/26 06:58:33
Modified: src apreq_cookie.c
Log:
apr_table_get may return NULL, which is invalid input for apreq_char_to_value. Thanks to Bojan Smojver for the spot.
Revision Changes Path
1.20 +4 -2 httpd-apreq-2/src/apreq_cookie.c
Index: apreq_cookie.c
===================================================================
RCS file: /home/cvs/httpd-apreq-2/src/apreq_cookie.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- apreq_cookie.c 13 Jul 2003 17:54:59 -0000 1.19
+++ apreq_cookie.c 26 Sep 2003 13:58:33 -0000 1.20
@@ -65,8 +65,10 @@
APREQ_DECLARE(apreq_cookie_t *) apreq_cookie(const apreq_jar_t *jar,
const char *name)
{
- return apreq_value_to_cookie(apreq_char_to_value(apr_table_get(jar->cookies,
- name)));
+ const char *val = apr_table_get(jar->cookies, name);
+ if (val == NULL)
+ return NULL;
+ return apreq_value_to_cookie(apreq_char_to_value(val));
}
APREQ_DECLARE(void) apreq_add_cookie(apreq_jar_t *jar,