提交 0afdedca 编写于 作者: M Mathieu Malaterre 提交者: Benoit Fouet

Fix a potential out of array writing.

Patch by Mathieu Malaterre mathieu malaterre gmail com

Originally committed as revision 14487 to svn://svn.ffmpeg.org/ffmpeg/trunk
上级 ce1ee094
......@@ -70,9 +70,9 @@ int ff_rle_encode(uint8_t *outbuf, int out_size, const uint8_t *ptr , int bpp, i
} else {
/* fall back on uncompressed */
count = count_pixels(ptr, w-x, bpp, 0);
if(out + bpp*count >= outbuf + out_size) return -1;
*out++ = (count ^ xor_raw) + add_raw;
if(out + bpp*count > outbuf + out_size) return -1;
memcpy(out, ptr, bpp * count);
out += bpp * count;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册