projects
/
emacs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
573dde7
)
Fix use-after-close in connect_network_socket
author
Paul Eggert
<eggert@cs.ucla.edu>
Tue, 2 Aug 2016 07:31:04 +0000
(
03:31
-0400)
committer
Paul Eggert
<eggert@cs.ucla.edu>
Tue, 2 Aug 2016 07:31:26 +0000
(
03:31
-0400)
* 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
patch
|
blob
|
history
diff --git
a/src/process.c
b/src/process.c
index bc2ac451c9df6e742d9beedac2873c254eb67e25..5e48e4348fe6f47a8a2654617a552155dff83702 100644
(file)
--- 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