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

libavcodec/smacker.c:566:1: start of procedure smka_decode_frame()
564.  * Decode Smacker audio data
565.  */
566. static int smka_decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt)
     ^
567. {
568.     const uint8_t *buf = avpkt->data;

libavcodec/smacker.c:568:5: 
566. static int smka_decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt)
567. {
568.     const uint8_t *buf = avpkt->data;
         ^
569.     int buf_size = avpkt->size;
570.     GetBitContext gb;

libavcodec/smacker.c:569:5: 
567. {
568.     const uint8_t *buf = avpkt->data;
569.     int buf_size = avpkt->size;
         ^
570.     GetBitContext gb;
571.     HuffContext h[4];

libavcodec/smacker.c:573:5: 
571.     HuffContext h[4];
572.     VLC vlc[4];
573.     int16_t *samples = data;
         ^
574.     int8_t *samples8 = data;
575.     int val;

libavcodec/smacker.c:574:5: 
572.     VLC vlc[4];
573.     int16_t *samples = data;
574.     int8_t *samples8 = data;
         ^
575.     int val;
576.     int i, res;

libavcodec/smacker.c:579:5: 
577.     int unp_size;
578.     int bits, stereo;
579.     int pred[2] = {0, 0};
         ^
580. 
581.     unp_size = AV_RL32(buf);

libavcodec/smacker.c:581:5: 
579.     int pred[2] = {0, 0};
580. 
581.     unp_size = AV_RL32(buf);
         ^
582. 
583.     init_get_bits(&gb, buf + 4, (buf_size - 4) * 8);

libavcodec/smacker.c:583:5: 
581.     unp_size = AV_RL32(buf);
582. 
583.     init_get_bits(&gb, buf + 4, (buf_size - 4) * 8);
         ^
584. 
585.     if(!get_bits1(&gb)){

libavcodec/get_bits.h:391:1: start of procedure init_get_bits()
  389.  * responsible for checking for the buffer end yourself (take advantage of the padding)!
  390.  */
  391. static inline void init_get_bits(GetBitContext *s,
       ^
  392.                    const uint8_t *buffer, int bit_size)
  393. {

libavcodec/get_bits.h:394:5: 
  392.                    const uint8_t *buffer, int bit_size)
  393. {
  394.     int buffer_size = (bit_size+7)>>3;
           ^
  395.     if (buffer_size < 0 || bit_size < 0) {
  396.         buffer_size = bit_size = 0;

libavcodec/get_bits.h:395:9: Taking true branch
  393. {
  394.     int buffer_size = (bit_size+7)>>3;
  395.     if (buffer_size < 0 || bit_size < 0) {
               ^
  396.         buffer_size = bit_size = 0;
  397.         buffer = NULL;

libavcodec/get_bits.h:396:9: 
  394.     int buffer_size = (bit_size+7)>>3;
  395.     if (buffer_size < 0 || bit_size < 0) {
  396.         buffer_size = bit_size = 0;
               ^
  397.         buffer = NULL;
  398.     }

libavcodec/get_bits.h:397:9: 
  395.     if (buffer_size < 0 || bit_size < 0) {
  396.         buffer_size = bit_size = 0;
  397.         buffer = NULL;
               ^
  398.     }
  399. 

libavcodec/get_bits.h:400:5: 
  398.     }
  399. 
  400.     s->buffer       = buffer;
           ^
  401.     s->size_in_bits = bit_size;
  402.     s->buffer_end   = buffer + buffer_size;

libavcodec/get_bits.h:401:5: 
  399. 
  400.     s->buffer       = buffer;
  401.     s->size_in_bits = bit_size;
           ^
  402.     s->buffer_end   = buffer + buffer_size;
  403. #ifdef ALT_BITSTREAM_READER

libavcodec/get_bits.h:402:5: 
  400.     s->buffer       = buffer;
  401.     s->size_in_bits = bit_size;
  402.     s->buffer_end   = buffer + buffer_size;
           ^
  403. #ifdef ALT_BITSTREAM_READER
  404.     s->index        = 0;

libavcodec/get_bits.h:404:5: 
  402.     s->buffer_end   = buffer + buffer_size;
  403. #ifdef ALT_BITSTREAM_READER
  404.     s->index        = 0;
           ^
  405. #elif defined A32_BITSTREAM_READER
  406.     s->buffer_ptr   = (uint32_t*)((intptr_t)buffer & ~3);

libavcodec/get_bits.h:410:1: return from a call to init_get_bits
  408.     skip_bits_long(s, 0);
  409. #endif
  410. }
       ^
  411. 
  412. static inline void align_get_bits(GetBitContext *s)

libavcodec/smacker.c:585:9: 
583.     init_get_bits(&gb, buf + 4, (buf_size - 4) * 8);
584. 
585.     if(!get_bits1(&gb)){
             ^
586.         av_log(avctx, AV_LOG_INFO, "Sound: no data\n");
587.         *data_size = 0;

libavcodec/get_bits.h:311:1: start of procedure get_bits1()
  309. }
  310. 
  311. static inline unsigned int get_bits1(GetBitContext *s){
       ^
  312. #ifdef ALT_BITSTREAM_READER
  313.     unsigned int index = s->index;

libavcodec/get_bits.h:313:5: 
  311. static inline unsigned int get_bits1(GetBitContext *s){
  312. #ifdef ALT_BITSTREAM_READER
  313.     unsigned int index = s->index;
           ^
  314.     uint8_t result = s->buffer[index>>3];
  315. #ifdef ALT_BITSTREAM_READER_LE

libavcodec/get_bits.h:314:5: 
  312. #ifdef ALT_BITSTREAM_READER
  313.     unsigned int index = s->index;
  314.     uint8_t result = s->buffer[index>>3];
           ^
  315. #ifdef ALT_BITSTREAM_READER_LE
  316.     result >>= index & 7;
