projects
/
blerg.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add auth counter to perl library
[blerg.git]
/
common
/
app.c
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) {
}
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;
char *token_begin = strchr(str, '/');
if (token_begin == NULL) {
return 0;