gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] [libmicrohttpd] branch master updated (cedf766b -> 08a359c3


From: gnunet
Subject: [GNUnet-SVN] [libmicrohttpd] branch master updated (cedf766b -> 08a359c3)
Date: Sun, 23 Jun 2019 22:15:40 +0200

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

karlson2k pushed a change to branch master
in repository libmicrohttpd.

    from cedf766b Updated ChangeLog
     new 3610630c daemon.c: minor compiler warning fix
     new 08a359c3 postprocessor: fixed usage of strlen() in loop

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/daemon.c        | 2 +-
 src/microhttpd/postprocessor.c | 8 ++++++--
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c
index b5d151b4..8e1a7ab8 100644
--- a/src/microhttpd/daemon.c
+++ b/src/microhttpd/daemon.c
@@ -3815,7 +3815,7 @@ MHD_poll_all (struct MHD_Daemon *daemon,
     struct pollfd *p;
     MHD_socket ls;
 
-    p = MHD_calloc_ ((2 + num_connections),
+    p = MHD_calloc_ ((2 + (size_t)num_connections),
                      sizeof (struct pollfd));
     if (NULL == p)
       {
diff --git a/src/microhttpd/postprocessor.c b/src/microhttpd/postprocessor.c
index ad0b2adf..e9d40ef7 100644
--- a/src/microhttpd/postprocessor.c
+++ b/src/microhttpd/postprocessor.c
@@ -520,12 +520,14 @@ post_process_urlencoded (struct MHD_PostProcessor *pp,
  * rest of the line into the suffix ptr.
  *
  * @param prefix prefix to match
+ * @param prefix_len length of @a prefix
  * @param line line to match prefix in
  * @param suffix set to a copy of the rest of the line, starting at the end of 
the match
  * @return #MHD_YES if there was a match, #MHD_NO if not
  */
 static int
 try_match_header (const char *prefix,
+                  size_t prefix_len,
                   char *line,
                   char **suffix)
 {
@@ -535,9 +537,9 @@ try_match_header (const char *prefix,
     {
       if (MHD_str_equal_caseless_n_ (prefix,
                                      line,
-                                     strlen (prefix)))
+                                     prefix_len))
         {
-          *suffix = strdup (&line[strlen (prefix)]);
+          *suffix = strdup (&line[prefix_len]);
           return MHD_YES;
         }
       ++line;
@@ -724,9 +726,11 @@ process_multipart_headers (struct MHD_PostProcessor *pp,
   else
     {
       try_match_header ("Content-type: ",
+                        MHD_STATICSTR_LEN_("Content-type: "),
                         buf,
                         &pp->content_type);
       try_match_header ("Content-Transfer-Encoding: ",
+                        MHD_STATICSTR_LEN_("Content-Transfer-Encoding: "),
                         buf,
                         &pp->content_transfer_encoding);
     }

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



reply via email to

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