lzo: fix memcpy_backptr() with 0 offset
authorMichael Niedermayer <michaelni@gmx.at>
Sat, 24 Dec 2011 02:55:58 +0000 (03:55 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Tue, 3 Jan 2012 21:30:25 +0000 (22:30 +0100)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 58c41799ab6b52df86b6afe23304f34b62741326)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavutil/lzo.c

index b3c69cf..0b9d2e4 100644 (file)
@@ -137,7 +137,7 @@ static inline void memcpy_backptr(uint8_t *dst, int back, int cnt) {
     const uint8_t *src = &dst[-back];
     if (back == 1) {
         memset(dst, *src, cnt);
-    } else {
+    } else if(back>0) {
 #ifdef OUTBUF_PADDED
         COPY2(dst, src);
         COPY2(dst + 2, src + 2);