diff options
author | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2019-08-25 10:25:22 +0200 |
---|---|---|
committer | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2019-08-25 13:47:25 +0200 |
commit | 14f02a946b875459db8b4290d316e7a99c6d9f75 (patch) | |
tree | a5efb7fcdfda520632d7ac0e93dc36178d28cd76 /lib | |
parent | d3e387eb9c38650a0698bbaf39a0621027f92c45 (diff) |
Propperly set errno in read_inode_slink error path
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/sqfs/read_inode.c | 2 |
1 files changed, 2 insertions, 0 deletions
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 <sys/stat.h> #include <stdlib.h> #include <stdio.h> +#include <errno.h> #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; } |