Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/videolan/dav1d.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorWan-Teh Chang <wtc@google.com>2022-02-23 04:49:40 +0300
committerWan-Teh Chang <wtc@google.com>2022-02-23 04:49:40 +0300
commite2e2a7963046ed56b5ec73f85d6e30fe88ddd33f (patch)
treebd505a62e8766346c3560e56a5f9688036244b1d /src
parent7e91b59fe79c13b6007aade411da6d98b31ed202 (diff)
Always initialize b->uv_angle in decode_b()
Initialize b->uv_angle to 0 in decode_b(). Fixes a MSan use-of-uninitialized-value warning about b->uv_angle in dav1d_recon_b_intra_16bpc(), reported by ClusterFuzz.
Diffstat (limited to 'src')
-rw-r--r--src/decode.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/decode.c b/src/decode.c
index 9af9143..cbef36b 100644
--- a/src/decode.c
+++ b/src/decode.c
@@ -1242,6 +1242,7 @@ static int decode_b(Dav1dTaskContext *const t,
if (DEBUG_BLOCK_INFO)
printf("Post-uvmode[%d]: r=%d\n", b->uv_mode, ts->msac.rng);
+ b->uv_angle = 0;
if (b->uv_mode == CFL_PRED) {
#define SIGN(a) (!!(a) + ((a) > 0))
const int sign = dav1d_msac_decode_symbol_adapt8(&ts->msac,
@@ -1274,8 +1275,6 @@ static int decode_b(Dav1dTaskContext *const t,
uint16_t *const acdf = ts->cdf.m.angle_delta[b->uv_mode - VERT_PRED];
const int angle = dav1d_msac_decode_symbol_adapt8(&ts->msac, acdf, 6);
b->uv_angle = angle - 3;
- } else {
- b->uv_angle = 0;
}
}