From 8f053c6a9d681ec2b22ab67d0d0c2d33aaab5bb2 Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Sat, 18 Oct 2014 11:31:25 +0000 Subject: [PATCH] Add missing return check in dispatch_known_cgi() CID 66354. --- cgi.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) 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 -- 2.39.2