From: Reimar Döffinger <[email protected]>

Treating them like 0 is safest, current code would invoke
undefined pointer arithmetic behaviour in this case.

Signed-off-by: Anton Khirnov <[email protected]>
---
 libavutil/lzo.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/libavutil/lzo.c b/libavutil/lzo.c
index 743d596..85b1f94 100644
--- a/libavutil/lzo.c
+++ b/libavutil/lzo.c
@@ -175,11 +175,11 @@ int av_lzo1x_decode(void *out, int *outlen, const void 
*in, int *inlen) {
     int state= 0;
     int x;
     LZOContext c;
-    if (!*outlen || !*inlen) {
+    if (*outlen <= 0 || *inlen <= 0) {
         int res = 0;
-        if (!*outlen)
+        if (*outlen <= 0)
             res |= AV_LZO_OUTPUT_FULL;
-        if (!*inlen)
+        if (*inlen <= 0)
             res |= AV_LZO_INPUT_DEPLETED;
         return res;
     }
-- 
1.7.7.1

_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to