From: Fabian Keil <fk@fabiankeil.de>
Date: Sat, 18 Oct 2014 11:31:25 +0000 (+0000)
Subject: Add missing return check in dispatch_known_cgi()
X-Git-Tag: v_3_0_22~40
X-Git-Url: http://www.privoxy.org/gitweb/%22https:/faq/user-manual/static/gitweb.js?a=commitdiff_plain;h=8f053c6a9d681ec2b22ab67d0d0c2d33aaab5bb2;p=privoxy.git

Add missing return check in dispatch_known_cgi()

CID 66354.
---

diff --git a/cgi.c b/cgi.c
index f81443ee..4f7710db 100644
--- a/cgi.c
+++ b/cgi.c
@@ -1,4 +1,4 @@
-const char cgi_rcs[] = "$Id: cgi.c,v 1.157 2012/11/09 10:47:42 fabiankeil Exp $";
+const char cgi_rcs[] = "$Id: cgi.c,v 1.158 2012/12/07 12:45:20 fabiankeil Exp $";
 /*********************************************************************
  *
  * File        :  $Source: /cvsroot/ijbswa/current/cgi.c,v $
@@ -497,7 +497,12 @@ static struct http_response *dispatch_known_cgi(struct client_state * csp,
       *query_args_start++ = '\0';
       if ((param_list = new_map()))
       {
-         map(param_list, "file", 1, url_decode(query_args_start), 0);
+         err = map(param_list, "file", 1, url_decode(query_args_start), 0);
+         if (JB_ERR_OK != err) {
+            free(path_copy);
+            free(param_list);
+            return cgi_error_memory();
+         }
       }
    }
    else