[git] GPGME - branch, master, updated. gpgme-1.6.0-167-g8173c4f

by Werner Koch cvs at cvs.gnupg.org
Tue Jun 14 08:40:13 CEST 2016


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GnuPG Made Easy".

The branch, master has been updated
       via  8173c4f1f8a145c4b1d454f6f05e26950e23d675 (commit)
      from  77d149e8614c381458e07808a7930ce3fb92cdc3 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 8173c4f1f8a145c4b1d454f6f05e26950e23d675
Author: Werner Koch <wk at gnupg.org>
Date:   Tue Jun 14 08:35:12 2016 +0200

    core: Make sure FD_SET is not used with an out of range fd.
    
    * src/posix-io.c (_gpgme_io_select): Check for FD out of range.
    --
    
    Signed-off-by: Werner Koch <wk at gnupg.org>

diff --git a/src/posix-io.c b/src/posix-io.c
index f336153..258e8ea 100644
--- a/src/posix-io.c
+++ b/src/posix-io.c
@@ -604,6 +604,12 @@ _gpgme_io_select (struct io_select_fd_s *fds, size_t nfds, int nonblock)
 	continue;
       if (fds[i].for_read)
 	{
+          if (fds[i].fd >= FD_SETSIZE)
+            {
+              TRACE_END (dbg_help, " -BAD- ]");
+              gpg_err_set_errno (EBADF);
+              return TRACE_SYSRES (-1);
+            }
 	  assert (!FD_ISSET (fds[i].fd, &readfds));
 	  FD_SET (fds[i].fd, &readfds);
 	  if (fds[i].fd > max_fd)
@@ -613,6 +619,12 @@ _gpgme_io_select (struct io_select_fd_s *fds, size_t nfds, int nonblock)
         }
       else if (fds[i].for_write)
 	{
+          if (fds[i].fd >= FD_SETSIZE)
+            {
+              TRACE_END (dbg_help, " -BAD- ]");
+              gpg_err_set_errno (EBADF);
+              return TRACE_SYSRES (-1);
+            }
 	  assert (!FD_ISSET (fds[i].fd, &writefds));
 	  FD_SET (fds[i].fd, &writefds);
 	  if (fds[i].fd > max_fd)

-----------------------------------------------------------------------

Summary of changes:
 src/posix-io.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)


hooks/post-receive
-- 
GnuPG Made Easy
http://git.gnupg.org




More information about the Gnupg-commits mailing list