summaryrefslogtreecommitdiffstats
path: root/lib/libarchive
diff options
context:
space:
mode:
authorcperciva <cperciva@FreeBSD.org>2008-05-19 18:06:48 +0000
committercperciva <cperciva@FreeBSD.org>2008-05-19 18:06:48 +0000
commita13d33881dcb5be5c8826d3c8414aab9dafb0728 (patch)
treefeff68933b9b0d0509aaa2f6ba5d4de1ff548ee6 /lib/libarchive
parentc642b1626b4e842603171d6f31e71e9f4b70b8b2 (diff)
downloadFreeBSD-src-a13d33881dcb5be5c8826d3c8414aab9dafb0728.zip
FreeBSD-src-a13d33881dcb5be5c8826d3c8414aab9dafb0728.tar.gz
Return ARCHIVE_FATAL if we can't allocate memory instead of going ahead and
dereferencing NULL. Found by: Coverity Prevent
Diffstat (limited to 'lib/libarchive')
-rw-r--r--lib/libarchive/archive_read_support_format_mtree.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/libarchive/archive_read_support_format_mtree.c b/lib/libarchive/archive_read_support_format_mtree.c
index fc806a5..01d5a32 100644
--- a/lib/libarchive/archive_read_support_format_mtree.c
+++ b/lib/libarchive/archive_read_support_format_mtree.c
@@ -596,6 +596,7 @@ read_data(struct archive_read *a, const void **buff, size_t *size, off_t *offset
archive_set_error(&a->archive, ENOMEM,
"Can't allocate memory");
}
+ return (ARCHIVE_FATAL);
}
*buff = mtree->buff;
OpenPOWER on IntegriCloud