summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Leonhardt <sebastian.leonhardt@web.de>2020-06-30 18:05:26 +0200
committerSolomon Peachy <pizza@shaftnet.org>2020-07-07 02:36:33 +0000
commit443ad25e75a29d114bc6c7d34387e6ad1f873a81 (patch)
tree0165b833b23aa73e3b8cfae99d8445f639f11cc2
parent4fa57d766164e82e6b2ae6975b52981876be9393 (diff)
downloadrockbox-443ad25e75a29d114bc6c7d34387e6ad1f873a81.tar.gz
rockbox-443ad25e75a29d114bc6c7d34387e6ad1f873a81.zip
plugin windows_lnk: fix missing return-on-error
(found by peachy & clang's static analyzer) Change-Id: Idcc9b3bd0c3c1164892002b8f814d74b4a6b2a2d
-rw-r--r--apps/plugins/windows_lnk.c1
1 files changed, 1 insertions, 0 deletions
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';