libavcodec/wmavoice.c:1644: error: Null Dereference
  pointer `gb->buffer` last assigned on line 1637 could be null and is dereferenced by call to `get_bits1()` at line 1644, column 10.

libavcodec/wmavoice.c:1629:1: start of procedure check_bits_for_superframe()
1627.  * @return -1 if unsupported, 1 on not enough bits or 0 if OK.
1628.  */
1629. static int check_bits_for_superframe(GetBitContext *orig_gb,
      ^
1630.                                      WMAVoiceContext *s)
1631. {

libavcodec/wmavoice.c:1632:5: 
1630.                                      WMAVoiceContext *s)
1631. {
1632.     GetBitContext s_gb, *gb = &s_gb;
          ^
1633.     int n, need_bits, bd_idx;
1634.     const struct frame_type_desc *frame_desc;

libavcodec/wmavoice.c:1637:5: 
1635. 
1636.     /* initialize a copy */
1637.     init_get_bits(gb, orig_gb->buffer, orig_gb->size_in_bits);
          ^
1638.     skip_bits_long(gb, get_bits_count(orig_gb));
1639.     assert(get_bits_left(gb) == get_bits_left(orig_gb));

libavcodec/get_bits.h:391:1: start of procedure init_get_bits()
  389.  * responsible for checking for the buffer end yourself (take advantage of the padding)!
  390.  */
  391. static inline void init_get_bits(GetBitContext *s,
       ^
  392.                    const uint8_t *buffer, int bit_size)
  393. {

libavcodec/get_bits.h:394:5: 
  392.                    const uint8_t *buffer, int bit_size)
  393. {
  394.     int buffer_size = (bit_size+7)>>3;
           ^
  395.     if (buffer_size < 0 || bit_size < 0) {
  396.         buffer_size = bit_size = 0;

libavcodec/get_bits.h:395:9: Taking true branch
  393. {
  394.     int buffer_size = (bit_size+7)>>3;
  395.     if (buffer_size < 0 || bit_size < 0) {
               ^
  396.         buffer_size = bit_size = 0;
  397.         buffer = NULL;

libavcodec/get_bits.h:396:9: 
  394.     int buffer_size = (bit_size+7)>>3;
  395.     if (buffer_size < 0 || bit_size < 0) {
  396.         buffer_size = bit_size = 0;
               ^
  397.         buffer = NULL;
  398.     }

libavcodec/get_bits.h:397:9: 
  395.     if (buffer_size < 0 || bit_size < 0) {
  396.         buffer_size = bit_size = 0;
  397.         buffer = NULL;
               ^
  398.     }
  399. 

libavcodec/get_bits.h:400:5: 
  398.     }
  399. 
  400.     s->buffer       = buffer;
           ^
  401.     s->size_in_bits = bit_size;
  402.     s->buffer_end   = buffer + buffer_size;

libavcodec/get_bits.h:401:5: 
  399. 
  400.     s->buffer       = buffer;
  401.     s->size_in_bits = bit_size;
           ^
  402.     s->buffer_end   = buffer + buffer_size;
  403. #ifdef ALT_BITSTREAM_READER

libavcodec/get_bits.h:402:5: 
  400.     s->buffer       = buffer;
  401.     s->size_in_bits = bit_size;
  402.     s->buffer_end   = buffer + buffer_size;
           ^
  403. #ifdef ALT_BITSTREAM_READER
  404.     s->index        = 0;

libavcodec/get_bits.h:404:5: 
  402.     s->buffer_end   = buffer + buffer_size;
  403. #ifdef ALT_BITSTREAM_READER
  404.     s->index        = 0;
           ^
  405. #elif defined A32_BITSTREAM_READER
  406.     s->buffer_ptr   = (uint32_t*)((intptr_t)buffer & ~3);

libavcodec/get_bits.h:410:1: return from a call to init_get_bits
  408.     skip_bits_long(s, 0);
  409. #endif
  410. }
       ^
  411. 
  412. static inline void align_get_bits(GetBitContext *s)

libavcodec/wmavoice.c:1638:5: 
1636.     /* initialize a copy */
1637.     init_get_bits(gb, orig_gb->buffer, orig_gb->size_in_bits);
1638.     skip_bits_long(gb, get_bits_count(orig_gb));
          ^
1639.     assert(get_bits_left(gb) == get_bits_left(orig_gb));
1640. 

libavcodec/get_bits.h:169:1: start of procedure get_bits_count()
  167. #   define GET_CACHE(name, gb) ((uint32_t)name##_cache)
  168. 
  169. static inline int get_bits_count(const GetBitContext *s){
       ^
  170.     return s->index;
  171. }

libavcodec/get_bits.h:170:5: 
  168. 
  169. static inline int get_bits_count(const GetBitContext *s){
  170.     return s->index;
           ^
  171. }
  172. 

libavcodec/get_bits.h:171:1: return from a call to get_bits_count
  169. static inline int get_bits_count(const GetBitContext *s){
  170.     return s->index;
  171. }
       ^
  172. 
  173. static inline void skip_bits_long(GetBitContext *s, int n){

libavcodec/get_bits.h:173:1: start of procedure skip_bits_long()
  171. }
  172. 
  173. static inline void skip_bits_long(GetBitContext *s, int n){
       ^
  174.     s->index += n;
  175. }

libavcodec/get_bits.h:174:5: 
  172. 
  173. static inline void skip_bits_long(GetBitContext *s, int n){
  174.     s->index += n;
           ^
  175. }
  176. 

libavcodec/get_bits.h:175:1: return from a call to skip_bits_long
  173. static inline void skip_bits_long(GetBitContext *s, int n){
  174.     s->index += n;
  175. }
       ^
  176. 
  177. #elif defined A32_BITSTREAM_READER

libavcodec/wmavoice.c:1639:5: 
1637.     init_get_bits(gb, orig_gb->buffer, orig_gb->size_in_bits);
1638.     skip_bits_long(gb, get_bits_count(orig_gb));
1639.     assert(get_bits_left(gb) == get_bits_left(orig_gb));
          ^
1640. 
1641.     /* superframe header */

libavcodec/wmavoice.c:1642:9: 
1640. 
1641.     /* superframe header */
1642.     if (get_bits_left(gb) < 14)
              ^
1643.         return 1;
1644.     if (!get_bits1(gb))

libavcodec/get_bits.h:544:1: start of procedure get_bits_left()
  542. }
  543. 
  544. static inline int get_bits_left(GetBitContext *gb)
       ^
  545. {
  546.     return gb->size_in_bits - get_bits_count(gb);

libavcodec/get_bits.h:546:5: 
  544. static inline int get_bits_left(GetBitContext *gb)
  545. {
  546.     return gb->size_in_bits - get_bits_count(gb);
           ^
  547. }
  548. 

libavcodec/get_bits.h:169:1: start of procedure get_bits_count()
    167. #   define GET_CACHE(name, gb) ((uint32_t)name##_cache)
    168. 
    169. static inline int get_bits_count(const GetBitContext *s){
         ^
    170.     return s->index;
    171. }

libavcodec/get_bits.h:170:5: 
    168. 
    169. static inline int get_bits_count(const GetBitContext *s){
    170.     return s->index;
             ^
    171. }
    172. 

libavcodec/get_bits.h:171:1: return from a call to get_bits_count
    169. static inline int get_bits_count(const GetBitContext *s){
    170.     return s->index;
    171. }
         ^
    172. 
    173. static inline void skip_bits_long(GetBitContext *s, int n){

libavcodec/get_bits.h:547:1: return from a call to get_bits_left
  545. {
  546.     return gb->size_in_bits - get_bits_count(gb);
  547. }
       ^
  548. 
  549. //#define TRACE

libavcodec/wmavoice.c:1642:9: Taking false branch
1640. 
1641.     /* superframe header */
1642.     if (get_bits_left(gb) < 14)
              ^
1643.         return 1;
1644.     if (!get_bits1(gb))

libavcodec/wmavoice.c:1644:10: 
1642.     if (get_bits_left(gb) < 14)
1643.         return 1;
1644.     if (!get_bits1(gb))
               ^
1645.         return -1;                        // WMAPro-in-WMAVoice superframe
1646.     if (get_bits1(gb)) skip_bits(gb, 12); // number of  samples in superframe

libavcodec/get_bits.h:311:1: start of procedure get_bits1()
  309. }
  310. 
  311. static inline unsigned int get_bits1(GetBitContext *s){
       ^
  312. #ifdef ALT_BITSTREAM_READER
  313.     unsigned int index = s->index;

libavcodec/get_bits.h:313:5: 
  311. static inline unsigned int get_bits1(GetBitContext *s){
  312. #ifdef ALT_BITSTREAM_READER
  313.     unsigned int index = s->index;
           ^
  314.     uint8_t result = s->buffer[index>>3];
  315. #ifdef ALT_BITSTREAM_READER_LE

libavcodec/get_bits.h:314:5: 
  312. #ifdef ALT_BITSTREAM_READER
  313.     unsigned int index = s->index;
  314.     uint8_t result = s->buffer[index>>3];
           ^
  315. #ifdef ALT_BITSTREAM_READER_LE
  316.     result >>= index & 7;
