mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-11-28 15:32:45 +00:00
Merge r398 from libarchive.googlecode.com: Check that bidder
object was allocated before we try to use it.
This commit is contained in:
parent
c6b235629a
commit
74aced1051
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=189428
@ -109,13 +109,13 @@ archive_read_support_compression_program(struct archive *_a, const char *cmd)
|
|||||||
struct archive_read_filter_bidder *bidder = __archive_read_get_bidder(a);
|
struct archive_read_filter_bidder *bidder = __archive_read_get_bidder(a);
|
||||||
struct program_bidder *state;
|
struct program_bidder *state;
|
||||||
|
|
||||||
state = (struct program_bidder *)calloc(sizeof (*state), 1);
|
|
||||||
|
|
||||||
if (state == NULL)
|
|
||||||
return (ARCHIVE_FATAL);
|
|
||||||
if (bidder == NULL)
|
if (bidder == NULL)
|
||||||
return (ARCHIVE_FATAL);
|
return (ARCHIVE_FATAL);
|
||||||
|
|
||||||
|
state = (struct program_bidder *)calloc(sizeof (*state), 1);
|
||||||
|
if (state == NULL)
|
||||||
|
return (ARCHIVE_FATAL);
|
||||||
|
|
||||||
state->cmd = strdup(cmd);
|
state->cmd = strdup(cmd);
|
||||||
state->bid = INT_MAX;
|
state->bid = INT_MAX;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user