gnunet-svn
[Top][All Lists]
Advanced

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

[libmicrohttpd] branch master updated: check for socket validity


From: gnunet
Subject: [libmicrohttpd] branch master updated: check for socket validity
Date: Sat, 07 Mar 2020 17:13:30 +0100

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

grothoff pushed a commit to branch master
in repository libmicrohttpd.

The following commit(s) were added to refs/heads/master by this push:
     new 9ebe27e1 check for socket validity
9ebe27e1 is described below

commit 9ebe27e18d0f2bd20865027d838dcacb6891d1f6
Author: Christian Grothoff <address@hidden>
AuthorDate: Sat Mar 7 17:09:22 2020 +0100

    check for socket validity
---
 src/microhttpd/mhd_sockets.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/microhttpd/mhd_sockets.c b/src/microhttpd/mhd_sockets.c
index a52d5eb5..31b53e1e 100644
--- a/src/microhttpd/mhd_sockets.c
+++ b/src/microhttpd/mhd_sockets.c
@@ -505,6 +505,11 @@ MHD_socket_cork_ (MHD_socket sock,
   const MHD_SCKT_OPT_BOOL_ on_val = 1;
 
   /* Disable extra buffering */
+  if (MHD_INVALID_SOCKET == sock)
+  {
+    errno = EBADF;
+    return 0; /* failed */
+  }
   if (0 != setsockopt (sock,
                        IPPROTO_TCP,
                        MHD_TCP_CORK_NOPUSH,

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



reply via email to

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