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:
authorThierry Foucu <tfoucu@gmail.com>2011-11-19 05:36:50 +0400
committerReinhard Tartler <siretart@tauware.de>2011-12-04 12:18:17 +0400
commit28acce2861a07b6b78204a2cbc90bbdeed285405 (patch)
tree165953e3d7e1bd3aaa34b362346b8de2b752ab53
parent73472053516f82b7d273a3d42c583f894077a191 (diff)
imgutils: Fix illegal read.
Found with address sanitizer. Signed-off-by: Alex Converse <alex.converse@gmail.com> (cherry picked from commit c693aa6f71b4f539cf9df67ba42f4b1932981687) Signed-off-by: Reinhard Tartler <siretart@tauware.de>
-rw-r--r--libavutil/imgutils.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavutil/imgutils.c b/libavutil/imgutils.c
index 46853cafcb..9dc4f01078 100644
--- a/libavutil/imgutils.c
+++ b/libavutil/imgutils.c
@@ -117,7 +117,7 @@ int av_image_fill_pointers(uint8_t *data[4], enum PixelFormat pix_fmt, int heigh
has_plane[desc->comp[i].plane] = 1;
total_size = size[0];
- for (i = 1; has_plane[i] && i < 4; i++) {
+ for (i = 1; i < 4 && has_plane[i]; i++) {
int h, s = (i == 1 || i == 2) ? desc->log2_chroma_h : 0;
data[i] = data[i-1] + size[i-1];
h = (height + (1 << s) - 1) >> s;