Return ARCHIVE_FATAL if we can't allocate memory instead of going ahead and
dereferencing NULL. Found by: Coverity Prevent
This commit is contained in:
parent
47dbd0cfbc
commit
ee99deabac
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=179125
@ -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,
|
archive_set_error(&a->archive, ENOMEM,
|
||||||
"Can't allocate memory");
|
"Can't allocate memory");
|
||||||
}
|
}
|
||||||
|
return (ARCHIVE_FATAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
*buff = mtree->buff;
|
*buff = mtree->buff;
|
||||||
|
Loading…
Reference in New Issue
Block a user