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

libavcodec/wmavoice.c:1650:1: start of procedure check_bits_for_superframe()
1648.  * @return -1 if unsupported, 1 on not enough bits or 0 if OK.
1649.  */
1650. static int check_bits_for_superframe(GetBitContext *orig_gb,
      ^
1651.                                      WMAVoiceContext *s)
1652. {

libavcodec/wmavoice.c:1653:5: 
1651.                                      WMAVoiceContext *s)
1652. {
1653.     GetBitContext s_gb, *gb = &s_gb;
          ^
1654.     int n, need_bits, bd_idx;
1655.     const struct frame_type_desc *frame_desc;

libavcodec/wmavoice.c:1658:5: 
1656. 
1657.     /* initialize a copy */
1658.     init_get_bits(gb, orig_gb->buffer, orig_gb->size_in_bits);
          ^
1659.     skip_bits_long(gb, get_bits_count(orig_gb));
1660.     assert(get_bits_left(gb) == get_bits_left(orig_gb));

libavcodec/get_bits.h:352:1: start of procedure init_get_bits()
  350.  * @param bit_size the size of the buffer in bits
  351.  */
  352. static inline void init_get_bits(GetBitContext *s, const uint8_t *buffer,
       ^
  353.                                  int bit_size)
  354. {

libavcodec/get_bits.h:355:5: 
  353.                                  int bit_size)
  354. {
  355.     int buffer_size = (bit_size+7)>>3;
           ^
  356.     if (buffer_size < 0 || bit_size < 0) {
  357.         buffer_size = bit_size = 0;

libavcodec/get_bits.h:356:9: Taking true branch
  354. {
  355.     int buffer_size = (bit_size+7)>>3;
  356.     if (buffer_size < 0 || bit_size < 0) {
               ^
  357.         buffer_size = bit_size = 0;
  358.         buffer = NULL;

libavcodec/get_bits.h:357:9: 
  355.     int buffer_size = (bit_size+7)>>3;
  356.     if (buffer_size < 0 || bit_size < 0) {
  357.         buffer_size = bit_size = 0;
               ^
  358.         buffer = NULL;
  359.     }

libavcodec/get_bits.h:358:9: 
  356.     if (buffer_size < 0 || bit_size < 0) {
  357.         buffer_size = bit_size = 0;
  358.         buffer = NULL;
               ^
  359.     }
  360. 

libavcodec/get_bits.h:361:5: 
  359.     }
  360. 
  361.     s->buffer       = buffer;
           ^
  362.     s->size_in_bits = bit_size;
  363. #if !UNCHECKED_BITSTREAM_READER

libavcodec/get_bits.h:362:5: 
  360. 
  361.     s->buffer       = buffer;
  362.     s->size_in_bits = bit_size;
           ^
  363. #if !UNCHECKED_BITSTREAM_READER
  364.     s->size_in_bits_plus8 = bit_size + 8;

libavcodec/get_bits.h:364:5: 
  362.     s->size_in_bits = bit_size;
  363. #if !UNCHECKED_BITSTREAM_READER
  364.     s->size_in_bits_plus8 = bit_size + 8;
           ^
  365. #endif
  366.     s->buffer_end   = buffer + buffer_size;

libavcodec/get_bits.h:366:5: 
  364.     s->size_in_bits_plus8 = bit_size + 8;
  365. #endif
  366.     s->buffer_end   = buffer + buffer_size;
           ^
  367.     s->index        = 0;
  368. }

libavcodec/get_bits.h:367:5: 
  365. #endif
  366.     s->buffer_end   = buffer + buffer_size;
  367.     s->index        = 0;
           ^
  368. }
  369. 

libavcodec/get_bits.h:368:1: return from a call to init_get_bits
  366.     s->buffer_end   = buffer + buffer_size;
  367.     s->index        = 0;
  368. }
       ^
  369. 
  370. static inline void align_get_bits(GetBitContext *s)

libavcodec/wmavoice.c:1659:5: 
1657.     /* initialize a copy */
1658.     init_get_bits(gb, orig_gb->buffer, orig_gb->size_in_bits);
1659.     skip_bits_long(gb, get_bits_count(orig_gb));
          ^
1660.     assert(get_bits_left(gb) == get_bits_left(orig_gb));
1661. 

libavcodec/get_bits.h:192:1: start of procedure get_bits_count()
  190. #define GET_CACHE(name, gb) ((uint32_t)name##_cache)
  191. 
  192. static inline int get_bits_count(const GetBitContext *s)
       ^
  193. {
  194.     return s->index;

libavcodec/get_bits.h:194:5: 
  192. static inline int get_bits_count(const GetBitContext *s)
  193. {
  194.     return s->index;
           ^
  195. }
  196. 

libavcodec/get_bits.h:195:1: return from a call to get_bits_count
  193. {
  194.     return s->index;
  195. }
       ^
  196. 
  197. static inline void skip_bits_long(GetBitContext *s, int n){

libavcodec/get_bits.h:197:1: start of procedure skip_bits_long()
  195. }
  196. 
  197. static inline void skip_bits_long(GetBitContext *s, int n){
       ^
  198. #if UNCHECKED_BITSTREAM_READER
  199.     s->index += n;

libavcodec/get_bits.h:199:5: 
  197. static inline void skip_bits_long(GetBitContext *s, int n){
  198. #if UNCHECKED_BITSTREAM_READER
  199.     s->index += n;
           ^
  200. #else
  201.     s->index += av_clip(n, -s->index, s->size_in_bits_plus8 - s->index);

libavcodec/get_bits.h:203:1: return from a call to skip_bits_long
  201.     s->index += av_clip(n, -s->index, s->size_in_bits_plus8 - s->index);
  202. #endif
  203. }
       ^
  204. 
  205. /**

libavcodec/wmavoice.c:1660:5: 
1658.     init_get_bits(gb, orig_gb->buffer, orig_gb->size_in_bits);
1659.     skip_bits_long(gb, get_bits_count(orig_gb));
1660.     assert(get_bits_left(gb) == get_bits_left(orig_gb));
          ^
1661. 
1662.     /* superframe header */

libavcodec/wmavoice.c:1663:9: 
1661. 
1662.     /* superframe header */
1663.     if (get_bits_left(gb) < 14)
              ^
1664.         return 1;
1665.     if (!get_bits1(gb))

libavcodec/get_bits.h:505:1: start of procedure get_bits_left()
  503. }
  504. 
  505. static inline int get_bits_left(GetBitContext *gb)
       ^
  506. {
  507.     return gb->size_in_bits - get_bits_count(gb);

libavcodec/get_bits.h:507:5: 
  505. static inline int get_bits_left(GetBitContext *gb)
  506. {
  507.     return gb->size_in_bits - get_bits_count(gb);
           ^
  508. }
  509. 

libavcodec/get_bits.h:192:1: start of procedure get_bits_count()
    190. #define GET_CACHE(name, gb) ((uint32_t)name##_cache)
    191. 
    192. static inline int get_bits_count(const GetBitContext *s)
         ^
    193. {
    194.     return s->index;

libavcodec/get_bits.h:194:5: 
    192. static inline int get_bits_count(const GetBitContext *s)
    193. {
    194.     return s->index;
             ^
    195. }
    196. 

libavcodec/get_bits.h:195:1: return from a call to get_bits_count
    193. {
    194.     return s->index;
    195. }
         ^
    196. 
    197. static inline void skip_bits_long(GetBitContext *s, int n){

libavcodec/get_bits.h:508:1: return from a call to get_bits_left
  506. {
  507.     return gb->size_in_bits - get_bits_count(gb);
  508. }
       ^
  509. 
  510. //#define TRACE

libavcodec/wmavoice.c:1663:9: Taking false branch
1661. 
1662.     /* superframe header */
1663.     if (get_bits_left(gb) < 14)
              ^
1664.         return 1;
1665.     if (!get_bits1(gb))

libavcodec/wmavoice.c:1665:10: 
1663.     if (get_bits_left(gb) < 14)
1664.         return 1;
1665.     if (!get_bits1(gb))
               ^
1666.         return -1;                        // WMAPro-in-WMAVoice superframe
1667.     if (get_bits1(gb)) skip_bits(gb, 12); // number of  samples in superframe

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

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

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