libavcodec/smacker.c:629: error: Null Dereference
  pointer `&gb->buffer` last assigned on line 627 could be null and is dereferenced by call to `get_bits1()` at line 629, column 9.

libavcodec/smacker.c:603:1: start of procedure smka_decode_frame()
601.  * Decode Smacker audio data
602.  */
603. static int smka_decode_frame(AVCodecContext *avctx, void *data,
     ^
604.                              int *got_frame_ptr, AVPacket *avpkt)
605. {

libavcodec/smacker.c:606:5: 
604.                              int *got_frame_ptr, AVPacket *avpkt)
605. {
606.     AVFrame *frame     = data;
         ^
607.     const uint8_t *buf = avpkt->data;
608.     int buf_size = avpkt->size;

libavcodec/smacker.c:607:5: 
605. {
606.     AVFrame *frame     = data;
607.     const uint8_t *buf = avpkt->data;
         ^
608.     int buf_size = avpkt->size;
609.     GetBitContext gb;

libavcodec/smacker.c:608:5: 
606.     AVFrame *frame     = data;
607.     const uint8_t *buf = avpkt->data;
608.     int buf_size = avpkt->size;
         ^
609.     GetBitContext gb;
610.     HuffContext h[4] = { { 0 } };

libavcodec/smacker.c:610:5: 
608.     int buf_size = avpkt->size;
609.     GetBitContext gb;
610.     HuffContext h[4] = { { 0 } };
         ^
611.     VLC vlc[4]       = { { 0 } };
612.     int16_t *samples;

libavcodec/smacker.c:611:5: 
609.     GetBitContext gb;
610.     HuffContext h[4] = { { 0 } };
611.     VLC vlc[4]       = { { 0 } };
         ^
612.     int16_t *samples;
613.     uint8_t *samples8;

libavcodec/smacker.c:618:5: 
616.     int unp_size;
617.     int bits, stereo;
618.     int pred[2] = {0, 0};
         ^
619. 
620.     if (buf_size <= 4) {

libavcodec/smacker.c:620:9: Taking false branch
618.     int pred[2] = {0, 0};
619. 
620.     if (buf_size <= 4) {
             ^
621.         av_log(avctx, AV_LOG_ERROR, "packet is too small\n");
622.         return AVERROR(EINVAL);

libavcodec/smacker.c:625:5: 
623.     }
624. 
625.     unp_size = AV_RL32(buf);
         ^
626. 
627.     init_get_bits(&gb, buf + 4, (buf_size - 4) * 8);

libavcodec/smacker.c:627:5: 
625.     unp_size = AV_RL32(buf);
626. 
627.     init_get_bits(&gb, buf + 4, (buf_size - 4) * 8);
         ^
628. 
629.     if(!get_bits1(&gb)){

libavcodec/get_bits.h:375:1: start of procedure init_get_bits()
  373.  * @return 0 on success, AVERROR_INVALIDDATA if the buffer_size would overflow.
  374.  */
  375. static inline int init_get_bits(GetBitContext *s, const uint8_t *buffer,
       ^
  376.                                 int bit_size)
  377. {

libavcodec/get_bits.h:379:5: 
  377. {
  378.     int buffer_size;
  379.     int ret = 0;
           ^
  380. 
  381.     if (bit_size > INT_MAX - 7 || bit_size < 0 || !buffer) {

libavcodec/get_bits.h:381:9: Taking true branch
  379.     int ret = 0;
  380. 
  381.     if (bit_size > INT_MAX - 7 || bit_size < 0 || !buffer) {
               ^
  382.         buffer_size = bit_size = 0;
  383.         buffer      = NULL;

libavcodec/get_bits.h:382:9: 
  380. 
  381.     if (bit_size > INT_MAX - 7 || bit_size < 0 || !buffer) {
  382.         buffer_size = bit_size = 0;
               ^
  383.         buffer      = NULL;
  384.         ret         = AVERROR_INVALIDDATA;

libavcodec/get_bits.h:383:9: 
  381.     if (bit_size > INT_MAX - 7 || bit_size < 0 || !buffer) {
  382.         buffer_size = bit_size = 0;
  383.         buffer      = NULL;
               ^
  384.         ret         = AVERROR_INVALIDDATA;
  385.     }

libavcodec/get_bits.h:384:9: 
  382.         buffer_size = bit_size = 0;
  383.         buffer      = NULL;
  384.         ret         = AVERROR_INVALIDDATA;
               ^
  385.     }
  386. 

libavcodec/get_bits.h:387:5: 
  385.     }
  386. 
  387.     buffer_size = (bit_size + 7) >> 3;
           ^
  388. 
  389.     s->buffer             = buffer;

libavcodec/get_bits.h:389:5: 
  387.     buffer_size = (bit_size + 7) >> 3;
  388. 
  389.     s->buffer             = buffer;
           ^
  390.     s->size_in_bits       = bit_size;
  391. #if !UNCHECKED_BITSTREAM_READER

libavcodec/get_bits.h:390:5: 
  388. 
  389.     s->buffer             = buffer;
  390.     s->size_in_bits       = bit_size;
           ^
  391. #if !UNCHECKED_BITSTREAM_READER
  392.     s->size_in_bits_plus8 = bit_size + 8;

libavcodec/get_bits.h:392:5: 
  390.     s->size_in_bits       = bit_size;
  391. #if !UNCHECKED_BITSTREAM_READER
  392.     s->size_in_bits_plus8 = bit_size + 8;
           ^
  393. #endif
  394.     s->buffer_end         = buffer + buffer_size;

libavcodec/get_bits.h:394:5: 
  392.     s->size_in_bits_plus8 = bit_size + 8;
  393. #endif
  394.     s->buffer_end         = buffer + buffer_size;
           ^
  395.     s->index              = 0;
  396. 

libavcodec/get_bits.h:395:5: 
  393. #endif
  394.     s->buffer_end         = buffer + buffer_size;
  395.     s->index              = 0;
           ^
  396. 
  397.     return ret;

libavcodec/get_bits.h:397:5: 
  395.     s->index              = 0;
  396. 
  397.     return ret;
           ^
  398. }
  399. 

libavcodec/get_bits.h:398:1: return from a call to init_get_bits
  396. 
  397.     return ret;
  398. }
       ^
  399. 
  400. /**

libavcodec/smacker.c:629:9: 
627.     init_get_bits(&gb, buf + 4, (buf_size - 4) * 8);
628. 
629.     if(!get_bits1(&gb)){
             ^
630.         av_log(avctx, AV_LOG_INFO, "Sound: no data\n");
631.         *got_frame_ptr = 0;

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

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

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