From 52c2ac341d0a096feab1a6166d02a80798514ce6 Mon Sep 17 00:00:00 2001 From: C0deAi Date: Wed, 25 Apr 2018 18:55:07 -0400 Subject: [PATCH 1/3] CodeAi generated fix for CWE 561 Dead Code Value stored to 'ret' is never read Signed-off-by: C0deAi --- enc/strings.c | 1 - 1 file changed, 1 deletion(-) diff --git a/enc/strings.c b/enc/strings.c index 6ae377f..f8f1c61 100644 --- a/enc/strings.c +++ b/enc/strings.c @@ -92,7 +92,6 @@ static char **read_config_file(FILE *f, int *num_of_params) if (a[0] == ';') { - ret = fscanf(f, "%[^\n]", a); continue; } } From b4d82e794b27241faaf354247e4fc4673b16672e Mon Sep 17 00:00:00 2001 From: C0deAi Date: Wed, 25 Apr 2018 18:57:33 -0400 Subject: [PATCH 2/3] CodeAi generated fix for CWE 561 Dead Code Value stored to 'bit_start' is never read Signed-off-by: C0deAi --- dec/read_bits.c | 1 - 1 file changed, 1 deletion(-) diff --git a/dec/read_bits.c b/dec/read_bits.c index 130b53d..676aedb 100644 --- a/dec/read_bits.c +++ b/dec/read_bits.c @@ -282,7 +282,6 @@ int read_block(decoder_info_t *decoder_info,stream_t *stream,block_info_dec_t *b int16_t *coeff_v = block_info->coeffq_v; zerovec.y = zerovec.x = 0; - bit_start = stream->bitcnt; mode = decoder_info->mode; int coeff_block_type = (mode == MODE_INTRA)<<1; From ab7aa731bbee71de1d9d1d8d190ffe9290668f08 Mon Sep 17 00:00:00 2001 From: C0deAi Date: Wed, 25 Apr 2018 19:14:52 -0400 Subject: [PATCH 3/3] CodeAi generated fix for CWE 131 Allocator sizeof operand mismatch Result of 'malloc' is converted to a pointer of type 'int', which is incompatible with sizeof operand type 'cost_t' Signed-off-by: C0deAi --- common/temporal_interp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/temporal_interp.c b/common/temporal_interp.c index 4c32a59..9beaf9e 100644 --- a/common/temporal_interp.c +++ b/common/temporal_interp.c @@ -107,7 +107,7 @@ static mv_data_t* alloc_mv_data(int w, int h, int bs, int bbs, int ratio, int k, data->mv[1]=(mv_t*) malloc(area*sizeof(mv_t)); data->cost[0]=(cost_t*) malloc(area*sizeof(cost_t)); data->cost[1]=(cost_t*) malloc(area*sizeof(cost_t)); - data->bgmap=(int*) malloc(area*sizeof(cost_t)); + data->bgmap=(int*) malloc(area*sizeof(int)); if (interpolate) { data->ratio=ratio;