X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavutil%2Flzo.c;h=364230810024ae0d710895115691edb606099da6;hb=b5a69e79c579e6e15e2019ffd34ef0e09aeab586;hp=b3c69cf0c5332a0c42c036fb4b0251e6c7724082;hpb=28dff061767727ecf98335fe2814c06297723fde;p=ffmpeg diff --git a/libavutil/lzo.c b/libavutil/lzo.c index b3c69cf0c53..36423081002 100644 --- a/libavutil/lzo.c +++ b/libavutil/lzo.c @@ -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