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

libavcodec/smacker.c:590:1: start of procedure smka_decode_frame()
588.  * Decode Smacker audio data
589.  */
590. static int smka_decode_frame(AVCodecContext *avctx, void *data,
     ^
591.                              int *got_frame_ptr, AVPacket *avpkt)
592. {

libavcodec/smacker.c:593:5: 
591.                              int *got_frame_ptr, AVPacket *avpkt)
592. {
593.     AVFrame *frame     = data;
         ^
594.     const uint8_t *buf = avpkt->data;
595.     int buf_size = avpkt->size;

libavcodec/smacker.c:594:5: 
592. {
593.     AVFrame *frame     = data;
594.     const uint8_t *buf = avpkt->data;
         ^
595.     int buf_size = avpkt->size;
596.     GetBitContext gb;

libavcodec/smacker.c:595:5: 
593.     AVFrame *frame     = data;
594.     const uint8_t *buf = avpkt->data;
595.     int buf_size = avpkt->size;
         ^
596.     GetBitContext gb;
597.     HuffContext h[4] = { { 0 } };

libavcodec/smacker.c:597:5: 
595.     int buf_size = avpkt->size;
596.     GetBitContext gb;
597.     HuffContext h[4] = { { 0 } };
         ^
598.     VLC vlc[4]       = { { 0 } };
599.     int16_t *samples;

libavcodec/smacker.c:598:5: 
596.     GetBitContext gb;
597.     HuffContext h[4] = { { 0 } };
598.     VLC vlc[4]       = { { 0 } };
         ^
599.     int16_t *samples;
600.     uint8_t *samples8;

libavcodec/smacker.c:605:5: 
603.     int unp_size;
604.     int bits, stereo;
605.     int pred[2] = {0, 0};
         ^
606. 
607.     if (buf_size <= 4) {

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

libavcodec/smacker.c:612:5: 
610.     }
611. 
612.     unp_size = AV_RL32(buf);
         ^
613. 
614.     init_get_bits(&gb, buf + 4, (buf_size - 4) * 8);

libavcodec/smacker.c:614:5: 
612.     unp_size = AV_RL32(buf);
613. 
614.     init_get_bits(&gb, buf + 4, (buf_size - 4) * 8);
         ^
615. 
616.     if(!get_bits1(&gb)){

libavcodec/get_bits.h:384:1: start of procedure init_get_bits()
  382.  * @return 0 on success, AVERROR_INVALIDDATA if the buffer_size would overflow.
  383.  */
  384. static inline int init_get_bits(GetBitContext *s, const uint8_t *buffer,
       ^
  385.                                 int bit_size)
  386. {

libavcodec/get_bits.h:388:5: 
  386. {
  387.     int buffer_size;
  388.     int ret = 0;
           ^
  389. 
  390.     if (bit_size > INT_MAX - 7 || bit_size < 0 || !buffer) {

libavcodec/get_bits.h:390:9: Taking true branch
  388.     int ret = 0;
  389. 
  390.     if (bit_size > INT_MAX - 7 || bit_size < 0 || !buffer) {
               ^
  391.         bit_size    = 0;
  392.         buffer      = NULL;

libavcodec/get_bits.h:391:9: 
  389. 
  390.     if (bit_size > INT_MAX - 7 || bit_size < 0 || !buffer) {
  391.         bit_size    = 0;
               ^
  392.         buffer      = NULL;
  393.         ret         = AVERROR_INVALIDDATA;

libavcodec/get_bits.h:392:9: 
  390.     if (bit_size > INT_MAX - 7 || bit_size < 0 || !buffer) {
  391.         bit_size    = 0;
  392.         buffer      = NULL;
               ^
  393.         ret         = AVERROR_INVALIDDATA;
  394.     }

libavcodec/get_bits.h:393:9: 
  391.         bit_size    = 0;
  392.         buffer      = NULL;
  393.         ret         = AVERROR_INVALIDDATA;
               ^
  394.     }
  395. 

libavcodec/get_bits.h:396:5: 
  394.     }
  395. 
  396.     buffer_size = (bit_size + 7) >> 3;
           ^
  397. 
  398.     s->buffer             = buffer;

libavcodec/get_bits.h:398:5: 
  396.     buffer_size = (bit_size + 7) >> 3;
  397. 
  398.     s->buffer             = buffer;
           ^
  399.     s->size_in_bits       = bit_size;
  400. #if !UNCHECKED_BITSTREAM_READER

libavcodec/get_bits.h:399:5: 
  397. 
  398.     s->buffer             = buffer;
  399.     s->size_in_bits       = bit_size;
           ^
  400. #if !UNCHECKED_BITSTREAM_READER
  401.     s->size_in_bits_plus8 = bit_size + 8;

libavcodec/get_bits.h:401:5: 
  399.     s->size_in_bits       = bit_size;
  400. #if !UNCHECKED_BITSTREAM_READER
  401.     s->size_in_bits_plus8 = bit_size + 8;
           ^
  402. #endif
  403.     s->buffer_end         = buffer + buffer_size;

libavcodec/get_bits.h:403:5: 
  401.     s->size_in_bits_plus8 = bit_size + 8;
  402. #endif
  403.     s->buffer_end         = buffer + buffer_size;
           ^
  404.     s->index              = 0;
  405. 

libavcodec/get_bits.h:404:5: 
  402. #endif
  403.     s->buffer_end         = buffer + buffer_size;
  404.     s->index              = 0;
           ^
  405. 
  406.     return ret;

libavcodec/get_bits.h:406:5: 
  404.     s->index              = 0;
  405. 
  406.     return ret;
           ^
  407. }
  408. 

libavcodec/get_bits.h:407:1: return from a call to init_get_bits
  405. 
  406.     return ret;
  407. }
       ^
  408. 
  409. /**

libavcodec/smacker.c:616:9: 
614.     init_get_bits(&gb, buf + 4, (buf_size - 4) * 8);
615. 
616.     if(!get_bits1(&gb)){
             ^
617.         av_log(avctx, AV_LOG_INFO, "Sound: no data\n");
618.         *got_frame_ptr = 0;

libavcodec/get_bits.h:280:1: start of procedure get_bits1()
  278. }
  279. 
  280. static inline unsigned int get_bits1(GetBitContext *s)
       ^
  281. {
  282.     unsigned int index = s->index;

libavcodec/get_bits.h:282:5: 
  280. static inline unsigned int get_bits1(GetBitContext *s)
  281. {
  282.     unsigned int index = s->index;
           ^
  283.     uint8_t result     = s->buffer[index >> 3];
  284. #ifdef BITSTREAM_READER_LE

libavcodec/get_bits.h:283:5: 
  281. {
  282.     unsigned int index = s->index;
  283.     uint8_t result     = s->buffer[index >> 3];
           ^
  284. #ifdef BITSTREAM_READER_LE
  285.     result >>= index & 7;
