changeset 4448:2dd1ace1919c libavcodec

Remove boundary checks that are actually done "well enough" in copy function
author reimar
date Wed, 31 Jan 2007 20:57:30 +0000
parents ed710b7b5f72
children cb49f6384eb5
files lzo.c
diffstat 1 files changed, 1 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/lzo.c	Wed Jan 31 20:26:32 2007 +0000
+++ b/lzo.c	Wed Jan 31 20:57:30 2007 +0000
@@ -213,10 +213,6 @@
                 cnt = get_len(&c, x, 15);
                 copy(&c, cnt + 3);
                 x = GETB(c);
-                if (c.in > c.in_end) {
-                    c.error |= LZO_INPUT_DEPLETED;
-                    continue;
-                }
                 if (x > 15)
                     continue;
                 cnt = 1;
@@ -228,11 +224,8 @@
         copy_backptr(&c, back, cnt + 2);
         state=
         cnt = x & 3;
-        if (cnt)
-            copy(&c, cnt);
+        copy(&c, cnt);
         x = GETB(c);
-        if (c.in > c.in_end)
-            c.error |= LZO_INPUT_DEPLETED;
     }
     *inlen = c.in_end - c.in;
     if (c.in > c.in_end)