From: Art Cancro Date: Tue, 12 Feb 2019 23:22:30 +0000 (-0500) Subject: Reject url_keys of invalid size instead of crashing X-Git-Tag: v939~309 X-Git-Url: https://code.citadel.org/?p=citadel.git;a=commitdiff_plain;h=0e19dfa22f8f12f33b095abd24b10d7d39c74c60 Reject url_keys of invalid size instead of crashing --- diff --git a/webcit/paramhandling.c b/webcit/paramhandling.c index abe4f328d..1e07fcfb3 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. @@ -178,6 +178,8 @@ void ParseURLParams(StrBuf *url) syslog(LOG_WARNING, "%s:%d: invalid url_key of size %d in string size %ld", __FILE__, __LINE__, keylen, (long)sizeof(u->url_key) ); + free(u); + return; } if (keylen < 0) {