Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefano Sabatini <stefasab@gmail.com>2012-09-08 02:31:41 +0400
committerStefano Sabatini <stefasab@gmail.com>2012-11-25 21:19:59 +0400
commit252746d052652b48f7bc0652e7c1601b1e997d9c (patch)
tree2c8b3a0dc17251eb033918222dd9232bb14e2f3c /libavutil/imgutils.h
parent26c531cc223d5ac6e5fd78f2364247a3d902b946 (diff)
lavu/imgutils: add consistency checks to av_image_copy_plane()
Add assertions and abort in case of invalid |dst_linesize| < bytewidth or |src_linesize| < bytewidth. Avoid to silently corrupt memory.
Diffstat (limited to 'libavutil/imgutils.h')
-rw-r--r--libavutil/imgutils.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavutil/imgutils.h b/libavutil/imgutils.h
index a9317a71e1..ab32d667d3 100644
--- a/libavutil/imgutils.h
+++ b/libavutil/imgutils.h
@@ -99,6 +99,9 @@ int av_image_alloc(uint8_t *pointers[4], int linesizes[4],
* 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
*/