Commit 59eae884 authored by Michael Niedermayer's avatar Michael Niedermayer

cws2fws: check inflateInit return value

Fixes CID733722
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent adc61d68
...@@ -79,7 +79,10 @@ int main(int argc, char *argv[]) ...@@ -79,7 +79,10 @@ int main(int argc, char *argv[])
zstream.zalloc = NULL; zstream.zalloc = NULL;
zstream.zfree = NULL; zstream.zfree = NULL;
zstream.opaque = 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;) { for (i = 0; i < comp_len - 8;) {
int ret, len = read(fd_in, &buf_in, 1024); int ret, len = read(fd_in, &buf_in, 1024);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment