Fixes: CID1551694 Use after free (false positive based on assuming that out == in and one is freed and one used)
Showing the changes to libavfilter (1 of 1 file). Show all
Unified · Split
| @@ -288,7 +288,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in) · 287 unmodified lines | ||
| 288 | 288 | const int width = s->planewidth[plane]; |
| 289 | 289 | |
| 290 | 290 | if (!(s->planes & (1 << plane))) { |
| 291 | − if (out != in) | |
| 291 | + if (out->data[plane] != in->data[plane]) | |
| 292 | 292 | av_image_copy_plane(out->data[plane], out->linesize[plane], |
| 293 | 293 | in->data[plane], in->linesize[plane], |
| 294 | 294 | width * ((s->depth + 7) / 8), height); |