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

libavcodec/smacker.c:575:1: start of procedure smka_decode_frame()
573.  * Decode Smacker audio data
574.  */
575. static int smka_decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt)
     ^
576. {
577.     const uint8_t *buf = avpkt->data;

libavcodec/smacker.c:577:5: 
575. static int smka_decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt)
576. {
577.     const uint8_t *buf = avpkt->data;
         ^
578.     int buf_size = avpkt->size;
579.     GetBitContext gb;

libavcodec/smacker.c:578:5: 
576. {
577.     const uint8_t *buf = avpkt->data;
578.     int buf_size = avpkt->size;
         ^
579.     GetBitContext gb;
580.     HuffContext h[4];

libavcodec/smacker.c:582:5: 
580.     HuffContext h[4];
581.     VLC vlc[4];
582.     int16_t *samples = data;
         ^
583.     uint8_t *samples8 = data;
584.     int val;

libavcodec/smacker.c:583:5: 
581.     VLC vlc[4];
582.     int16_t *samples = data;
583.     uint8_t *samples8 = data;
         ^
584.     int val;
585.     int i, res;

libavcodec/smacker.c:588:5: 
586.     int unp_size;
587.     int bits, stereo;
588.     int pred[2] = {0, 0};
         ^
589. 
590.     if (buf_size <= 4) {

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

libavcodec/smacker.c:595:5: 
593.     }
594. 
595.     unp_size = AV_RL32(buf);
         ^
596. 
597.     init_get_bits(&gb, buf + 4, (buf_size - 4) * 8);

libavcodec/smacker.c:597:5: 
595.     unp_size = AV_RL32(buf);
596. 
597.     init_get_bits(&gb, buf + 4, (buf_size - 4) * 8);
         ^
598. 
599.     if(!get_bits1(&gb)){

libavcodec/get_bits.h:383:1: start of procedure init_get_bits()
  381.  * responsible for checking for the buffer end yourself (take advantage of the padding)!
  382.  */
  383. static inline void init_get_bits(GetBitContext *s,
       ^
  384.                    const uint8_t *buffer, int bit_size)
  385. {

libavcodec/get_bits.h:386:5: 
  384.                    const uint8_t *buffer, int bit_size)
  385. {
  386.     int buffer_size = (bit_size+7)>>3;
           ^
  387.     if (buffer_size < 0 || bit_size < 0) {
  388.         buffer_size = bit_size = 0;

libavcodec/get_bits.h:387:9: Taking true branch
  385. {
  386.     int buffer_size = (bit_size+7)>>3;
  387.     if (buffer_size < 0 || bit_size < 0) {
               ^
  388.         buffer_size = bit_size = 0;
  389.         buffer = NULL;

libavcodec/get_bits.h:388:9: 
  386.     int buffer_size = (bit_size+7)>>3;
  387.     if (buffer_size < 0 || bit_size < 0) {
  388.         buffer_size = bit_size = 0;
               ^
  389.         buffer = NULL;
  390.     }

libavcodec/get_bits.h:389:9: 
  387.     if (buffer_size < 0 || bit_size < 0) {
  388.         buffer_size = bit_size = 0;
  389.         buffer = NULL;
               ^
  390.     }
  391. 

libavcodec/get_bits.h:392:5: 
  390.     }
  391. 
  392.     s->buffer       = buffer;
           ^
  393.     s->size_in_bits = bit_size;
  394.     s->buffer_end   = buffer + buffer_size;

libavcodec/get_bits.h:393:5: 
  391. 
  392.     s->buffer       = buffer;
  393.     s->size_in_bits = bit_size;
           ^
  394.     s->buffer_end   = buffer + buffer_size;
  395. #ifdef ALT_BITSTREAM_READER

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

libavcodec/get_bits.h:396:5: 
  394.     s->buffer_end   = buffer + buffer_size;
  395. #ifdef ALT_BITSTREAM_READER
  396.     s->index        = 0;
           ^
  397. #elif defined A32_BITSTREAM_READER
  398.     s->buffer_ptr   = (uint32_t*)((intptr_t)buffer & ~3);

libavcodec/get_bits.h:402:1: return from a call to init_get_bits
  400.     skip_bits_long(s, 0);
  401. #endif
  402. }
       ^
  403. 
  404. static inline void align_get_bits(GetBitContext *s)

libavcodec/smacker.c:599:9: 
597.     init_get_bits(&gb, buf + 4, (buf_size - 4) * 8);
598. 
599.     if(!get_bits1(&gb)){
             ^
600.         av_log(avctx, AV_LOG_INFO, "Sound: no data\n");
601.         *data_size = 0;

libavcodec/get_bits.h:303:1: start of procedure get_bits1()
  301. }
  302. 
  303. static inline unsigned int get_bits1(GetBitContext *s){
       ^
  304. #ifdef ALT_BITSTREAM_READER
  305.     unsigned int index = s->index;

libavcodec/get_bits.h:305:5: 
  303. static inline unsigned int get_bits1(GetBitContext *s){
  304. #ifdef ALT_BITSTREAM_READER
  305.     unsigned int index = s->index;
           ^
  306.     uint8_t result = s->buffer[index>>3];
  307. #ifdef ALT_BITSTREAM_READER_LE

libavcodec/get_bits.h:306:5: 
  304. #ifdef ALT_BITSTREAM_READER
  305.     unsigned int index = s->index;
  306.     uint8_t result = s->buffer[index>>3];
           ^
  307. #ifdef ALT_BITSTREAM_READER_LE
  308.     result >>= index & 7;
