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

libavcodec/qdm2.c:1142:1: start of procedure process_subpacket_11()
1140.  * @param length    packet length in bit
1141.  */
1142. static void process_subpacket_11 (QDM2Context *q, QDM2SubPNode *node, int length)
      ^
1143. {
1144.     GetBitContext gb;

libavcodec/qdm2.c:1146:26: Condition is false
1144.     GetBitContext gb;
1145. 
1146.     init_get_bits(&gb, ((node == NULL) ? empty_buffer : node->packet->data), ((node == NULL) ? 0 : node->packet->size*8));
                               ^
1147.     if (length >= 32) {
1148.         int c = get_bits (&gb, 13);

libavcodec/qdm2.c:1146:25: 
1144.     GetBitContext gb;
1145. 
1146.     init_get_bits(&gb, ((node == NULL) ? empty_buffer : node->packet->data), ((node == NULL) ? 0 : node->packet->size*8));
                              ^
1147.     if (length >= 32) {
1148.         int c = get_bits (&gb, 13);

libavcodec/qdm2.c:1146:80: Condition is false
1144.     GetBitContext gb;
1145. 
1146.     init_get_bits(&gb, ((node == NULL) ? empty_buffer : node->packet->data), ((node == NULL) ? 0 : node->packet->size*8));
                                                                                     ^
1147.     if (length >= 32) {
1148.         int c = get_bits (&gb, 13);

libavcodec/qdm2.c:1146:79: 
1144.     GetBitContext gb;
1145. 
1146.     init_get_bits(&gb, ((node == NULL) ? empty_buffer : node->packet->data), ((node == NULL) ? 0 : node->packet->size*8));
                                                                                    ^
1147.     if (length >= 32) {
1148.         int c = get_bits (&gb, 13);

libavcodec/qdm2.c:1146:5: 
1144.     GetBitContext gb;
1145. 
1146.     init_get_bits(&gb, ((node == NULL) ? empty_buffer : node->packet->data), ((node == NULL) ? 0 : node->packet->size*8));
          ^
1147.     if (length >= 32) {
1148.         int c = get_bits (&gb, 13);

libavcodec/bitstream.h:758:1: start of procedure init_get_bits()
  756.  * @param bit_size the size of the buffer in bits
  757.  */
  758. static inline void init_get_bits(GetBitContext *s,
       ^
  759.                    const uint8_t *buffer, int bit_size)
  760. {

libavcodec/bitstream.h:761:5: 
  759.                    const uint8_t *buffer, int bit_size)
  760. {
  761.     int buffer_size= (bit_size+7)>>3;
           ^
  762.     if(buffer_size < 0 || bit_size < 0) {
  763.         buffer_size = bit_size = 0;

libavcodec/bitstream.h:762:8: Taking true branch
  760. {
  761.     int buffer_size= (bit_size+7)>>3;
  762.     if(buffer_size < 0 || bit_size < 0) {
              ^
  763.         buffer_size = bit_size = 0;
  764.         buffer = NULL;

libavcodec/bitstream.h:763:9: 
  761.     int buffer_size= (bit_size+7)>>3;
  762.     if(buffer_size < 0 || bit_size < 0) {
  763.         buffer_size = bit_size = 0;
               ^
  764.         buffer = NULL;
  765.     }

libavcodec/bitstream.h:764:9: 
  762.     if(buffer_size < 0 || bit_size < 0) {
  763.         buffer_size = bit_size = 0;
  764.         buffer = NULL;
               ^
  765.     }
  766. 

libavcodec/bitstream.h:767:5: 
  765.     }
  766. 
  767.     s->buffer= buffer;
           ^
  768.     s->size_in_bits= bit_size;
  769.     s->buffer_end= buffer + buffer_size;

libavcodec/bitstream.h:768:5: 
  766. 
  767.     s->buffer= buffer;
  768.     s->size_in_bits= bit_size;
           ^
  769.     s->buffer_end= buffer + buffer_size;
  770. #ifdef ALT_BITSTREAM_READER

libavcodec/bitstream.h:769:5: 
  767.     s->buffer= buffer;
  768.     s->size_in_bits= bit_size;
  769.     s->buffer_end= buffer + buffer_size;
           ^
  770. #ifdef ALT_BITSTREAM_READER
  771.     s->index=0;

libavcodec/bitstream.h:771:5: 
  769.     s->buffer_end= buffer + buffer_size;
  770. #ifdef ALT_BITSTREAM_READER
  771.     s->index=0;
           ^
  772. #elif defined LIBMPEG2_BITSTREAM_READER
  773.     s->buffer_ptr = (uint8_t*)((intptr_t)buffer&(~1));

libavcodec/bitstream.h:781:1: return from a call to init_get_bits
  779.     skip_bits_long(s, 0);
  780. #endif
  781. }
       ^
  782. 
  783. static inline void align_get_bits(GetBitContext *s)

libavcodec/qdm2.c:1147:9: Taking true branch
1145. 
1146.     init_get_bits(&gb, ((node == NULL) ? empty_buffer : node->packet->data), ((node == NULL) ? 0 : node->packet->size*8));
1147.     if (length >= 32) {
              ^
1148.         int c = get_bits (&gb, 13);
1149. 

libavcodec/qdm2.c:1148:9: 
1146.     init_get_bits(&gb, ((node == NULL) ? empty_buffer : node->packet->data), ((node == NULL) ? 0 : node->packet->size*8));
1147.     if (length >= 32) {
1148.         int c = get_bits (&gb, 13);
              ^
1149. 
1150.         if (c > 3)

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

libavcodec/bitstream.h:657:5: 
  655. static inline unsigned int get_bits(GetBitContext *s, int n){
  656.     register int tmp;
  657.     OPEN_READER(re, s)
           ^
  658.     UPDATE_CACHE(re, s)
  659.     tmp= SHOW_UBITS(re, s, n);

libavcodec/bitstream.h:658:5: 
  656.     register int tmp;
  657.     OPEN_READER(re, s)
  658.     UPDATE_CACHE(re, s)
           ^
  659.     tmp= SHOW_UBITS(re, s, n);
  660.     LAST_SKIP_BITS(re, s, n)

static void process_subpacket_11 (QDM2Context *q, QDM2SubPNode *node, int length)
{
    GetBitContext gb;
    init_get_bits(&gb, ((node == NULL) ? empty_buffer : node->packet->data), ((node == NULL) ? 0 : node->packet->size*8));
    if (length >= 32) {
        int c = get_bits (&gb, 13);
        if (c > 3)
            fill_coding_method_array (q->tone_level_idx, q->tone_level_idx_temp, q->coding_method,
                                      q->nb_channels, 8*c, q->superblocktype_2_3, q->cm_table_select);
    }
    synthfilt_build_sb_samples(q, &gb, length, 0, 8);
}
['static void process_subpacket_11 (QDM2Context *q, QDM2SubPNode *node, int length)\n{\n    GetBitContext gb;\n    init_get_bits(&gb, ((node == NULL) ? empty_buffer : node->packet->data), ((node == NULL) ? 0 : node->packet->size*8));\n    if (length >= 32) {\n        int c = get_bits (&gb, 13);\n        if (c > 3)\n            fill_coding_method_array (q->tone_level_idx, q->tone_level_idx_temp, q->coding_method,\n                                      q->nb_channels, 8*c, q->superblocktype_2_3, q->cm_table_select);\n    }\n    synthfilt_build_sb_samples(q, &gb, length, 0, 8);\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}']