From 443ad25e75a29d114bc6c7d34387e6ad1f873a81 Mon Sep 17 00:00:00 2001 From: Sebastian Leonhardt Date: Tue, 30 Jun 2020 18:05:26 +0200 Subject: [PATCH] plugin windows_lnk: fix missing return-on-error (found by peachy & clang's static analyzer) Change-Id: Idcc9b3bd0c3c1164892002b8f814d74b4a6b2a2d --- apps/plugins/windows_lnk.c | 1 + 1 file changed, 1 insertion(+) diff --git a/apps/plugins/windows_lnk.c b/apps/plugins/windows_lnk.c index 8b89f7f25b..93a423fefa 100644 --- a/apps/plugins/windows_lnk.c +++ b/apps/plugins/windows_lnk.c @@ -173,6 +173,7 @@ static bool extract_link_destination(const int fd, if (*link_flags & HAS_RELATIVE_PATH) { int ccount; r = read_word(fd, &ccount); + if (!r) return false; if (*link_flags & IS_UNICODE) { unsigned char utf16[4], utf8[10]; link_target[0] = '\0';