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

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

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

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

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/wmavoice.c:1636:5: 
1634.     /* initialize a copy */
1635.     init_get_bits(gb, orig_gb->buffer, orig_gb->size_in_bits);
1636.     skip_bits_long(gb, get_bits_count(orig_gb));
          ^
1637.     assert(get_bits_left(gb) == get_bits_left(orig_gb));
1638. 

libavcodec/get_bits.h:184:1: start of procedure get_bits_count()
  182.         ((uint32_t)name##_cache)
  183. 
  184. static inline int get_bits_count(const GetBitContext *s){
       ^
  185.     return s->index;
  186. }

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

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

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/wmavoice.c:1637:5: 
1635.     init_get_bits(gb, orig_gb->buffer, orig_gb->size_in_bits);
1636.     skip_bits_long(gb, get_bits_count(orig_gb));
1637.     assert(get_bits_left(gb) == get_bits_left(orig_gb));
          ^
1638. 
1639.     /* superframe header */

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

libavcodec/get_bits.h:686:1: start of procedure get_bits_left()
  684. }
  685. 
  686. static inline int get_bits_left(GetBitContext *gb)
       ^
  687. {
  688.     return gb->size_in_bits - get_bits_count(gb);

libavcodec/get_bits.h:688:5: 
  686. static inline int get_bits_left(GetBitContext *gb)
  687. {
  688.     return gb->size_in_bits - get_bits_count(gb);
           ^
  689. }
  690. 

libavcodec/get_bits.h:184:1: start of procedure get_bits_count()
    182.         ((uint32_t)name##_cache)
    183. 
    184. static inline int get_bits_count(const GetBitContext *s){
         ^
    185.     return s->index;
    186. }

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

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

libavcodec/get_bits.h:689:1: return from a call to get_bits_left
  687. {
  688.     return gb->size_in_bits - get_bits_count(gb);
  689. }
       ^
  690. 
  691. #endif /* AVCODEC_GET_BITS_H */

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

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

libavcodec/get_bits.h:393:1: start of procedure get_bits1()
  391. }
  392. 
  393. static inline unsigned int get_bits1(GetBitContext *s){
       ^
  394. #ifdef ALT_BITSTREAM_READER
  395.     unsigned int index= s->index;

libavcodec/get_bits.h:395:5: 
  393. static inline unsigned int get_bits1(GetBitContext *s){
  394. #ifdef ALT_BITSTREAM_READER
  395.     unsigned int index= s->index;
           ^
  396.     uint8_t result= s->buffer[ index>>3 ];
  397. #ifdef ALT_BITSTREAM_READER_LE

libavcodec/get_bits.h:396:5: 
  394. #ifdef ALT_BITSTREAM_READER
  395.     unsigned int index= s->index;
  396.     uint8_t result= s->buffer[ index>>3 ];
           ^
  397. #ifdef ALT_BITSTREAM_READER_LE
  398.     result>>= (index&0x07);
