projects
/
citadel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
URL-Parsing: fix off by one when checking the length of URL params
[citadel.git]
/
webcit
/
paramhandling.c
diff --git
a/webcit/paramhandling.c
b/webcit/paramhandling.c
index 46ac87280e970bb90976bd4dbd4932511c929194..9db69f7e78791ab4b7072958b0fa1d696c2626fb 100644
(file)
--- a/
webcit/paramhandling.c
+++ b/
webcit/paramhandling.c
@@
-50,7
+50,7
@@
void ParseURLParams(StrBuf *url)
bptr++;
}
keylen = aptr - up - 1; /* -1 -> '=' */
bptr++;
}
keylen = aptr - up - 1; /* -1 -> '=' */
- if(keylen > sizeof(u->url_key)) {
+ if(keylen >
=
sizeof(u->url_key)) {
syslog(1, "invalid url_key from %s", ChrPtr(WCC->Hdr->HR.browser_host));
return;
}
syslog(1, "invalid url_key from %s", ChrPtr(WCC->Hdr->HR.browser_host));
return;
}
@@
-371,7
+371,7
@@
void PutBstr(const char *key, long keylen, StrBuf *Value)
urlcontent *u;
wcsession *WCC = WC;
urlcontent *u;
wcsession *WCC = WC;
- if(keylen > sizeof(u->url_key)) {
+ if(keylen >
=
sizeof(u->url_key)) {
syslog(1, "invalid url_key from %s", ChrPtr(WCC->Hdr->HR.browser_host));
FreeStrBuf(&Value);
return;
syslog(1, "invalid url_key from %s", ChrPtr(WCC->Hdr->HR.browser_host));
FreeStrBuf(&Value);
return;