gnunet-svn
[Top][All Lists]
Advanced

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

[libmicrohttpd] branch master updated (b6dbca76 -> f032145e)


From: gnunet
Subject: [libmicrohttpd] branch master updated (b6dbca76 -> f032145e)
Date: Wed, 15 Sep 2021 10:48:46 +0200

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

karlson2k pushed a change to branch master
in repository libmicrohttpd.

    from b6dbca76 Moved some logic from 'configure' to 'mhd_align.h'
     new c37cf719 Updated copyright year in W32 .DLL files resources
     new f032145e test_postprocessor: added check with empty key

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/microhttpd/microhttpd_dll_res.rc.in |  2 +-
 src/microhttpd/test_postprocessor.c     | 52 +++++++++++++++++++++++++++++++++
 w32/common/microhttpd_dll_res_vc.rc.in  |  2 +-
 3 files changed, 54 insertions(+), 2 deletions(-)

diff --git a/src/microhttpd/microhttpd_dll_res.rc.in 
b/src/microhttpd/microhttpd_dll_res.rc.in
index fe53e887..72300591 100644
--- a/src/microhttpd/microhttpd_dll_res.rc.in
+++ b/src/microhttpd/microhttpd_dll_res.rc.in
@@ -23,7 +23,7 @@ BEGIN
             VALUE "InternalName", "libmicrohttpd\0"
             VALUE "OriginalFilename", "libmicrohttpd-@MHD_W32_DLL_SUFF@.dll\0"
             VALUE "CompanyName", "Free Software Foundation\0"
-            VALUE "LegalCopyright",  "Copyright (C) 2007-2020 Christian 
Grothoff, Evgeny Grin and project contributors\0"
+            VALUE "LegalCopyright",  "Copyright (C) 2007-2021 Christian 
Grothoff, Evgeny Grin, and project contributors\0"
             VALUE "Comments", "http://www.gnu.org/software/libmicrohttpd/\0";
         END
     END
diff --git a/src/microhttpd/test_postprocessor.c 
b/src/microhttpd/test_postprocessor.c
index e7c778c5..4071e939 100644
--- a/src/microhttpd/test_postprocessor.c
+++ b/src/microhttpd/test_postprocessor.c
@@ -653,6 +653,57 @@ test_overflow ()
 }
 
 
+static int
+test_empty_key (void)
+{
+  const char form_data[] = "=abcdef";
+  size_t step;
+  const size_t size = MHD_STATICSTR_LEN_ (form_data);
+
+  for (step = 1; size >= step; ++step)
+  {
+    size_t i;
+    struct MHD_Connection connection;
+    struct MHD_HTTP_Header header;
+    struct MHD_PostProcessor *pp;
+    memset (&connection, 0, sizeof (struct MHD_Connection));
+    memset (&header, 0, sizeof (struct MHD_HTTP_Header));
+
+    connection.headers_received = &header;
+    connection.headers_received_tail = &header;
+    header.header = MHD_HTTP_HEADER_CONTENT_TYPE;
+    header.header_size = MHD_STATICSTR_LEN_ (MHD_HTTP_HEADER_CONTENT_TYPE);
+    header.value = MHD_HTTP_POST_ENCODING_FORM_URLENCODED;
+    header.value_size =
+      MHD_STATICSTR_LEN_ (MHD_HTTP_POST_ENCODING_FORM_URLENCODED);
+    header.kind = MHD_HEADER_KIND;
+    pp = MHD_create_post_processor (&connection,
+                                    1024, &value_checker, NULL);
+    if (NULL == pp)
+    {
+      fprintf (stderr, "Failed to create post processor.\n"
+               "Line: %u\n", (unsigned int) __LINE__);
+      exit (50);
+    }
+    for (i = 0; size > i; i += step)
+    {
+      if (MHD_NO != MHD_post_process (pp,
+                                      form_data + i,
+                                      (step > size - i) ? (size - i) : step))
+      {
+        fprintf (stderr, "Succeed to process the broken data.\n"
+                 "i: %u. step: %u.\n"
+                 "Line: %u\n", (unsigned) i, (unsigned) step,
+                 (unsigned int) __LINE__);
+        exit (49);
+      }
+    }
+    MHD_destroy_post_processor (pp);
+  }
+  return 0;
+}
+
+
 int
 main (int argc, char *const *argv)
 {
@@ -665,6 +716,7 @@ main (int argc, char *const *argv)
   errorCount += test_multipart ();
   errorCount += test_nested_multipart ();
   errorCount += test_empty_value ();
+  errorCount += test_empty_key ();
   errorCount += test_overflow ();
   if (errorCount != 0)
     fprintf (stderr, "Error (code: %u)\n", errorCount);
diff --git a/w32/common/microhttpd_dll_res_vc.rc.in 
b/w32/common/microhttpd_dll_res_vc.rc.in
index 64d1cfa9..ef016c7c 100644
--- a/w32/common/microhttpd_dll_res_vc.rc.in
+++ b/w32/common/microhttpd_dll_res_vc.rc.in
@@ -31,7 +31,7 @@ BEGIN
             VALUE "OriginalFilename", "libmicrohttpd-dll.dll\0"
 #endif
             VALUE "CompanyName", "Free Software Foundation\0"
-            VALUE "LegalCopyright",  "Copyright (C) 2007-2020 Christian 
Grothoff, Evgeny Grin and project contributors\0"
+            VALUE "LegalCopyright",  "Copyright (C) 2007-2021 Christian 
Grothoff, Evgeny Grin, and project contributors\0"
             VALUE "Comments", "http://www.gnu.org/software/libmicrohttpd/\0";
         END
     END

-- 
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]