Skip to content
Myr

render: fix pixman_filter_create_separable_convolution call

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Found it by linking to a pixman built with ubsan. pixman_filter_create_separable_convolution expects an int for the subsample_bits_x/y values. Passing 1 to pixman_int_to_fixed turns it into 65536, from there it immediately blows up when pixman is built with ubsan or miraculously just works with a regular build.

authored by odrling · committed by Daniel Eklöf · parent 15b478d · Browse files · 1 file+1 added−2 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+1 added−2 removed

  • other:+1 added−2 removed

1 file+1 added−2 removed

modified:render.c+1 added-2 removed
1511 unmodified lines
1512 pixman_double_to_fixed(1. / scale),1513 pixman_double_to_fixed(1. / scale),1514 kernel, kernel,1515 kernel, kernel,1516 pixman_int_to_fixed(1),1517 pixman_int_to_fixed(1));1516 1, 1);15171518 if (params != NULL || param_count == 0) {1519 pixman_image_set_filter(1520 png, PIXMAN_FILTER_SEPARABLE_CONVOLUTION,
669 unmodified lines