mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-03 12:11:33 +01:00
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@fifthhorseman.net>
This commit is contained in:
parent
852b8f0b89
commit
3b5f5e0eb0
@ -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 ();
|
||||
|
Loading…
x
Reference in New Issue
Block a user