X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=webcit%2Fparamhandling.c;h=1e07fcfb3aa018440580b65670c9061555d5b77c;hb=HEAD;hp=15905caa8b7caa0d30483c0f49247a665b290224;hpb=b98d9f087b3a24a9549470ab066c2aea187ecfba;p=citadel.git diff --git a/webcit/paramhandling.c b/webcit/paramhandling.c index 15905caa8..1c301a5ee 100644 --- a/webcit/paramhandling.c +++ b/webcit/paramhandling.c @@ -1,7 +1,7 @@ /* * parse urlparts and post data * - * Copyright (c) 1996-2013 by the citadel.org team + * Copyright (c) 1996-2019 by the citadel.org team * * This program is open source software. You can redistribute it and/or * modify it under the terms of the GNU General Public License, version 3. @@ -13,7 +13,7 @@ */ #include "webcit.h" -#include "webserver.h" + /* uncomment to see all parameters sent to the server by the browser. */ /* #define DEBUG_URLSTRINGS */ @@ -176,8 +176,10 @@ void ParseURLParams(StrBuf *url) keylen = aptr - up - 1; /* -1 -> '=' */ if (keylen > sizeof(u->url_key)) { syslog(LOG_WARNING, "%s:%d: invalid url_key of size %d in string size %ld", - __FILE__, __LINE__, keylen, sizeof(u->url_key) + __FILE__, __LINE__, keylen, (long)sizeof(u->url_key) ); + free(u); + return; } if (keylen < 0) {