Fixes: CID1452579 Argument cannot be negative
Signed-off-by: Michael Niedermayer <[email protected]>
---
tools/cws2fws.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/tools/cws2fws.c b/tools/cws2fws.c
index 7046b69957..9ce321fe20 100644
--- a/tools/cws2fws.c
+++ b/tools/cws2fws.c
@@ -89,6 +89,12 @@ int main(int argc, char *argv[])
for (i = 0; i < comp_len - 8;) {
int ret, len = read(fd_in, &buf_in, 1024);
+ if (len == -1) {
+ printf("read failure\n");
+ inflateEnd(&zstream);
+ goto out;
+ }
+
dbgprintf("read %d bytes\n", len);
last_out = zstream.total_out;
--
2.17.1
_______________________________________________
ffmpeg-devel mailing list
[email protected]
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
[email protected] with subject "unsubscribe".