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

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

libavcodec/wmavoice.c:1649:5: 
1647.                                      WMAVoiceContext *s)
1648. {
1649.     GetBitContext s_gb, *gb = &s_gb;
          ^
1650.     int n, need_bits, bd_idx;
1651.     const struct frame_type_desc *frame_desc;

libavcodec/wmavoice.c:1654:5: 
1652. 
1653.     /* initialize a copy */
1654.     init_get_bits(gb, orig_gb->buffer, orig_gb->size_in_bits);
          ^
1655.     skip_bits_long(gb, get_bits_count(orig_gb));
1656.     assert(get_bits_left(gb) == get_bits_left(orig_gb));

libavcodec/get_bits.h:338:1: start of procedure init_get_bits()
  336.  * responsible for checking for the buffer end yourself (take advantage of the padding)!
  337.  */
  338. static inline void init_get_bits(GetBitContext *s,
       ^
  339.                    const uint8_t *buffer, int bit_size)
  340. {

libavcodec/get_bits.h:341:5: 
  339.                    const uint8_t *buffer, int bit_size)
  340. {
  341.     int buffer_size = (bit_size+7)>>3;
           ^
  342.     if (buffer_size < 0 || bit_size < 0) {
  343.         buffer_size = bit_size = 0;

libavcodec/get_bits.h:342:9: Taking true branch
  340. {
  341.     int buffer_size = (bit_size+7)>>3;
  342.     if (buffer_size < 0 || bit_size < 0) {
               ^
  343.         buffer_size = bit_size = 0;
  344.         buffer = NULL;

libavcodec/get_bits.h:343:9: 
  341.     int buffer_size = (bit_size+7)>>3;
  342.     if (buffer_size < 0 || bit_size < 0) {
  343.         buffer_size = bit_size = 0;
               ^
  344.         buffer = NULL;
  345.     }

libavcodec/get_bits.h:344:9: 
  342.     if (buffer_size < 0 || bit_size < 0) {
  343.         buffer_size = bit_size = 0;
  344.         buffer = NULL;
               ^
  345.     }
  346. 

libavcodec/get_bits.h:347:5: 
  345.     }
  346. 
  347.     s->buffer       = buffer;
           ^
  348.     s->size_in_bits = bit_size;
  349. #if !UNCHECKED_BITSTREAM_READER

libavcodec/get_bits.h:348:5: 
  346. 
  347.     s->buffer       = buffer;
  348.     s->size_in_bits = bit_size;
           ^
  349. #if !UNCHECKED_BITSTREAM_READER
  350.     s->size_in_bits_plus8 = bit_size + 8;

libavcodec/get_bits.h:350:5: 
  348.     s->size_in_bits = bit_size;
  349. #if !UNCHECKED_BITSTREAM_READER
  350.     s->size_in_bits_plus8 = bit_size + 8;
           ^
  351. #endif
  352.     s->buffer_end   = buffer + buffer_size;

libavcodec/get_bits.h:352:5: 
  350.     s->size_in_bits_plus8 = bit_size + 8;
  351. #endif
  352.     s->buffer_end   = buffer + buffer_size;
           ^
  353.     s->index        = 0;
  354. }

libavcodec/get_bits.h:353:5: 
  351. #endif
  352.     s->buffer_end   = buffer + buffer_size;
  353.     s->index        = 0;
           ^
  354. }
  355. 

libavcodec/get_bits.h:354:1: return from a call to init_get_bits
  352.     s->buffer_end   = buffer + buffer_size;
  353.     s->index        = 0;
  354. }
       ^
  355. 
  356. static inline void align_get_bits(GetBitContext *s)

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

libavcodec/get_bits.h:187:1: start of procedure get_bits_count()
  185. #   define GET_CACHE(name, gb) ((uint32_t)name##_cache)
  186. 
  187. static inline int get_bits_count(const GetBitContext *s){
       ^
  188.     return s->index;
  189. }

libavcodec/get_bits.h:188:5: 
  186. 
  187. static inline int get_bits_count(const GetBitContext *s){
  188.     return s->index;
           ^
  189. }
  190. 

libavcodec/get_bits.h:189:1: return from a call to get_bits_count
  187. static inline int get_bits_count(const GetBitContext *s){
  188.     return s->index;
  189. }
       ^
  190. 
  191. static inline void skip_bits_long(GetBitContext *s, int n){

libavcodec/get_bits.h:191:1: start of procedure skip_bits_long()
  189. }
  190. 
  191. static inline void skip_bits_long(GetBitContext *s, int n){
       ^
  192. #if UNCHECKED_BITSTREAM_READER
  193.     s->index += n;

libavcodec/get_bits.h:193:5: 
  191. static inline void skip_bits_long(GetBitContext *s, int n){
  192. #if UNCHECKED_BITSTREAM_READER
  193.     s->index += n;
           ^
  194. #else
  195.     s->index += av_clip(n, -s->index, s->size_in_bits_plus8 - s->index);

libavcodec/get_bits.h:197:1: return from a call to skip_bits_long
  195.     s->index += av_clip(n, -s->index, s->size_in_bits_plus8 - s->index);
  196. #endif
  197. }
       ^
  198. 
  199. /**

libavcodec/wmavoice.c:1656:5: 
1654.     init_get_bits(gb, orig_gb->buffer, orig_gb->size_in_bits);
1655.     skip_bits_long(gb, get_bits_count(orig_gb));
1656.     assert(get_bits_left(gb) == get_bits_left(orig_gb));
          ^
1657. 
1658.     /* superframe header */

libavcodec/wmavoice.c:1659:9: 
1657. 
1658.     /* superframe header */
1659.     if (get_bits_left(gb) < 14)
              ^
1660.         return 1;
1661.     if (!get_bits1(gb))

libavcodec/get_bits.h:487:1: start of procedure get_bits_left()
  485. }
  486. 
  487. static inline int get_bits_left(GetBitContext *gb)
       ^
  488. {
  489.     return gb->size_in_bits - get_bits_count(gb);

libavcodec/get_bits.h:489:5: 
  487. static inline int get_bits_left(GetBitContext *gb)
  488. {
  489.     return gb->size_in_bits - get_bits_count(gb);
           ^
  490. }
  491. 

libavcodec/get_bits.h:187:1: start of procedure get_bits_count()
    185. #   define GET_CACHE(name, gb) ((uint32_t)name##_cache)
    186. 
    187. static inline int get_bits_count(const GetBitContext *s){
         ^
    188.     return s->index;
    189. }

libavcodec/get_bits.h:188:5: 
    186. 
    187. static inline int get_bits_count(const GetBitContext *s){
    188.     return s->index;
             ^
    189. }
    190. 

libavcodec/get_bits.h:189:1: return from a call to get_bits_count
    187. static inline int get_bits_count(const GetBitContext *s){
    188.     return s->index;
    189. }
         ^
    190. 
    191. static inline void skip_bits_long(GetBitContext *s, int n){

libavcodec/get_bits.h:490:1: return from a call to get_bits_left
  488. {
  489.     return gb->size_in_bits - get_bits_count(gb);
  490. }
       ^
  491. 
  492. //#define TRACE

libavcodec/wmavoice.c:1659:9: Taking false branch
1657. 
1658.     /* superframe header */
1659.     if (get_bits_left(gb) < 14)
              ^
1660.         return 1;
1661.     if (!get_bits1(gb))

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

libavcodec/get_bits.h:259:1: start of procedure get_bits1()
  257. }
  258. 
  259. static inline unsigned int get_bits1(GetBitContext *s){
       ^
  260.     unsigned int index = s->index;
  261.     uint8_t result = s->buffer[index>>3];

libavcodec/get_bits.h:260:5: 
  258. 
  259. static inline unsigned int get_bits1(GetBitContext *s){
  260.     unsigned int index = s->index;
           ^
  261.     uint8_t result = s->buffer[index>>3];
  262. #ifdef ALT_BITSTREAM_READER_LE

libavcodec/get_bits.h:261:5: 
  259. static inline unsigned int get_bits1(GetBitContext *s){
  260.     unsigned int index = s->index;
  261.     uint8_t result = s->buffer[index>>3];
           ^
  262. #ifdef ALT_BITSTREAM_READER_LE
  263.     result >>= index & 7;
