gnunet-svn
[Top][All Lists]
Advanced

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

[libmicrohttpd] 05/05: postprocessor: minor optimization: do not process


From: gnunet
Subject: [libmicrohttpd] 05/05: postprocessor: minor optimization: do not process zero-length data
Date: Sun, 12 Sep 2021 18:32:26 +0200

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

karlson2k pushed a commit to branch master
in repository libmicrohttpd.

commit 7a6a9d14a4aa0c745e2804a9fe4e876bbb624217
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
AuthorDate: Sun Sep 12 19:16:32 2021 +0300

    postprocessor: minor optimization: do not process zero-length data
---
 src/microhttpd/postprocessor.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/microhttpd/postprocessor.c b/src/microhttpd/postprocessor.c
index 076de337..7c78020e 100644
--- a/src/microhttpd/postprocessor.c
+++ b/src/microhttpd/postprocessor.c
@@ -438,8 +438,11 @@ process_value (struct MHD_PostProcessor *pp,
     mhd_assert (xoff < sizeof (xbuf));
     /* unescape */
     xbuf[xoff] = '\0';        /* 0-terminate in preparation */
-    MHD_unescape_plus (xbuf);
-    xoff = MHD_http_unescape (xbuf);
+    if (0 != xoff)
+    {
+      MHD_unescape_plus (xbuf);
+      xoff = MHD_http_unescape (xbuf);
+    }
     /* finally: call application! */
     if (pp->must_ikvi || (0 != xoff) )
     {

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

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