From: Chip Black Date: Thu, 10 Jul 2014 07:24:14 +0000 (-0500) Subject: Additional sanity checks for parse_auth_cookie X-Git-Tag: v1.10~13 X-Git-Url: http://git.bytex64.net/?a=commitdiff_plain;h=14aadc420ce60f91fbf1a9960d4f9a84b195bf07;hp=a06b78f6b47c6e5287ea9a5c935afea4ded6e0b8;p=blerg.git Additional sanity checks for parse_auth_cookie --- diff --git a/common/app.c b/common/app.c index 2fad96e..01d5768 100644 --- a/common/app.c +++ b/common/app.c @@ -42,6 +42,11 @@ int parse_url_info(const char *url, struct url_info *info) { } int parse_auth_cookie(const char *str, struct auth_cookie *cookie) { + if (str == NULL) + return 0; + if (cookie == NULL) + return 0; + char *token_begin = strchr(str, '/'); if (token_begin == NULL) { return 0;