aboutsummaryrefslogtreecommitdiff
path: root/lib/tar/src/read_sparse_map_new.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/tar/src/read_sparse_map_new.c')
-rw-r--r--lib/tar/src/read_sparse_map_new.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/tar/src/read_sparse_map_new.c b/lib/tar/src/read_sparse_map_new.c
index 4e317a8..e42466c 100644
--- a/lib/tar/src/read_sparse_map_new.c
+++ b/lib/tar/src/read_sparse_map_new.c
@@ -42,8 +42,10 @@ sparse_map_t *read_gnu_new_sparse(sqfs_istream_t *fp, tar_header_decoded_t *out)
goto fail_format;
ret = sqfs_istream_read(fp, buffer, 512);
- if (ret < 0)
+ if (ret < 0) {
+ sqfs_perror(fp->get_filename(fp), "reading sparse list", ret);
goto fail;
+ }
if (ret < 512)
goto fail_format;
@@ -69,8 +71,11 @@ sparse_map_t *read_gnu_new_sparse(sqfs_istream_t *fp, tar_header_decoded_t *out)
goto fail_format;
ret = sqfs_istream_read(fp, buffer + 512, 512);
- if (ret < 0)
+ if (ret < 0) {
+ sqfs_perror(fp->get_filename(fp),
+ "reading sparse list", ret);
goto fail;
+ }
if (ret < 512)
goto fail_format;