summaryrefslogtreecommitdiff
path: root/Userland/Libraries
diff options
context:
space:
mode:
authorZaggy1024 <zaggy1024@gmail.com>2023-02-02 05:15:36 -0600
committerJelle Raaijmakers <jelle@gmta.nl>2023-02-03 09:10:14 +0100
commit69e9f9ff638573d5a79012a298989246bd0995c1 (patch)
tree9df03ffbbc933d99cc8a2efa769635ae672fce39 /Userland/Libraries
parentf58c5ff569a738339349a2aaee36d175eddff891 (diff)
downloadserenity-69e9f9ff638573d5a79012a298989246bd0995c1.zip
LibVideo/VP9: Prevent negation overflow in BitStream::read_s
Diffstat (limited to 'Userland/Libraries')
-rw-r--r--Userland/Libraries/LibVideo/VP9/BitStream.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Libraries/LibVideo/VP9/BitStream.cpp b/Userland/Libraries/LibVideo/VP9/BitStream.cpp
index 8b8fba12ab..e9f6ba371c 100644
--- a/Userland/Libraries/LibVideo/VP9/BitStream.cpp
+++ b/Userland/Libraries/LibVideo/VP9/BitStream.cpp
@@ -145,8 +145,8 @@ ErrorOr<u8> BitStream::read_literal(u8 n)
ErrorOr<i8> BitStream::read_s(size_t n)
{
- auto value = TRY(read_bits(n));
- auto sign = TRY(read_bit());
+ i8 value = TRY(read_bits(n));
+ bool sign = TRY(read_bit());
return sign ? -value : value;
}