Files
libwebp/tests/fuzzer/animencoder_fuzzer.cc
James Zern 3307a349ed anim_encode,KeyFramePenalty: add missing cast
`sub_frame.bitstream.size` is a `size_t`. This function intends to
calculate a signed penalty value from 2 instances of the variable. Both
need to be cast to `int64_t` to avoid the calculation being promoted to
unsigned when `size_t` is 64 bits.

Fixes a (harmless) unsigned overflow warning:

```
src/mux/anim_encode.c:1341:60: runtime error: unsigned integer overflow:
  106 - 108 cannot be represented in type 'size_t' (aka 'unsigned long')
```

Bug: 498967191
Change-Id: I45ce174437e5a9bfa856c4d6665f5a60869078b8
2026-04-02 14:49:25 -07:00

9.0 KiB