From 47b0ce552d14c0e4faee3efab7d7cec36ca0a190 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Tue, 10 Mar 2026 10:04:25 -0300 Subject: [PATCH 01/10] [fuzzing] Guard raster/vector create_or_fail results The raster and vector fuzzers called create_or_fail() and then immediately dereferenced the returned pointers. Under CIFuzz's allocation-failure coverage, that turns a valid NULL return into a harness crash instead of treating it as an out-of-memory case. Return early after cleaning up when draw or paint context creation fails. This keeps the fuzzers aligned with the create_or_fail() contract and avoids null-deref crashes unrelated to library logic. Tested: - meson compile -C build hb-raster-fuzzer hb-vector-fuzzer - build/test/fuzzing/hb-vector-fuzzer test/fuzzing/fonts/TwemojiMozilla.subset.ttf - build/test/fuzzing/hb-raster-fuzzer test/fuzzing/fonts/TwemojiMozilla.subset.ttf Assisted-by: OpenAI Codex --- test/fuzzing/hb-raster-fuzzer.cc | 8 +++++++- test/fuzzing/hb-vector-fuzzer.cc | 8 +++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/test/fuzzing/hb-raster-fuzzer.cc b/test/fuzzing/hb-raster-fuzzer.cc index 713d5d69b..277f820c2 100644 --- a/test/fuzzing/hb-raster-fuzzer.cc +++ b/test/fuzzing/hb-raster-fuzzer.cc @@ -56,6 +56,13 @@ extern "C" int LLVMFuzzerTestOneInput (const uint8_t *data, size_t size) hb_raster_draw_t *draw = hb_raster_draw_create_or_fail (); hb_raster_paint_t *paint = hb_raster_paint_create_or_fail (); + if (!draw || !paint) + { + hb_raster_draw_destroy (draw); + hb_raster_paint_destroy (paint); + hb_buffer_destroy (buffer); + return 0; + } hb_raster_paint_set_foreground (paint, HB_COLOR (0, 0, 0, 255)); draw_shaped_text (input.font, buffer, draw, paint); @@ -101,4 +108,3 @@ extern "C" int LLVMFuzzerTestOneInput (const uint8_t *data, size_t size) hb_buffer_destroy (buffer); return counter ? 0 : 0; } - diff --git a/test/fuzzing/hb-vector-fuzzer.cc b/test/fuzzing/hb-vector-fuzzer.cc index 1fdb38970..a1c19b6ba 100644 --- a/test/fuzzing/hb-vector-fuzzer.cc +++ b/test/fuzzing/hb-vector-fuzzer.cc @@ -56,6 +56,13 @@ extern "C" int LLVMFuzzerTestOneInput (const uint8_t *data, size_t size) hb_vector_draw_t *draw = hb_vector_draw_create_or_fail (HB_VECTOR_FORMAT_SVG); hb_vector_paint_t *paint = hb_vector_paint_create_or_fail (HB_VECTOR_FORMAT_SVG); + if (!draw || !paint) + { + hb_vector_draw_destroy (draw); + hb_vector_paint_destroy (paint); + hb_buffer_destroy (buffer); + return 0; + } hb_vector_paint_set_foreground (paint, HB_COLOR (0, 0, 0, 255)); unsigned precision = size ? data[size - 1] % 5 : 0; @@ -105,4 +112,3 @@ extern "C" int LLVMFuzzerTestOneInput (const uint8_t *data, size_t size) hb_buffer_destroy (buffer); return counter ? 0 : 0; } - From 77f5a196502c5b496c4e173c9d12ffbbd6da0839 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Tue, 10 Mar 2026 10:21:28 -0300 Subject: [PATCH 02/10] [vector] Avoid OOM leak in paint initialization hb_vector_paint_ensure_initialized() used group_stack.push() and then treated the returned pointer as a normal success indicator. On allocation failure push() returns the Crap() sentinel, so the subsequent root->alloc(4096) allocated backing storage into the failure sink and leaked under malloc-failure fuzzing. Use push_or_fail() instead and only allocate the root body after a real push succeeds. Tested: - build/test/fuzzing/hb-vector-fuzzer test/fuzzing/fonts/TwemojiMozilla.subset.ttf Assisted-by: OpenAI Codex --- src/hb-vector-svg-paint.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/hb-vector-svg-paint.cc b/src/hb-vector-svg-paint.cc index 0ab69be72..ed9aca95d 100644 --- a/src/hb-vector-svg-paint.cc +++ b/src/hb-vector-svg-paint.cc @@ -1016,9 +1016,9 @@ hb_vector_paint_ensure_initialized (hb_vector_paint_t *paint) { if (paint->group_stack.length) return; - auto *root = paint->group_stack.push (); - if (likely (root)) - root->alloc (4096); + if (unlikely (!paint->group_stack.push_or_fail ())) + return; + paint->group_stack.tail ().alloc (4096); } static void From c395ca8a43904208c99ea151fad36476440a9988 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Tue, 10 Mar 2026 10:30:58 -0300 Subject: [PATCH 03/10] [vector] Avoid double-free on blob creation failure hb_svg_blob_from_buffer() handed buffer ownership to hb_blob_create() in the non-recycled path and then ran its own failure cleanup. When hb_blob_create() failed, it had already invoked the destroy callback, so the local cleanup freed the same buffer again. Use hb_blob_create_or_fail() there instead so allocation failure returns nullptr without triggering the empty-blob fallback and its conflicting cleanup semantics. Tested: - meson compile -C build hb-vector-fuzzer Assisted-by: OpenAI Codex --- src/hb-vector-svg-paint.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/hb-vector-svg-paint.cc b/src/hb-vector-svg-paint.cc index ed9aca95d..e3d0a6eff 100644 --- a/src/hb-vector-svg-paint.cc +++ b/src/hb-vector-svg-paint.cc @@ -203,7 +203,9 @@ hb_svg_blob_from_buffer (hb_blob_t **recycled_blob, else { hb_svg_blob_meta_set_buffer (meta, data, allocated); - blob = hb_blob_create (data, len, HB_MEMORY_MODE_WRITABLE, meta, hb_svg_blob_meta_destroy); + blob = hb_blob_create_or_fail (data, len, HB_MEMORY_MODE_WRITABLE, meta, hb_svg_blob_meta_destroy); + if (unlikely (!blob)) + return nullptr; } if (unlikely (blob == hb_blob_get_empty ())) From b6b8f8dccae26f67b6fcf344a2bc3e57591096b6 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Tue, 10 Mar 2026 10:41:10 -0300 Subject: [PATCH 04/10] [vector] Avoid double-free in draw blob creation Mirror the blob-creation failure fix from vector paint in the SVG draw path. The non-recycled branch handed ownership to hb_blob_create(), which may already run the destroy callback on failure, and then fell into local cleanup that freed the same buffer again. Switch that branch to hb_blob_create_or_fail() so failure reports nullptr without conflicting cleanup. Tested: - meson compile -C build hb-vector-fuzzer Assisted-by: OpenAI Codex --- src/hb-vector-svg-draw.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/hb-vector-svg-draw.cc b/src/hb-vector-svg-draw.cc index 99379e33f..dd80f7464 100644 --- a/src/hb-vector-svg-draw.cc +++ b/src/hb-vector-svg-draw.cc @@ -217,7 +217,9 @@ hb_svg_blob_from_buffer (hb_blob_t **recycled_blob, else { hb_svg_blob_meta_set_buffer (meta, data, allocated); - blob = hb_blob_create (data, len, HB_MEMORY_MODE_WRITABLE, meta, hb_svg_blob_meta_destroy); + blob = hb_blob_create_or_fail (data, len, HB_MEMORY_MODE_WRITABLE, meta, hb_svg_blob_meta_destroy); + if (unlikely (!blob)) + return nullptr; } if (unlikely (blob == hb_blob_get_empty ())) From 4fd90c836a66aea9d7b8dda3ba40cda98a0dc392 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Tue, 10 Mar 2026 10:42:29 -0300 Subject: [PATCH 05/10] [vector] Fix OOM handling in SVG subset id collection hb_svg_add_unique_id() used v->push() and tested the returned pointer for null. hb_vector_t::push() reports allocation failure via the vector error state and returns the Crap() sentinel, so the old check did not reliably stop on OOM. Check v->in_error() after push() before writing into the new slot. Assisted-by: OpenAI Codex --- src/hb-vector-svg-subset.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/hb-vector-svg-subset.cc b/src/hb-vector-svg-subset.cc index d0b35c60c..3cc06a916 100644 --- a/src/hb-vector-svg-subset.cc +++ b/src/hb-vector-svg-subset.cc @@ -178,7 +178,8 @@ hb_svg_add_unique_id (hb_vector_t *v, if (unlikely (!seen_ids->set (key, true))) return false; auto *slot = v->push (); - if (!slot) return false; + if (unlikely (v->in_error ())) + return false; *slot = key; return true; } From adf7e9dcb2e81ba25e4508d4d9b274357ea58ffc Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Tue, 10 Mar 2026 10:50:02 -0300 Subject: [PATCH 06/10] [vector] Guard paint render after init failure hb_vector_paint_render() assumed ensure_initialized() had created the root group body and indexed group_stack[0] unconditionally. Under malloc-failure fuzzing, initialization can fail while extents are already set, leaving group_stack empty and causing a null-deref. Return nullptr if initialization did not produce the root group. Assisted-by: OpenAI Codex --- src/hb-vector-svg-paint.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/hb-vector-svg-paint.cc b/src/hb-vector-svg-paint.cc index e3d0a6eff..470d68df0 100644 --- a/src/hb-vector-svg-paint.cc +++ b/src/hb-vector-svg-paint.cc @@ -2093,6 +2093,8 @@ hb_vector_paint_render (hb_vector_paint_t *paint) return nullptr; hb_vector_paint_ensure_initialized (paint); + if (unlikely (!paint->group_stack.length)) + return nullptr; hb_vector_t out; hb_svg_recover_recycled_buffer (paint->recycled_blob, &out); From 4ec529008493ac7f178619f6b789c73b8a43d5f6 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Tue, 10 Mar 2026 10:52:40 -0300 Subject: [PATCH 07/10] [vector] Propagate paint init failures hb_vector_paint_ensure_initialized() can fail under malloc-failure fuzzing, but several paint callbacks assumed the root group existed immediately afterward and accessed current_body() or group_stack[0]. Make initialization report success and bail out at the callers that require the root group. Also use push_or_fail() for the extra group stack entries created by grouping and glyph caching. Assisted-by: OpenAI Codex --- src/hb-vector-svg-paint.cc | 57 ++++++++++++++++++++++++-------------- 1 file changed, 36 insertions(+), 21 deletions(-) diff --git a/src/hb-vector-svg-paint.cc b/src/hb-vector-svg-paint.cc index 470d68df0..31e61bcaa 100644 --- a/src/hb-vector-svg-paint.cc +++ b/src/hb-vector-svg-paint.cc @@ -1013,14 +1013,15 @@ hb_vector_paint_funcs_get () return static_vector_paint_funcs.get_unconst (); } -static void +static hb_bool_t hb_vector_paint_ensure_initialized (hb_vector_paint_t *paint) { if (paint->group_stack.length) - return; + return true; if (unlikely (!paint->group_stack.push_or_fail ())) - return; + return false; paint->group_stack.tail ().alloc (4096); + return !paint->group_stack.in_error (); } static void @@ -1032,7 +1033,8 @@ hb_vector_paint_push_transform (hb_paint_funcs_t *, void *) { auto *paint = (hb_vector_paint_t *) paint_data; - hb_vector_paint_ensure_initialized (paint); + if (unlikely (!hb_vector_paint_ensure_initialized (paint))) + return; if (unlikely (paint->transform_group_overflow_depth)) { @@ -1078,7 +1080,8 @@ hb_vector_paint_pop_transform (hb_paint_funcs_t *, void *) { auto *paint = (hb_vector_paint_t *) paint_data; - hb_vector_paint_ensure_initialized (paint); + if (unlikely (!hb_vector_paint_ensure_initialized (paint))) + return; if (unlikely (paint->transform_group_overflow_depth)) { paint->transform_group_overflow_depth--; @@ -1101,7 +1104,8 @@ hb_vector_paint_push_clip_glyph (hb_paint_funcs_t *, void *) { auto *paint = (hb_vector_paint_t *) paint_data; - hb_vector_paint_ensure_initialized (paint); + if (unlikely (!hb_vector_paint_ensure_initialized (paint))) + return; if (!hb_set_has (paint->defined_outlines, glyph)) { @@ -1139,7 +1143,8 @@ hb_vector_paint_push_clip_rectangle (hb_paint_funcs_t *, void *) { auto *paint = (hb_vector_paint_t *) paint_data; - hb_vector_paint_ensure_initialized (paint); + if (unlikely (!hb_vector_paint_ensure_initialized (paint))) + return; unsigned clip_id = paint->clip_rect_counter++; hb_svg_append_str (&paint->defs, "current_body (), "\n"); } @@ -1177,7 +1183,8 @@ hb_vector_paint_color (hb_paint_funcs_t *, void *) { auto *paint = (hb_vector_paint_t *) paint_data; - hb_vector_paint_ensure_initialized (paint); + if (unlikely (!hb_vector_paint_ensure_initialized (paint))) + return; hb_color_t c = color; if (is_foreground) @@ -1204,7 +1211,8 @@ hb_vector_paint_image (hb_paint_funcs_t *, void *) { auto *paint = (hb_vector_paint_t *) paint_data; - hb_vector_paint_ensure_initialized (paint); + if (unlikely (!hb_vector_paint_ensure_initialized (paint))) + return false; auto &body = paint->current_body (); if (format == HB_TAG ('s','v','g',' ')) @@ -1289,7 +1297,8 @@ hb_vector_paint_linear_gradient (hb_paint_funcs_t *, void *) { auto *paint = (hb_vector_paint_t *) paint_data; - hb_vector_paint_ensure_initialized (paint); + if (unlikely (!hb_vector_paint_ensure_initialized (paint))) + return; hb_vector_t &stops = paint->color_stops_scratch; if (!hb_svg_get_color_stops (paint, color_line, &stops) || !stops.length) @@ -1330,7 +1339,8 @@ hb_vector_paint_radial_gradient (hb_paint_funcs_t *, void *) { auto *paint = (hb_vector_paint_t *) paint_data; - hb_vector_paint_ensure_initialized (paint); + if (unlikely (!hb_vector_paint_ensure_initialized (paint))) + return; hb_vector_t &stops = paint->color_stops_scratch; if (!hb_svg_get_color_stops (paint, color_line, &stops) || !stops.length) @@ -1378,7 +1388,8 @@ hb_vector_paint_sweep_gradient (hb_paint_funcs_t *, void *) { auto *paint = (hb_vector_paint_t *) paint_data; - hb_vector_paint_ensure_initialized (paint); + if (unlikely (!hb_vector_paint_ensure_initialized (paint))) + return; hb_vector_t &stops = paint->color_stops_scratch; if (!hb_svg_get_color_stops (paint, color_line, &stops) || !stops.length) @@ -1402,8 +1413,9 @@ hb_vector_paint_push_group (hb_paint_funcs_t *, void *) { auto *paint = (hb_vector_paint_t *) paint_data; - hb_vector_paint_ensure_initialized (paint); - paint->group_stack.push (hb_vector_t {}); + if (unlikely (!hb_vector_paint_ensure_initialized (paint))) + return; + paint->group_stack.push_or_fail (hb_vector_t {}); } static void @@ -1413,7 +1425,8 @@ hb_vector_paint_pop_group (hb_paint_funcs_t *, void *) { auto *paint = (hb_vector_paint_t *) paint_data; - hb_vector_paint_ensure_initialized (paint); + if (unlikely (!hb_vector_paint_ensure_initialized (paint))) + return; if (paint->group_stack.length < 2) return; @@ -1441,7 +1454,8 @@ hb_vector_paint_color_glyph (hb_paint_funcs_t *, void *) { auto *paint = (hb_vector_paint_t *) paint_data; - hb_vector_paint_ensure_initialized (paint); + if (unlikely (!hb_vector_paint_ensure_initialized (paint))) + return false; hb_codepoint_t old_gid = paint->current_svg_image_glyph; hb_face_t *old_face = paint->current_face; paint->current_svg_image_glyph = glyph; @@ -1900,7 +1914,8 @@ hb_vector_paint_glyph (hb_vector_paint_t *paint, } } - hb_vector_paint_ensure_initialized (paint); + if (unlikely (!hb_vector_paint_ensure_initialized (paint))) + return false; bool can_cache = !paint->flat; hb_svg_color_glyph_cache_key_t cache_key = hb_svg_color_glyph_cache_key (glyph, @@ -1935,7 +1950,8 @@ hb_vector_paint_glyph (hb_vector_paint_t *paint, bool has_svg_image = false; if (can_cache) { - paint->group_stack.push (hb_vector_t {}); + if (unlikely (!paint->group_stack.push_or_fail (hb_vector_t {}))) + return false; paint->current_color_glyph_has_svg_image = false; } @@ -2092,8 +2108,7 @@ hb_vector_paint_render (hb_vector_paint_t *paint) if (!paint->has_extents) return nullptr; - hb_vector_paint_ensure_initialized (paint); - if (unlikely (!paint->group_stack.length)) + if (unlikely (!hb_vector_paint_ensure_initialized (paint))) return nullptr; hb_vector_t out; From 95462193eb9978dd9625b5daa9182196d1c63dad Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Tue, 10 Mar 2026 11:11:23 -0300 Subject: [PATCH 08/10] [raster] Bound SVG path parsing work hb_raster_svg_parse_path_data() had no complexity cap, unlike the other new raster SVG subsystems that already bound recursion depth, attribute count, and gradient stops. Malformed path data could therefore spend excessive time in parsing and bbox/render work under fuzzing. Add a hard limit on parsed path segments and expose it through hb-limits.hh so the budget is defined alongside the other shared parser/work limits. Assisted-by: OpenAI Codex --- src/hb-limits.hh | 4 ++++ src/hb-raster-svg-parse.cc | 3 +++ 2 files changed, 7 insertions(+) diff --git a/src/hb-limits.hh b/src/hb-limits.hh index 857e18373..acd1bc904 100644 --- a/src/hb-limits.hh +++ b/src/hb-limits.hh @@ -108,5 +108,9 @@ #define HB_MAX_COMPOSITE_OPERATIONS_PER_GLYPH 64 #endif +#ifndef HB_SVG_MAX_PATH_SEGMENTS +#define HB_SVG_MAX_PATH_SEGMENTS 262144 +#endif + #endif /* HB_LIMITS_HH */ diff --git a/src/hb-raster-svg-parse.cc b/src/hb-raster-svg-parse.cc index ecf689641..0bdb47106 100644 --- a/src/hb-raster-svg-parse.cc +++ b/src/hb-raster-svg-parse.cc @@ -246,9 +246,12 @@ hb_raster_svg_parse_path_data (hb_svg_str_t d, hb_draw_funcs_t *dfuncs, void *dr float last_cx = 0, last_cy = 0; char last_cmd = 0; char cmd = 0; + unsigned segments = 0; while (fp.p < fp.end) { + if (unlikely (segments++ >= HB_SVG_MAX_PATH_SEGMENTS)) + break; fp.skip_ws_comma (); if (fp.p >= fp.end) break; From a0714506d63045c763d25ce60d626bdc38325dab Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Tue, 10 Mar 2026 11:39:03 -0300 Subject: [PATCH 09/10] [raster] Bound temporary clip mask buffers hb_raster_paint_push_clip_from_emitter() and the general clip rectangle path could allocate and clear full-surface temporary A8 clip masks with no explicit size cap, leading to timeout-scale work on malformed inputs. Reuse the raster buffer size policy for these temporary masks as well, and move that limit into hb-limits.hh so raster images and clip masks share the same bound. Assisted-by: OpenAI Codex --- src/hb-limits.hh | 4 ++++ src/hb-raster-image.cc | 4 +--- src/hb-raster-paint.cc | 10 +++++++--- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/src/hb-limits.hh b/src/hb-limits.hh index acd1bc904..8dc7b1ae2 100644 --- a/src/hb-limits.hh +++ b/src/hb-limits.hh @@ -112,5 +112,9 @@ #define HB_SVG_MAX_PATH_SEGMENTS 262144 #endif +#ifndef HB_RASTER_MAX_BUFFER_SIZE +#define HB_RASTER_MAX_BUFFER_SIZE ((size_t) 1 << 30) +#endif + #endif /* HB_LIMITS_HH */ diff --git a/src/hb-raster-image.cc b/src/hb-raster-image.cc index f339c00b7..ea89aa61e 100644 --- a/src/hb-raster-image.cc +++ b/src/hb-raster-image.cc @@ -395,8 +395,6 @@ composite_pixel (uint32_t src, uint32_t dst, /* hb_raster_image_t */ -#define HB_RASTER_IMAGE_MAX_BUFFER_SIZE ((size_t) 1 << 30) - unsigned hb_raster_image_t::bytes_per_pixel (hb_raster_format_t format) { @@ -423,7 +421,7 @@ hb_raster_image_t::configure (hb_raster_format_t format, return false; size_t buf_size = (size_t) extents.stride * extents.height; - if (buf_size > HB_RASTER_IMAGE_MAX_BUFFER_SIZE) + if (buf_size > HB_RASTER_MAX_BUFFER_SIZE) return false; if (unlikely (!buffer.resize_dirty (buf_size))) return false; diff --git a/src/hb-raster-paint.cc b/src/hb-raster-paint.cc index a88e0f044..84657cdd6 100644 --- a/src/hb-raster-paint.cc +++ b/src/hb-raster-paint.cc @@ -213,7 +213,9 @@ hb_raster_paint_push_clip_from_emitter (hb_raster_paint_t *c, } /* Allocate alpha buffer and intersect with previous clip */ - if (unlikely (!new_clip.alpha.resize (new_clip.stride * h))) + size_t clip_size = (size_t) new_clip.stride * h; + if (unlikely (clip_size > HB_RASTER_MAX_BUFFER_SIZE || + !new_clip.alpha.resize ((unsigned) clip_size))) { hb_raster_draw_recycle_image (rdr, mask_img); hb_raster_paint_push_empty_clip (c, w, h); @@ -434,12 +436,14 @@ hb_raster_paint_push_clip_rectangle (hb_paint_funcs_t *pfuncs HB_UNUSED, { /* General case: rasterize transformed quad as alpha mask */ new_clip.is_rect = false; - if (unlikely (!new_clip.alpha.resize (new_clip.stride * h))) + size_t clip_size = (size_t) new_clip.stride * h; + if (unlikely (clip_size > HB_RASTER_MAX_BUFFER_SIZE || + !new_clip.alpha.resize ((unsigned) clip_size))) { hb_raster_paint_push_empty_clip (c, w, h); return; } - hb_memset (new_clip.alpha.arrayZ, 0, new_clip.stride * h); + hb_memset (new_clip.alpha.arrayZ, 0, (unsigned) clip_size); /* Convert quad corners to pixel-relative coords */ float qx[4], qy[4]; From 331ef99cd8b2b0a36ea256cfb082b64f19a2196f Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Tue, 10 Mar 2026 11:40:02 -0300 Subject: [PATCH 10/10] [raster] Reduce buffer size cap Lower HB_RASTER_MAX_BUFFER_SIZE from 1<<30 to 1<<24 so the shared raster image / clip-mask limit meaningfully constrains pathological fuzzer inputs instead of allowing timeout-scale temporary buffers. Assisted-by: OpenAI Codex --- src/hb-limits.hh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hb-limits.hh b/src/hb-limits.hh index 8dc7b1ae2..5b9954d98 100644 --- a/src/hb-limits.hh +++ b/src/hb-limits.hh @@ -113,7 +113,7 @@ #endif #ifndef HB_RASTER_MAX_BUFFER_SIZE -#define HB_RASTER_MAX_BUFFER_SIZE ((size_t) 1 << 30) +#define HB_RASTER_MAX_BUFFER_SIZE ((size_t) 1 << 24) #endif