libavcodec/aacdec.c:480: error: Null Dereference
  pointer `&gb->buffer` last assigned on line 464 could be null and is dereferenced by call to `decode_ga_specific_config()` at line 480, column 13.

libavcodec/aacdec.c:456:1: start of procedure decode_audio_specific_config()
454.  * @return  Returns error status or number of consumed bits. <0 - error
455.  */
456. static int decode_audio_specific_config(AACContext *ac,
     ^
457.                                         AVCodecContext *avctx,
458.                                         MPEG4AudioConfig *m4ac,

libavcodec/aacdec.c:464:5: 
462.     int i;
463. 
464.     init_get_bits(&gb, data, data_size * 8);
         ^
465. 
466.     if ((i = ff_mpeg4audio_get_config(m4ac, data, data_size)) < 0)

libavcodec/get_bits.h:473:1: start of procedure init_get_bits()
  471.  * responsible for checking for the buffer end yourself (take advantage of the padding)!
  472.  */
  473. static inline void init_get_bits(GetBitContext *s,
       ^
  474.                    const uint8_t *buffer, int bit_size)
  475. {

libavcodec/get_bits.h:476:5: 
  474.                    const uint8_t *buffer, int bit_size)
  475. {
  476.     int buffer_size= (bit_size+7)>>3;
           ^
  477.     if(buffer_size < 0 || bit_size < 0) {
  478.         buffer_size = bit_size = 0;

libavcodec/get_bits.h:477:8: Taking true branch
  475. {
  476.     int buffer_size= (bit_size+7)>>3;
  477.     if(buffer_size < 0 || bit_size < 0) {
              ^
  478.         buffer_size = bit_size = 0;
  479.         buffer = NULL;

libavcodec/get_bits.h:478:9: 
  476.     int buffer_size= (bit_size+7)>>3;
  477.     if(buffer_size < 0 || bit_size < 0) {
  478.         buffer_size = bit_size = 0;
               ^
  479.         buffer = NULL;
  480.     }

libavcodec/get_bits.h:479:9: 
  477.     if(buffer_size < 0 || bit_size < 0) {
  478.         buffer_size = bit_size = 0;
  479.         buffer = NULL;
               ^
  480.     }
  481. 

libavcodec/get_bits.h:482:5: 
  480.     }
  481. 
  482.     s->buffer= buffer;
           ^
  483.     s->size_in_bits= bit_size;
  484.     s->buffer_end= buffer + buffer_size;

libavcodec/get_bits.h:483:5: 
  481. 
  482.     s->buffer= buffer;
  483.     s->size_in_bits= bit_size;
           ^
  484.     s->buffer_end= buffer + buffer_size;
  485. #ifdef ALT_BITSTREAM_READER

libavcodec/get_bits.h:484:5: 
  482.     s->buffer= buffer;
  483.     s->size_in_bits= bit_size;
  484.     s->buffer_end= buffer + buffer_size;
           ^
  485. #ifdef ALT_BITSTREAM_READER
  486.     s->index=0;

libavcodec/get_bits.h:486:5: 
  484.     s->buffer_end= buffer + buffer_size;
  485. #ifdef ALT_BITSTREAM_READER
  486.     s->index=0;
           ^
  487. #elif defined LIBMPEG2_BITSTREAM_READER
  488.     s->buffer_ptr = (uint8_t*)((intptr_t)buffer&(~1));

libavcodec/get_bits.h:496:1: return from a call to init_get_bits
  494.     skip_bits_long(s, 0);
  495. #endif
  496. }
       ^
  497. 
  498. static inline void align_get_bits(GetBitContext *s)

libavcodec/aacdec.c:466:9: Taking false branch
464.     init_get_bits(&gb, data, data_size * 8);
465. 
466.     if ((i = ff_mpeg4audio_get_config(m4ac, data, data_size)) < 0)
             ^
467.         return -1;
468.     if (m4ac->sampling_index > 12) {

libavcodec/aacdec.c:468:9: Taking false branch
466.     if ((i = ff_mpeg4audio_get_config(m4ac, data, data_size)) < 0)
467.         return -1;
468.     if (m4ac->sampling_index > 12) {
             ^
469.         av_log(avctx, AV_LOG_ERROR, "invalid sampling rate index %d\n", m4ac->sampling_index);
470.         return -1;

libavcodec/aacdec.c:472:9: Taking true branch
470.         return -1;
471.     }
472.     if (m4ac->sbr == 1 && m4ac->ps == -1)
             ^
473.         m4ac->ps = 1;
474. 

libavcodec/aacdec.c:472:27: Taking false branch
470.         return -1;
471.     }
472.     if (m4ac->sbr == 1 && m4ac->ps == -1)
                               ^
473.         m4ac->ps = 1;
474. 

libavcodec/aacdec.c:475:5: 
473.         m4ac->ps = 1;
474. 
475.     skip_bits_long(&gb, i);
         ^
476. 
477.     switch (m4ac->object_type) {

libavcodec/get_bits.h:188:1: start of procedure skip_bits_long()
  186. }
  187. 
  188. static inline void skip_bits_long(GetBitContext *s, int n){
       ^
  189.     s->index += n;
  190. }

libavcodec/get_bits.h:189:5: 
  187. 
  188. static inline void skip_bits_long(GetBitContext *s, int n){
  189.     s->index += n;
           ^
  190. }
  191. 

libavcodec/get_bits.h:190:1: return from a call to skip_bits_long
  188. static inline void skip_bits_long(GetBitContext *s, int n){
  189.     s->index += n;
  190. }
       ^
  191. 
  192. #elif defined LIBMPEG2_BITSTREAM_READER

libavcodec/aacdec.c:477:5: 
475.     skip_bits_long(&gb, i);
476. 
477.     switch (m4ac->object_type) {
         ^
478.     case AOT_AAC_MAIN:
479.     case AOT_AAC_LC:

libavcodec/aacdec.c:478:5: Switch condition is true. Entering switch case
476. 
477.     switch (m4ac->object_type) {
478.     case AOT_AAC_MAIN:
         ^
479.     case AOT_AAC_LC:
480.         if (decode_ga_specific_config(ac, avctx, &gb, m4ac, m4ac->chan_config))

libavcodec/aacdec.c:480:13: 
478.     case AOT_AAC_MAIN:
479.     case AOT_AAC_LC:
480.         if (decode_ga_specific_config(ac, avctx, &gb, m4ac, m4ac->chan_config))
                 ^
481.             return -1;
482.         break;

static int decode_audio_specific_config(AACContext *ac,
                                        AVCodecContext *avctx,
                                        MPEG4AudioConfig *m4ac,
                                        const uint8_t *data, int data_size)
{
    GetBitContext gb;
    int i;
    init_get_bits(&gb, data, data_size * 8);
    if ((i = ff_mpeg4audio_get_config(m4ac, data, data_size)) < 0)
        return -1;
    if (m4ac->sampling_index > 12) {
        av_log(avctx, AV_LOG_ERROR, "invalid sampling rate index %d\n", m4ac->sampling_index);
        return -1;
    }
    if (m4ac->sbr == 1 && m4ac->ps == -1)
        m4ac->ps = 1;
    skip_bits_long(&gb, i);
    switch (m4ac->object_type) {
    case AOT_AAC_MAIN:
    case AOT_AAC_LC:
        if (decode_ga_specific_config(ac, avctx, &gb, m4ac, m4ac->chan_config))
            return -1;
        break;
    default:
        av_log(avctx, AV_LOG_ERROR, "Audio object type %s%d is not supported.\n",
               m4ac->sbr == 1? "SBR+" : "", m4ac->object_type);
        return -1;
    }
    return get_bits_count(&gb);
}
['static int decode_audio_specific_config(AACContext *ac,\n                                        AVCodecContext *avctx,\n                                        MPEG4AudioConfig *m4ac,\n                                        const uint8_t *data, int data_size)\n{\n    GetBitContext gb;\n    int i;\n    init_get_bits(&gb, data, data_size * 8);\n    if ((i = ff_mpeg4audio_get_config(m4ac, data, data_size)) < 0)\n        return -1;\n    if (m4ac->sampling_index > 12) {\n        av_log(avctx, AV_LOG_ERROR, "invalid sampling rate index %d\\n", m4ac->sampling_index);\n        return -1;\n    }\n    if (m4ac->sbr == 1 && m4ac->ps == -1)\n        m4ac->ps = 1;\n    skip_bits_long(&gb, i);\n    switch (m4ac->object_type) {\n    case AOT_AAC_MAIN:\n    case AOT_AAC_LC:\n        if (decode_ga_specific_config(ac, avctx, &gb, m4ac, m4ac->chan_config))\n            return -1;\n        break;\n    default:\n        av_log(avctx, AV_LOG_ERROR, "Audio object type %s%d is not supported.\\n",\n               m4ac->sbr == 1? "SBR+" : "", m4ac->object_type);\n        return -1;\n    }\n    return get_bits_count(&gb);\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 void skip_bits_long(GetBitContext *s, int n){\n    s->index += n;\n}']