projects
/
blerg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
a06b78f
)
Additional sanity checks for parse_auth_cookie
author
Chip Black
<bytex64@bytex64.net>
Thu, 10 Jul 2014 07:24:14 +0000
(
02:24
-0500)
committer
Chip Black
<bytex64@bytex64.net>
Thu, 10 Jul 2014 07:24:14 +0000
(
02:24
-0500)
common/app.c
patch
|
blob
|
history
diff --git
a/common/app.c
b/common/app.c
index
2fad96e
..
01d5768
100644
(file)
--- 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;