libavcodec/g722enc.c:194: error: Buffer Overrun L2
  Offset: [1+min(22, `c->prev_samples_pos`), 1+max(1023, `c->prev_samples_pos`)] Size: 1024 by call to `filter_samples`.

libavcodec/g722enc.c:163:1: Parameter `c->prev_samples_pos`
161. }
162. 
163. static void g722_encode_trellis(G722Context *c, int trellis,
     ^
164.                                 uint8_t *dst, int nb_samples,
165.                                 const int16_t *samples)

libavcodec/g722enc.c:194:9: Call
192.         }
193. 
194.         filter_samples(c, &samples[2*i], &xlow, &xhigh);
             ^
195. 
196.         for (j = 0; j < frontier && nodes[0][j]; j++) {

libavcodec/g722enc.c:124:1: <Offset trace>
122. };
123. 
124. static inline void filter_samples(G722Context *c, const int16_t *samples,
     ^
125.                                   int *xlow, int *xhigh)
126. {

libavcodec/g722enc.c:124:1: Parameter `c->prev_samples_pos`
  122. };
  123. 
  124. static inline void filter_samples(G722Context *c, const int16_t *samples,
       ^
  125.                                   int *xlow, int *xhigh)
  126. {

libavcodec/g722enc.c:128:21: Assignment
  126. {
  127.     int xout1, xout2;
  128.     c->prev_samples[c->prev_samples_pos++] = samples[0];
                           ^
  129.     c->prev_samples[c->prev_samples_pos++] = samples[1];
  130.     ff_g722_apply_qmf(c->prev_samples + c->prev_samples_pos - 24, &xout1, &xout2);

libavcodec/g722enc.c:124:1: <Length trace>
122. };
123. 
124. static inline void filter_samples(G722Context *c, const int16_t *samples,
     ^
125.                                   int *xlow, int *xhigh)
126. {

libavcodec/g722enc.c:124:1: Parameter `c->prev_samples[*]`
  122. };
  123. 
  124. static inline void filter_samples(G722Context *c, const int16_t *samples,
       ^
  125.                                   int *xlow, int *xhigh)
  126. {

libavcodec/g722enc.c:129:5: Array access: Offset: [1+min(22, c->prev_samples_pos), 1+max(1023, c->prev_samples_pos)] Size: 1024 by call to `filter_samples` 
  127.     int xout1, xout2;
  128.     c->prev_samples[c->prev_samples_pos++] = samples[0];
  129.     c->prev_samples[c->prev_samples_pos++] = samples[1];
           ^
  130.     ff_g722_apply_qmf(c->prev_samples + c->prev_samples_pos - 24, &xout1, &xout2);
  131.     *xlow  = xout1 + xout2 >> 13;
