diff options
author | Thierry Foucu <tfoucu@gmail.com> | 2011-11-18 17:36:50 -0800 |
---|---|---|
committer | Alex Converse <alex.converse@gmail.com> | 2011-11-18 17:42:49 -0800 |
commit | c693aa6f71b4f539cf9df67ba42f4b1932981687 (patch) | |
tree | 0b7d3642aad2327d93ee036a356a090ea8c725ed | |
parent | ff3755cbde9bdd2a4dc50e4432f72ddeef1a85ac (diff) | |
download | ffmpeg-streaming-c693aa6f71b4f539cf9df67ba42f4b1932981687.zip ffmpeg-streaming-c693aa6f71b4f539cf9df67ba42f4b1932981687.tar.gz |
imgutils: Fix illegal read.
Found with address sanitizer.
Signed-off-by: Alex Converse <alex.converse@gmail.com>
-rw-r--r-- | libavutil/imgutils.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavutil/imgutils.c b/libavutil/imgutils.c index 5cd71e2..b734db7 100644 --- a/libavutil/imgutils.c +++ b/libavutil/imgutils.c @@ -118,7 +118,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; |