]> git.sesse.net Git - ffmpeg/blobdiff - libavutil/lzo.c
Merge remote-tracking branch 'qatar/master'
[ffmpeg] / libavutil / lzo.c
index b3c69cf0c5332a0c42c036fb4b0251e6c7724082..364230810024ae0d710895115691edb606099da6 100644 (file)
@@ -112,7 +112,7 @@ static inline void memcpy_backptr(uint8_t *dst, int back, int cnt);
 
 /**
  * @brief Copies previously decoded bytes to current position.
- * @param back how many bytes back we start
+ * @param back how many bytes back we start, must be > 0
  * @param cnt number of bytes to copy, must be >= 0
  *
  * cnt > back is valid, this will copy the bytes we just copied,
@@ -135,7 +135,7 @@ static inline void copy_backptr(LZOContext *c, int back, int cnt) {
 
 static inline void memcpy_backptr(uint8_t *dst, int back, int cnt) {
     const uint8_t *src = &dst[-back];
-    if (back == 1) {
+    if (back <= 1) {
         memset(dst, *src, cnt);
     } else {
 #ifdef OUTBUF_PADDED