Signed-off-by: Denis 'GNUtoo' Carikli <[email protected]>
---
 samsung-ipc/ipc.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/samsung-ipc/ipc.c b/samsung-ipc/ipc.c
index 2512d29..39caf0b 100644
--- a/samsung-ipc/ipc.c
+++ b/samsung-ipc/ipc.c
@@ -68,6 +68,8 @@ int ipc_device_detect(void)
         goto error;
 
     length = read(fd, &buffer, sizeof(buffer));
+    if (length == -1)
+      goto error;
 
     close(fd);
 
-- 
2.25.0

_______________________________________________
Replicant mailing list
[email protected]
https://lists.osuosl.org/mailman/listinfo/replicant

Reply via email to