libavcodec/alsdec.c:1111: error: Integer Overflow L2
  ([0, +oo] - 1):unsigned32 by call to `read_decode_block`.

libavcodec/alsdec.c:1070:28: Assignment
1068.     unsigned int offset = 0;
1069.     unsigned int b;
1070.     ALSBlockData bd[2] = { { 0 } };
                                 ^
1071. 
1072.     bd[0].ra_block         = ra_frame;

libavcodec/alsdec.c:1111:46: Call
1109.         bd[1].raw_other    = bd[0].raw_samples;
1110. 
1111.         if(read_decode_block(ctx, &bd[0]) || read_decode_block(ctx, &bd[1])) {
                                                   ^
1112.             // damaged block, write zero for the rest of the frame
1113.             zero_remaining(b, ctx->num_blocks, div_blocks, bd[0].raw_samples);

libavcodec/alsdec.c:991:1: Parameter `bd->block_length`
  989. /** Read and decode block data successively.
  990.  */
  991. static int read_decode_block(ALSDecContext *ctx, ALSBlockData *bd)
       ^
  992. {
  993.     int ret;

libavcodec/alsdec.c:1000:11: Call
   998.         return ret;
   999. 
  1000.     ret = decode_block(ctx, bd);
                  ^
  1001. 
  1002.     return ret;

libavcodec/alsdec.c:969:1: Parameter `bd->block_length`
    967. /** Decode the block data.
    968.  */
    969. static int decode_block(ALSDecContext *ctx, ALSBlockData *bd)
         ^
    970. {
    971.     unsigned int smp;

libavcodec/alsdec.c:975:9: Call
    973.     // read block type flag and read the samples accordingly
    974.     if (*bd->const_block)
    975.         decode_const_block_data(ctx, bd);
                 ^
    976.     else if (decode_var_block_data(ctx, bd))
    977.         return -1;

libavcodec/alsdec.c:580:1: <LHS trace>
578. /** Decode the block data for a constant block
579.  */
580. static void decode_const_block_data(ALSDecContext *ctx, ALSBlockData *bd)
     ^
581. {
582.     int      smp = bd->block_length - 1;

libavcodec/alsdec.c:580:1: Parameter `bd->block_length`
      578. /** Decode the block data for a constant block
      579.  */
      580. static void decode_const_block_data(ALSDecContext *ctx, ALSBlockData *bd)
           ^
      581. {
      582.     int      smp = bd->block_length - 1;

libavcodec/alsdec.c:582:5: Binary operation: ([0, +oo] - 1):unsigned32 by call to `read_decode_block` 
      580. static void decode_const_block_data(ALSDecContext *ctx, ALSBlockData *bd)
      581. {
      582.     int      smp = bd->block_length - 1;
               ^
      583.     int32_t  val = *bd->raw_samples;
      584.     int32_t *dst = bd->raw_samples + 1;

static void decode_const_block_data(ALSDecContext *ctx, ALSBlockData *bd)
{
    int      smp = bd->block_length - 1;
    int32_t  val = *bd->raw_samples;
    int32_t *dst = bd->raw_samples + 1;
    for (; smp; smp--)
        *dst++ = val;
}
['static int decode_blocks(ALSDecContext *ctx, unsigned int ra_frame,\n                         unsigned int c, const unsigned int *div_blocks,\n                         unsigned int *js_blocks)\n{\n    ALSSpecificConfig *sconf = &ctx->sconf;\n    unsigned int offset = 0;\n    unsigned int b;\n    ALSBlockData bd[2] = { { 0 } };\n    bd[0].ra_block         = ra_frame;\n    bd[0].const_block      = ctx->const_block;\n    bd[0].shift_lsbs       = ctx->shift_lsbs;\n    bd[0].opt_order        = ctx->opt_order;\n    bd[0].store_prev_samples = ctx->store_prev_samples;\n    bd[0].use_ltp          = ctx->use_ltp;\n    bd[0].ltp_lag          = ctx->ltp_lag;\n    bd[0].ltp_gain         = ctx->ltp_gain[0];\n    bd[0].quant_cof        = ctx->quant_cof[0];\n    bd[0].lpc_cof          = ctx->lpc_cof[0];\n    bd[0].prev_raw_samples = ctx->prev_raw_samples;\n    bd[0].js_blocks        = *js_blocks;\n    bd[1].ra_block         = ra_frame;\n    bd[1].const_block      = ctx->const_block;\n    bd[1].shift_lsbs       = ctx->shift_lsbs;\n    bd[1].opt_order        = ctx->opt_order;\n    bd[1].store_prev_samples = ctx->store_prev_samples;\n    bd[1].use_ltp          = ctx->use_ltp;\n    bd[1].ltp_lag          = ctx->ltp_lag;\n    bd[1].ltp_gain         = ctx->ltp_gain[0];\n    bd[1].quant_cof        = ctx->quant_cof[0];\n    bd[1].lpc_cof          = ctx->lpc_cof[0];\n    bd[1].prev_raw_samples = ctx->prev_raw_samples;\n    bd[1].js_blocks        = *(js_blocks + 1);\n    for (b = 0; b < ctx->num_blocks; b++) {\n        unsigned int s;\n        bd[0].block_length = div_blocks[b];\n        bd[1].block_length = div_blocks[b];\n        bd[0].raw_samples  = ctx->raw_samples[c    ] + offset;\n        bd[1].raw_samples  = ctx->raw_samples[c + 1] + offset;\n        bd[0].raw_other    = bd[1].raw_samples;\n        bd[1].raw_other    = bd[0].raw_samples;\n        if(read_decode_block(ctx, &bd[0]) || read_decode_block(ctx, &bd[1])) {\n            zero_remaining(b, ctx->num_blocks, div_blocks, bd[0].raw_samples);\n            zero_remaining(b, ctx->num_blocks, div_blocks, bd[1].raw_samples);\n            return -1;\n        }\n        if (bd[0].js_blocks) {\n            if (bd[1].js_blocks)\n                av_log(ctx->avctx, AV_LOG_WARNING, "Invalid channel pair!\\n");\n            for (s = 0; s < div_blocks[b]; s++)\n                bd[0].raw_samples[s] = bd[1].raw_samples[s] - bd[0].raw_samples[s];\n        } else if (bd[1].js_blocks) {\n            for (s = 0; s < div_blocks[b]; s++)\n                bd[1].raw_samples[s] = bd[1].raw_samples[s] + bd[0].raw_samples[s];\n        }\n        offset  += div_blocks[b];\n        bd[0].ra_block = 0;\n        bd[1].ra_block = 0;\n    }\n    memmove(ctx->raw_samples[c] - sconf->max_order,\n            ctx->raw_samples[c] - sconf->max_order + sconf->frame_length,\n            sizeof(*ctx->raw_samples[c]) * sconf->max_order);\n    return 0;\n}', 'static int read_decode_block(ALSDecContext *ctx, ALSBlockData *bd)\n{\n    int ret;\n    ret = read_block(ctx, bd);\n    if (ret)\n        return ret;\n    ret = decode_block(ctx, bd);\n    return ret;\n}', 'static int decode_block(ALSDecContext *ctx, ALSBlockData *bd)\n{\n    unsigned int smp;\n    if (*bd->const_block)\n        decode_const_block_data(ctx, bd);\n    else if (decode_var_block_data(ctx, bd))\n        return -1;\n    if (*bd->shift_lsbs)\n        for (smp = 0; smp < bd->block_length; smp++)\n            bd->raw_samples[smp] <<= *bd->shift_lsbs;\n    return 0;\n}', 'static void decode_const_block_data(ALSDecContext *ctx, ALSBlockData *bd)\n{\n    int      smp = bd->block_length - 1;\n    int32_t  val = *bd->raw_samples;\n    int32_t *dst = bd->raw_samples + 1;\n    for (; smp; smp--)\n        *dst++ = val;\n}']