Add assertions and abort in case of invalid |dst_linesize| < bytewidth or
|src_linesize| < bytewidth.
Avoid to silently corrupt memory.
* misc image utilities
*/
+#include "avassert.h"
#include "common.h"
#include "imgutils.h"
#include "internal.h"
{
if (!dst || !src)
return;
+ av_assert0(abs(src_linesize) >= bytewidth);
+ av_assert0(abs(dst_linesize) >= bytewidth);
for (;height > 0; height--) {
memcpy(dst, src, bytewidth);
dst += dst_linesize;
* The first byte of each successive line is separated by *_linesize
* bytes.
*
+ * bytewidth must be contained by both absolute values of dst_linesize
+ * and src_linesize, otherwise the function behavior is undefined.
+ *
* @param dst_linesize linesize for the image plane in dst
* @param src_linesize linesize for the image plane in src
*/
#define LIBAVUTIL_VERSION_MAJOR 52
#define LIBAVUTIL_VERSION_MINOR 9
-#define LIBAVUTIL_VERSION_MICRO 100
+#define LIBAVUTIL_VERSION_MICRO 101
#define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \
LIBAVUTIL_VERSION_MINOR, \