[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 5391761: Fix use-after-close in connect_network_soc
From: |
Paul Eggert |
Subject: |
[Emacs-diffs] master 5391761: Fix use-after-close in connect_network_socket |
Date: |
Tue, 2 Aug 2016 07:31:30 +0000 (UTC) |
branch: master
commit 53917616b0aca43b9ca85531d4dcb426885bdb73
Author: Paul Eggert <address@hidden>
Commit: Paul Eggert <address@hidden>
Fix use-after-close in connect_network_socket
* src/process.c (connect_network_socket):
Reverse sense of previous fix. Problem reported by Ken Brown in:
http://lists.gnu.org/archive/html/emacs-devel/2016-08/msg00004.html
---
src/process.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/process.c b/src/process.c
index bc2ac45..5e48e43 100644
--- a/src/process.c
+++ b/src/process.c
@@ -3185,7 +3185,7 @@ connect_network_socket (Lisp_Object proc, Lisp_Object
addrinfos,
xerrno = errno;
emacs_close (s);
s = -1;
- if (socket_to_use < 0)
+ if (0 <= socket_to_use)
break;
continue;
}
@@ -3314,7 +3314,7 @@ connect_network_socket (Lisp_Object proc, Lisp_Object
addrinfos,
specpdl_ptr = specpdl + count1;
emacs_close (s);
s = -1;
- if (socket_to_use < 0)
+ if (0 <= socket_to_use)
break;
#ifdef WINDOWSNT
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master 5391761: Fix use-after-close in connect_network_socket,
Paul Eggert <=