update dkim.c from other repository
[citadel.git] / webcit / paramhandling.c
index 15905caa8b7caa0d30483c0f49247a665b290224..1c301a5ee271f41f320091fb2f60c2885818c303 100644 (file)
@@ -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) {