Skip to content
Snippets Groups Projects
Commit c693aa6f authored by Thierry Foucu's avatar Thierry Foucu Committed by Alex Converse
Browse files

imgutils: Fix illegal read.


Found with address sanitizer.

Signed-off-by: default avatarAlex Converse <alex.converse@gmail.com>
parent ff3755cb
Branches
Tags
No related merge requests found
...@@ -118,7 +118,7 @@ int av_image_fill_pointers(uint8_t *data[4], enum PixelFormat pix_fmt, int heigh ...@@ -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; has_plane[desc->comp[i].plane] = 1;
total_size = size[0]; 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; int h, s = (i == 1 || i == 2) ? desc->log2_chroma_h : 0;
data[i] = data[i-1] + size[i-1]; data[i] = data[i-1] + size[i-1];
h = (height + (1 << s) - 1) >> s; h = (height + (1 << s) - 1) >> s;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment