diff options
author | cperciva <cperciva@FreeBSD.org> | 2008-05-19 18:06:48 +0000 |
---|---|---|
committer | cperciva <cperciva@FreeBSD.org> | 2008-05-19 18:06:48 +0000 |
commit | a13d33881dcb5be5c8826d3c8414aab9dafb0728 (patch) | |
tree | feff68933b9b0d0509aaa2f6ba5d4de1ff548ee6 /lib | |
parent | c642b1626b4e842603171d6f31e71e9f4b70b8b2 (diff) | |
download | FreeBSD-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')
-rw-r--r-- | lib/libarchive/archive_read_support_format_mtree.c | 1 |
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; |