mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-24 08:21:32 +01:00
hb_raster_draw_render() computed y_top by left-shifting a signed value that can be negative when extents have a negative y origin. Switch to 64-bit multiplication by HB_RASTER_ONE_PIXEL and clamp to int32_t range before use, preserving behavior without signed-shift UB. Tested: - CCACHE_DISABLE=1 ninja -C /home/behdad/harfbuzz/build-codex test/fuzzing/hb-raster-fuzzer - ./build-codex/test/fuzzing/hb-raster-fuzzer test/fuzzing/fonts/clusterfuzz-testcase-minimized-hb-raster-fuzzer-6454028543524864 Fixes: https://oss-fuzz.com/testcase-detail/6454028543524864 Assisted-by: OpenAI Codex