libavfilter/vf_pad.c:306: error: Buffer Overrun L3
  Offset: [-1, 3] Size: 4.

libavfilter/vf_pad.c:285:21: <Offset trace>
283. static int buffer_needs_copy(PadContext *s, AVFrame *frame, AVBufferRef *buf)
284. {
285.     int planes[4] = { -1, -1, -1, -1}, *p = planes;
                         ^
286.     int i, j;
287. 

libavfilter/vf_pad.c:285:21: Assignment
283. static int buffer_needs_copy(PadContext *s, AVFrame *frame, AVBufferRef *buf)
284. {
285.     int planes[4] = { -1, -1, -1, -1}, *p = planes;
                         ^
286.     int i, j;
287. 

libavfilter/vf_pad.c:283:1: <Length trace>
281. 
282. /* check whether each plane in this buffer can be padded without copying */
283. static int buffer_needs_copy(PadContext *s, AVFrame *frame, AVBufferRef *buf)
     ^
284. {
285.     int planes[4] = { -1, -1, -1, -1}, *p = planes;

libavfilter/vf_pad.c:283:1: Parameter `s->line_step[*]`
281. 
282. /* check whether each plane in this buffer can be padded without copying */
283. static int buffer_needs_copy(PadContext *s, AVFrame *frame, AVBufferRef *buf)
     ^
284. {
285.     int planes[4] = { -1, -1, -1, -1}, *p = planes;

libavfilter/vf_pad.c:306:48: Array access: Offset: [-1, 3] Size: 4
304.         /* amount of free space needed before the start and after the end
305.          * of the plane */
306.         ptrdiff_t req_start = (s->x >> hsub) * s->line_step[planes[i]] +
                                                    ^
307.                               (s->y >> vsub) * frame->linesize[planes[i]];
308.         ptrdiff_t req_end   = ((s->w - s->x - frame->width) >> hsub) *
