From 398aa7568474978ddba433703034284b2faacb4b Mon Sep 17 00:00:00 2001 From: Wilfried Goesgens Date: Sat, 25 Aug 2012 09:27:56 +0200 Subject: [PATCH] URL-Parsing: abort on error. --- webcit/paramhandling.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/webcit/paramhandling.c b/webcit/paramhandling.c index d3c9507b2..5c87c578c 100644 --- a/webcit/paramhandling.c +++ b/webcit/paramhandling.c @@ -52,7 +52,7 @@ void ParseURLParams(StrBuf *url) keylen = aptr - up - 1; /* -1 -> '=' */ if(keylen > sizeof(u->url_key)) { syslog(1, "invalid url_key"); - continue; + return; } u = (urlcontent *) malloc(sizeof(urlcontent)); @@ -61,7 +61,7 @@ void ParseURLParams(StrBuf *url) if (keylen < 0) { syslog(1, "invalid url_key"); free(u); - continue; + return; } if (strncmp(u->url_key, "__", 2) != 0) -- 2.30.2