diff options
-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; } |