From 14f02a946b875459db8b4290d316e7a99c6d9f75 Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Sun, 25 Aug 2019 10:25:22 +0200 Subject: Propperly set errno in read_inode_slink error path Signed-off-by: David Oberhollenzer --- lib/sqfs/read_inode.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/sqfs') diff --git a/lib/sqfs/read_inode.c b/lib/sqfs/read_inode.c index e4b4dfa..18d71b8 100644 --- a/lib/sqfs/read_inode.c +++ b/lib/sqfs/read_inode.c @@ -12,6 +12,7 @@ #include #include #include +#include #define SWAB16(x) x = le16toh(x) #define SWAB32(x) x = le32toh(x) @@ -169,6 +170,7 @@ static sqfs_inode_generic_t *read_inode_slink(meta_reader_t *ir, if (SZ_ADD_OV(slink.target_size, 1, &size) || SZ_ADD_OV(sizeof(*out), size, &size)) { + errno = EOVERFLOW; goto fail; } -- cgit v1.2.3