From 6f1f88224c62dfb7b311dc1a57db267d118cae5c Mon Sep 17 00:00:00 2001 From: Philipp Stephani Date: Sat, 20 May 2017 16:57:58 +0200 Subject: [PATCH] Avoid uninitialized read * src/nsterm.m (ns_read_socket): Don't read uninitialized variable 'nevents'. --- src/nsterm.m | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/nsterm.m b/src/nsterm.m index c8320130a87..e69aa43dd37 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -4261,6 +4261,8 @@ ns_read_socket (struct terminal *terminal, struct input_event *hold_quit) q_event_ptr = NULL; unblock_input (); } + else + return -1; return nevents; } -- 2.39.2