[Pkg-gnupg-commit] [gnupg2] 160/292: common: avoid segfault

Daniel Kahn Gillmor dkg at fifthhorseman.net
Mon Nov 21 06:31:37 UTC 2016


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

dkg pushed a commit to branch master
in repository gnupg2.

commit 3b5f5e0eb02ecbdcf59722755f22a9d2f88de6e6
Author: Daniel Kahn Gillmor <dkg at fifthhorseman.net>
Date:   Tue Oct 25 23:55:07 2016 -0400

    common: avoid segfault
    
    * common/sysutils.c (gnupg_inotify_watch_socket): return EINVAL if
      socket_name is NULL, rather than segfaulting
    --
    Signed-off-by: Daniel Kahn Gillmor <dkg at fifthhorseman.net>
---
 common/sysutils.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/common/sysutils.c b/common/sysutils.c
index ab2012c..ab3e1d6 100644
--- a/common/sysutils.c
+++ b/common/sysutils.c
@@ -987,6 +987,9 @@ gnupg_inotify_watch_socket (int *r_fd, const char *socket_name)
 
   *r_fd = -1;
 
+  if (!socket_name)
+    return gpg_error (GPG_ERR_EINVAL);
+
   fname = xtrystrdup (socket_name);
   if (!fname)
     return my_error_from_syserror ();

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-gnupg/gnupg2.git



More information about the Pkg-gnupg-commit mailing list