libavcodec/ra288.c:197: error: Null Dereference
  pointer `&gb->buffer` last assigned on line 194 could be null and is dereferenced by call to `get_bits()` at line 197, column 31.

libavcodec/ra288.c:175:1: start of procedure ra288_decode_frame()
173. }
174. 
175. static int ra288_decode_frame(AVCodecContext * avctx, void *data,
     ^
176.                               int *data_size, const uint8_t * buf,
177.                               int buf_size)

libavcodec/ra288.c:179:5: 
177.                               int buf_size)
178. {
179.     float *out = data;
         ^
180.     int i, j;
181.     RA288Context *ractx = avctx->priv_data;

libavcodec/ra288.c:181:5: 
179.     float *out = data;
180.     int i, j;
181.     RA288Context *ractx = avctx->priv_data;
         ^
182.     GetBitContext gb;
183. 

libavcodec/ra288.c:184:9: Taking false branch
182.     GetBitContext gb;
183. 
184.     if (buf_size < avctx->block_align) {
             ^
185.         av_log(avctx, AV_LOG_ERROR,
186.                "Error! Input buffer is too small [%d<%d]\n",

libavcodec/ra288.c:191:9: Taking false branch
189.     }
190. 
191.     if (*data_size < 32*5*4)
             ^
192.         return -1;
193. 

libavcodec/ra288.c:194:5: 
192.         return -1;
193. 
194.     init_get_bits(&gb, buf, avctx->block_align * 8);
         ^
195. 
196.     for (i=0; i < 32; i++) {

libavcodec/bitstream.h:745:1: start of procedure init_get_bits()
  743.  * @param bit_size the size of the buffer in bits
  744.  */
  745. static inline void init_get_bits(GetBitContext *s,
       ^
  746.                    const uint8_t *buffer, int bit_size)
  747. {

libavcodec/bitstream.h:748:5: 
  746.                    const uint8_t *buffer, int bit_size)
  747. {
  748.     int buffer_size= (bit_size+7)>>3;
           ^
  749.     if(buffer_size < 0 || bit_size < 0) {
  750.         buffer_size = bit_size = 0;

libavcodec/bitstream.h:749:8: Taking true branch
  747. {
  748.     int buffer_size= (bit_size+7)>>3;
  749.     if(buffer_size < 0 || bit_size < 0) {
              ^
  750.         buffer_size = bit_size = 0;
  751.         buffer = NULL;

libavcodec/bitstream.h:750:9: 
  748.     int buffer_size= (bit_size+7)>>3;
  749.     if(buffer_size < 0 || bit_size < 0) {
  750.         buffer_size = bit_size = 0;
               ^
  751.         buffer = NULL;
  752.     }

libavcodec/bitstream.h:751:9: 
  749.     if(buffer_size < 0 || bit_size < 0) {
  750.         buffer_size = bit_size = 0;
  751.         buffer = NULL;
               ^
  752.     }
  753. 

libavcodec/bitstream.h:754:5: 
  752.     }
  753. 
  754.     s->buffer= buffer;
           ^
  755.     s->size_in_bits= bit_size;
  756.     s->buffer_end= buffer + buffer_size;

libavcodec/bitstream.h:755:5: 
  753. 
  754.     s->buffer= buffer;
  755.     s->size_in_bits= bit_size;
           ^
  756.     s->buffer_end= buffer + buffer_size;
  757. #ifdef ALT_BITSTREAM_READER

libavcodec/bitstream.h:756:5: 
  754.     s->buffer= buffer;
  755.     s->size_in_bits= bit_size;
  756.     s->buffer_end= buffer + buffer_size;
           ^
  757. #ifdef ALT_BITSTREAM_READER
  758.     s->index=0;

libavcodec/bitstream.h:758:5: 
  756.     s->buffer_end= buffer + buffer_size;
  757. #ifdef ALT_BITSTREAM_READER
  758.     s->index=0;
           ^
  759. #elif defined LIBMPEG2_BITSTREAM_READER
  760.     s->buffer_ptr = (uint8_t*)((intptr_t)buffer&(~1));

libavcodec/bitstream.h:768:1: return from a call to init_get_bits
  766.     skip_bits_long(s, 0);
  767. #endif
  768. }
       ^
  769. 
  770. static inline void align_get_bits(GetBitContext *s)

libavcodec/ra288.c:196:10: 
194.     init_get_bits(&gb, buf, avctx->block_align * 8);
195. 
196.     for (i=0; i < 32; i++) {
              ^
197.         float gain = amptable[get_bits(&gb, 3)];
198.         int cb_coef = get_bits(&gb, 6 + (i&1));

libavcodec/ra288.c:196:15: Loop condition is true. Entering loop body
194.     init_get_bits(&gb, buf, avctx->block_align * 8);
195. 
196.     for (i=0; i < 32; i++) {
                   ^
197.         float gain = amptable[get_bits(&gb, 3)];
198.         int cb_coef = get_bits(&gb, 6 + (i&1));

libavcodec/ra288.c:197:9: 
195. 
196.     for (i=0; i < 32; i++) {
197.         float gain = amptable[get_bits(&gb, 3)];
             ^
198.         int cb_coef = get_bits(&gb, 6 + (i&1));
199. 

libavcodec/bitstream.h:642:1: start of procedure get_bits()
  640.  * Note, the alt bitstream reader can read up to 25 bits, but the libmpeg2 reader can't
  641.  */
  642. static inline unsigned int get_bits(GetBitContext *s, int n){
       ^
  643.     register int tmp;
  644.     OPEN_READER(re, s)

libavcodec/bitstream.h:644:5: 
  642. static inline unsigned int get_bits(GetBitContext *s, int n){
  643.     register int tmp;
  644.     OPEN_READER(re, s)
           ^
  645.     UPDATE_CACHE(re, s)
  646.     tmp= SHOW_UBITS(re, s, n);

libavcodec/bitstream.h:645:5: 
  643.     register int tmp;
  644.     OPEN_READER(re, s)
  645.     UPDATE_CACHE(re, s)
           ^
  646.     tmp= SHOW_UBITS(re, s, n);
  647.     LAST_SKIP_BITS(re, s, n)

static int ra288_decode_frame(AVCodecContext * avctx, void *data,
                              int *data_size, const uint8_t * buf,
                              int buf_size)
{
    float *out = data;
    int i, j;
    RA288Context *ractx = avctx->priv_data;
    GetBitContext gb;
    if (buf_size < avctx->block_align) {
        av_log(avctx, AV_LOG_ERROR,
               "Error! Input buffer is too small [%d<%d]\n",
               buf_size, avctx->block_align);
        return 0;
    }
    if (*data_size < 32*5*4)
        return -1;
    init_get_bits(&gb, buf, avctx->block_align * 8);
    for (i=0; i < 32; i++) {
        float gain = amptable[get_bits(&gb, 3)];
        int cb_coef = get_bits(&gb, 6 + (i&1));
        decode(ractx, gain, cb_coef);
        for (j=0; j < 5; j++)
            *(out++) = ractx->sp_hist[70 + 36 + j];
        if ((i & 7) == 3) {
            backward_filter(ractx->sp_hist, ractx->sp_rec, syn_window,
                            ractx->sp_lpc, syn_bw_tab, 36, 40, 35, 70);
            backward_filter(ractx->gain_hist, ractx->gain_rec, gain_window,
                            ractx->gain_lpc, gain_bw_tab, 10, 8, 20, 28);
        }
    }
    *data_size = (char *)out - (char *)data;
    return avctx->block_align;
}
['static int ra288_decode_frame(AVCodecContext * avctx, void *data,\n                              int *data_size, const uint8_t * buf,\n                              int buf_size)\n{\n    float *out = data;\n    int i, j;\n    RA288Context *ractx = avctx->priv_data;\n    GetBitContext gb;\n    if (buf_size < avctx->block_align) {\n        av_log(avctx, AV_LOG_ERROR,\n               "Error! Input buffer is too small [%d<%d]\\n",\n               buf_size, avctx->block_align);\n        return 0;\n    }\n    if (*data_size < 32*5*4)\n        return -1;\n    init_get_bits(&gb, buf, avctx->block_align * 8);\n    for (i=0; i < 32; i++) {\n        float gain = amptable[get_bits(&gb, 3)];\n        int cb_coef = get_bits(&gb, 6 + (i&1));\n        decode(ractx, gain, cb_coef);\n        for (j=0; j < 5; j++)\n            *(out++) = ractx->sp_hist[70 + 36 + j];\n        if ((i & 7) == 3) {\n            backward_filter(ractx->sp_hist, ractx->sp_rec, syn_window,\n                            ractx->sp_lpc, syn_bw_tab, 36, 40, 35, 70);\n            backward_filter(ractx->gain_hist, ractx->gain_rec, gain_window,\n                            ractx->gain_lpc, gain_bw_tab, 10, 8, 20, 28);\n        }\n    }\n    *data_size = (char *)out - (char *)data;\n    return avctx->block_align;\n}', 'static inline void init_get_bits(GetBitContext *s,\n                   const uint8_t *buffer, int bit_size)\n{\n    int buffer_size= (bit_size+7)>>3;\n    if(buffer_size < 0 || bit_size < 0) {\n        buffer_size = bit_size = 0;\n        buffer = NULL;\n    }\n    s->buffer= buffer;\n    s->size_in_bits= bit_size;\n    s->buffer_end= buffer + buffer_size;\n#ifdef ALT_BITSTREAM_READER\n    s->index=0;\n#elif defined LIBMPEG2_BITSTREAM_READER\n    s->buffer_ptr = (uint8_t*)((intptr_t)buffer&(~1));\n    s->bit_count = 16 + 8*((intptr_t)buffer&1);\n    skip_bits_long(s, 0);\n#elif defined A32_BITSTREAM_READER\n    s->buffer_ptr = (uint32_t*)((intptr_t)buffer&(~3));\n    s->bit_count = 32 + 8*((intptr_t)buffer&3);\n    skip_bits_long(s, 0);\n#endif\n}', 'static inline unsigned int get_bits(GetBitContext *s, int n){\n    register int tmp;\n    OPEN_READER(re, s)\n    UPDATE_CACHE(re, s)\n    tmp= SHOW_UBITS(re, s, n);\n    LAST_SKIP_BITS(re, s, n)\n    CLOSE_READER(re, s)\n    return tmp;\n}']