1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-26 19:01:44 +02:00

cws2fws: check inflateInit return value

Fixes CID733722
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2012-10-26 17:27:53 +02:00
parent adc61d68b0
commit 59eae88429

View File

@ -79,7 +79,10 @@ int main(int argc, char *argv[])
zstream.zalloc = NULL;
zstream.zfree = NULL;
zstream.opaque = NULL;
inflateInit(&zstream);
if (inflateInit(&zstream) != Z_OK) {
fprintf(stderr, "inflateInit failed\n");
return 1;
}
for (i = 0; i < comp_len - 8;) {
int ret, len = read(fd_in, &buf_in, 1024);