From 0ab962425c08521110a29de45e943a7c064f19e0 Mon Sep 17 00:00:00 2001 From: Dirk Lemstra Date: Sat, 4 May 2024 20:19:38 +0200 Subject: [PATCH] Fix undefined shift my making sure that n is never larger then MAX_PREFIX. --- libde265/cabac.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libde265/cabac.cc b/libde265/cabac.cc index 7d9ca44e..a3f2e8e3 100644 --- a/libde265/cabac.cc +++ b/libde265/cabac.cc @@ -438,7 +438,7 @@ int decode_CABAC_EGk_bypass(CABAC_decoder* decoder, int k) n++; } - if (n == k+MAX_PREFIX) { + if (n == MAX_PREFIX) { return 0; // TODO: error } }