libavcodec/escape130.c:237: error: Null Dereference
  pointer `&gb->buffer` last assigned on line 218 could be null and is dereferenced by call to `decode_skip_count()` at line 237, column 20.

libavcodec/escape130.c:188:1: start of procedure escape130_decode_frame()
186. }
187. 
188. static int escape130_decode_frame(AVCodecContext *avctx, void *data,
     ^
189.                                   int *got_frame, AVPacket *avpkt)
190. {

libavcodec/escape130.c:191:5: 
189.                                   int *got_frame, AVPacket *avpkt)
190. {
191.     const uint8_t *buf  = avpkt->data;
         ^
192.     int buf_size        = avpkt->size;
193.     Escape130Context *s = avctx->priv_data;

libavcodec/escape130.c:192:5: 
190. {
191.     const uint8_t *buf  = avpkt->data;
192.     int buf_size        = avpkt->size;
         ^
193.     Escape130Context *s = avctx->priv_data;
194.     AVFrame *pic        = data;

libavcodec/escape130.c:193:5: 
191.     const uint8_t *buf  = avpkt->data;
192.     int buf_size        = avpkt->size;
193.     Escape130Context *s = avctx->priv_data;
         ^
194.     AVFrame *pic        = data;
195.     GetBitContext gb;

libavcodec/escape130.c:194:5: 
192.     int buf_size        = avpkt->size;
193.     Escape130Context *s = avctx->priv_data;
194.     AVFrame *pic        = data;
         ^
195.     GetBitContext gb;
196.     int ret;

libavcodec/escape130.c:203:5: 
201.     unsigned old_y_stride, old_cb_stride, old_cr_stride,
202.              new_y_stride, new_cb_stride, new_cr_stride;
203.     unsigned total_blocks = avctx->width * avctx->height / 4,
         ^
204.              block_index, block_x = 0;
205.     unsigned y[4] = { 0 }, cb = 0x10, cr = 0x10;

libavcodec/escape130.c:205:5: 
203.     unsigned total_blocks = avctx->width * avctx->height / 4,
204.              block_index, block_x = 0;
205.     unsigned y[4] = { 0 }, cb = 0x10, cr = 0x10;
         ^
206.     int skip = -1, y_avg = 0, i, j;
207.     uint8_t *ya = s->old_y_avg;

libavcodec/escape130.c:206:5: 
204.              block_index, block_x = 0;
205.     unsigned y[4] = { 0 }, cb = 0x10, cr = 0x10;
206.     int skip = -1, y_avg = 0, i, j;
         ^
207.     uint8_t *ya = s->old_y_avg;
208. 

libavcodec/escape130.c:207:5: 
205.     unsigned y[4] = { 0 }, cb = 0x10, cr = 0x10;
206.     int skip = -1, y_avg = 0, i, j;
207.     uint8_t *ya = s->old_y_avg;
         ^
208. 
209.     // first 16 bytes are header; no useful information in here

libavcodec/escape130.c:210:9: Taking false branch
208. 
209.     // first 16 bytes are header; no useful information in here
210.     if (buf_size <= 16) {
             ^
211.         av_log(avctx, AV_LOG_ERROR, "Insufficient frame data\n");
212.         return AVERROR_INVALIDDATA;

libavcodec/escape130.c:215:9: Taking false branch
213.     }
214. 
215.     if ((ret = ff_get_buffer(avctx, pic, 0)) < 0)
             ^
216.         return ret;
217. 

libavcodec/escape130.c:218:5: 
216.         return ret;
217. 
218.     init_get_bits(&gb, buf + 16, (buf_size - 16) * 8);
         ^
219. 
220.     new_y  = s->new_y;

libavcodec/get_bits.h:375:1: start of procedure init_get_bits()
  373.  * @return 0 on success, AVERROR_INVALIDDATA if the buffer_size would overflow.
  374.  */
  375. static inline int init_get_bits(GetBitContext *s, const uint8_t *buffer,
       ^
  376.                                 int bit_size)
  377. {

libavcodec/get_bits.h:379:5: 
  377. {
  378.     int buffer_size;
  379.     int ret = 0;
           ^
  380. 
  381.     if (bit_size > INT_MAX - 7 || bit_size < 0 || !buffer) {

libavcodec/get_bits.h:381:9: Taking true branch
  379.     int ret = 0;
  380. 
  381.     if (bit_size > INT_MAX - 7 || bit_size < 0 || !buffer) {
               ^
  382.         buffer_size = bit_size = 0;
  383.         buffer      = NULL;

libavcodec/get_bits.h:382:9: 
  380. 
  381.     if (bit_size > INT_MAX - 7 || bit_size < 0 || !buffer) {
  382.         buffer_size = bit_size = 0;
               ^
  383.         buffer      = NULL;
  384.         ret         = AVERROR_INVALIDDATA;

libavcodec/get_bits.h:383:9: 
  381.     if (bit_size > INT_MAX - 7 || bit_size < 0 || !buffer) {
  382.         buffer_size = bit_size = 0;
  383.         buffer      = NULL;
               ^
  384.         ret         = AVERROR_INVALIDDATA;
  385.     }

libavcodec/get_bits.h:384:9: 
  382.         buffer_size = bit_size = 0;
  383.         buffer      = NULL;
  384.         ret         = AVERROR_INVALIDDATA;
               ^
  385.     }
  386. 

libavcodec/get_bits.h:387:5: 
  385.     }
  386. 
  387.     buffer_size = (bit_size + 7) >> 3;
           ^
  388. 
  389.     s->buffer             = buffer;

libavcodec/get_bits.h:389:5: 
  387.     buffer_size = (bit_size + 7) >> 3;
  388. 
  389.     s->buffer             = buffer;
           ^
  390.     s->size_in_bits       = bit_size;
  391. #if !UNCHECKED_BITSTREAM_READER

libavcodec/get_bits.h:390:5: 
  388. 
  389.     s->buffer             = buffer;
  390.     s->size_in_bits       = bit_size;
           ^
  391. #if !UNCHECKED_BITSTREAM_READER
  392.     s->size_in_bits_plus8 = bit_size + 8;

libavcodec/get_bits.h:392:5: 
  390.     s->size_in_bits       = bit_size;
  391. #if !UNCHECKED_BITSTREAM_READER
  392.     s->size_in_bits_plus8 = bit_size + 8;
           ^
  393. #endif
  394.     s->buffer_end         = buffer + buffer_size;

libavcodec/get_bits.h:394:5: 
  392.     s->size_in_bits_plus8 = bit_size + 8;
  393. #endif
  394.     s->buffer_end         = buffer + buffer_size;
           ^
  395.     s->index              = 0;
  396. 

libavcodec/get_bits.h:395:5: 
  393. #endif
  394.     s->buffer_end         = buffer + buffer_size;
  395.     s->index              = 0;
           ^
  396. 
  397.     return ret;

libavcodec/get_bits.h:397:5: 
  395.     s->index              = 0;
  396. 
  397.     return ret;
           ^
  398. }
  399. 

libavcodec/get_bits.h:398:1: return from a call to init_get_bits
  396. 
  397.     return ret;
  398. }
       ^
  399. 
  400. /**

libavcodec/escape130.c:220:5: 
218.     init_get_bits(&gb, buf + 16, (buf_size - 16) * 8);
219. 
220.     new_y  = s->new_y;
         ^
221.     new_cb = s->new_u;
222.     new_cr = s->new_v;

libavcodec/escape130.c:221:5: 
219. 
220.     new_y  = s->new_y;
221.     new_cb = s->new_u;
         ^
222.     new_cr = s->new_v;
223.     new_y_stride  = s->linesize[0];

libavcodec/escape130.c:222:5: 
220.     new_y  = s->new_y;
221.     new_cb = s->new_u;
222.     new_cr = s->new_v;
         ^
223.     new_y_stride  = s->linesize[0];
224.     new_cb_stride = s->linesize[1];

libavcodec/escape130.c:223:5: 
221.     new_cb = s->new_u;
222.     new_cr = s->new_v;
223.     new_y_stride  = s->linesize[0];
         ^
224.     new_cb_stride = s->linesize[1];
225.     new_cr_stride = s->linesize[2];

libavcodec/escape130.c:224:5: 
222.     new_cr = s->new_v;
223.     new_y_stride  = s->linesize[0];
224.     new_cb_stride = s->linesize[1];
         ^
225.     new_cr_stride = s->linesize[2];
226.     old_y  = s->old_y;

libavcodec/escape130.c:225:5: 
223.     new_y_stride  = s->linesize[0];
224.     new_cb_stride = s->linesize[1];
225.     new_cr_stride = s->linesize[2];
         ^
226.     old_y  = s->old_y;
227.     old_cb = s->old_u;

libavcodec/escape130.c:226:5: 
224.     new_cb_stride = s->linesize[1];
225.     new_cr_stride = s->linesize[2];
226.     old_y  = s->old_y;
         ^
227.     old_cb = s->old_u;
228.     old_cr = s->old_v;

libavcodec/escape130.c:227:5: 
225.     new_cr_stride = s->linesize[2];
226.     old_y  = s->old_y;
227.     old_cb = s->old_u;
         ^
228.     old_cr = s->old_v;
229.     old_y_stride  = s->linesize[0];

libavcodec/escape130.c:228:5: 
226.     old_y  = s->old_y;
227.     old_cb = s->old_u;
228.     old_cr = s->old_v;
         ^
229.     old_y_stride  = s->linesize[0];
230.     old_cb_stride = s->linesize[1];

libavcodec/escape130.c:229:5: 
227.     old_cb = s->old_u;
228.     old_cr = s->old_v;
229.     old_y_stride  = s->linesize[0];
         ^
230.     old_cb_stride = s->linesize[1];
231.     old_cr_stride = s->linesize[2];

libavcodec/escape130.c:230:5: 
228.     old_cr = s->old_v;
229.     old_y_stride  = s->linesize[0];
230.     old_cb_stride = s->linesize[1];
         ^
231.     old_cr_stride = s->linesize[2];
232. 

libavcodec/escape130.c:231:5: 
229.     old_y_stride  = s->linesize[0];
230.     old_cb_stride = s->linesize[1];
231.     old_cr_stride = s->linesize[2];
         ^
232. 
233.     for (block_index = 0; block_index < total_blocks; block_index++) {

libavcodec/escape130.c:233:10: 
231.     old_cr_stride = s->linesize[2];
232. 
233.     for (block_index = 0; block_index < total_blocks; block_index++) {
              ^
234.         // Note that this call will make us skip the rest of the blocks
235.         // if the frame ends prematurely.

libavcodec/escape130.c:233:27: Loop condition is true. Entering loop body
231.     old_cr_stride = s->linesize[2];
232. 
233.     for (block_index = 0; block_index < total_blocks; block_index++) {
                               ^
234.         // Note that this call will make us skip the rest of the blocks
235.         // if the frame ends prematurely.

libavcodec/escape130.c:236:13: Taking true branch
234.         // Note that this call will make us skip the rest of the blocks
235.         // if the frame ends prematurely.
236.         if (skip == -1)
                 ^
237.             skip = decode_skip_count(&gb);
238.         if (skip == -1) {

libavcodec/escape130.c:237:13: 
235.         // if the frame ends prematurely.
236.         if (skip == -1)
237.             skip = decode_skip_count(&gb);
                 ^
238.         if (skip == -1) {
239.             av_log(avctx, AV_LOG_ERROR, "Error decoding skip value\n");

libavcodec/escape130.c:165:1: start of procedure decode_skip_count()
  163. }
  164. 
  165. static int decode_skip_count(GetBitContext* gb)
       ^
  166. {
  167.     int value;

libavcodec/escape130.c:169:5: 
  167.     int value;
  168. 
  169.     value = get_bits1(gb);
           ^
  170.     if (value)
  171.         return 0;

libavcodec/get_bits.h:271:1: start of procedure get_bits1()
    269. }
    270. 
    271. static inline unsigned int get_bits1(GetBitContext *s)
         ^
    272. {
    273.     unsigned int index = s->index;

libavcodec/get_bits.h:273:5: 
    271. static inline unsigned int get_bits1(GetBitContext *s)
    272. {
    273.     unsigned int index = s->index;
             ^
    274.     uint8_t result     = s->buffer[index >> 3];
    275. #ifdef BITSTREAM_READER_LE

libavcodec/get_bits.h:274:5: 
    272. {
    273.     unsigned int index = s->index;
    274.     uint8_t result     = s->buffer[index >> 3];
             ^
    275. #ifdef BITSTREAM_READER_LE
    276.     result >>= index & 7;
