projects
/
citadel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b99aec2
)
URL-Parsing: fix off by one when checking the length of URL params
author
Wilfried Goesgens
<dothebart@citadel.org>
Sun, 21 Oct 2012 22:16:47 +0000
(
00:16
+0200)
committer
Wilfried Goesgens
<dothebart@citadel.org>
Sun, 21 Oct 2012 22:16:47 +0000
(
00:16
+0200)
webcit/paramhandling.c
patch
|
blob
|
history
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 -> '=' */
- 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;
}
@@
-371,7
+371,7
@@
void PutBstr(const char *key, long keylen, StrBuf *Value)
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;