gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-exchange] branch master updated (a483cad5 -> 73d107b5)


From: gnunet
Subject: [taler-exchange] branch master updated (a483cad5 -> 73d107b5)
Date: Tue, 31 Mar 2020 15:13:05 +0200

This is an automated email from the git hooks/post-receive script.

grothoff pushed a change to branch master
in repository exchange.

    from a483cad5 bump version in configure.ac
     new f38a56d3 add extra checks
     new 73d107b5 fix leak

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 src/exchange/taler-exchange-httpd.c | 8 ++++++++
 src/mhd/mhd_parsing.c               | 4 ++++
 2 files changed, 12 insertions(+)

diff --git a/src/exchange/taler-exchange-httpd.c 
b/src/exchange/taler-exchange-httpd.c
index f5acd1cd..de251acb 100644
--- a/src/exchange/taler-exchange-httpd.c
+++ b/src/exchange/taler-exchange-httpd.c
@@ -339,9 +339,15 @@ proceed_with_handler (const struct TEH_RequestHandler *rh,
                                      upload_data_size,
                                      &root);
     if (GNUNET_SYSERR == res)
+    {
+      GNUNET_assert (NULL == root);
       return MHD_NO;  /* bad upload, could not even generate error */
+    }
     if ( (GNUNET_NO == res) || (NULL == root) )
+    {
+      GNUNET_assert (NULL == root);
       return MHD_YES; /* so far incomplete upload or parser error */
+    }
   }
 
   {
@@ -381,6 +387,8 @@ proceed_with_handler (const struct TEH_RequestHandler *rh,
                          rh->url,
                          url);
         GNUNET_break_op (0);
+        if (NULL != root)
+          json_decref (root);
         return TALER_MHD_reply_with_error (connection,
                                            MHD_HTTP_NOT_FOUND,
                                            TALER_EC_WRONG_NUMBER_OF_SEGMENTS,
diff --git a/src/mhd/mhd_parsing.c b/src/mhd/mhd_parsing.c
index 21c215a2..fca54f3f 100644
--- a/src/mhd/mhd_parsing.c
+++ b/src/mhd/mhd_parsing.c
@@ -74,6 +74,7 @@ TALER_MHD_parse_post_json (struct MHD_Connection *connection,
   switch (pr)
   {
   case GNUNET_JSON_PR_OUT_OF_MEMORY:
+    GNUNET_break (NULL == *json);
     return (MHD_NO ==
             TALER_MHD_reply_with_error
               (connection,
@@ -82,12 +83,15 @@ TALER_MHD_parse_post_json (struct MHD_Connection 
*connection,
               "out of memory")) ? GNUNET_SYSERR : GNUNET_NO;
 
   case GNUNET_JSON_PR_CONTINUE:
+    GNUNET_break (NULL == *json);
     return GNUNET_YES;
   case GNUNET_JSON_PR_REQUEST_TOO_LARGE:
+    GNUNET_break (NULL == *json);
     return (MHD_NO ==
             TALER_MHD_reply_request_too_large
               (connection)) ? GNUNET_SYSERR : GNUNET_NO;
   case GNUNET_JSON_PR_JSON_INVALID:
+    GNUNET_break (NULL == *json);
     return (MHD_YES ==
             TALER_MHD_reply_with_error (connection,
                                         MHD_HTTP_BAD_REQUEST,

-- 
To stop receiving notification emails like this one, please contact
address@hidden.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]