From ca2b9cb97c0ab1b196e879d9ebe87747a7ef2020 Mon Sep 17 00:00:00 2001 From: aliaspider Date: Mon, 24 Oct 2016 20:25:21 +0100 Subject: [PATCH] freetype: fix invalid write. --- gfx/drivers_font_renderer/freetype.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gfx/drivers_font_renderer/freetype.c b/gfx/drivers_font_renderer/freetype.c index 50cdb9aa80..a77f8ccde6 100644 --- a/gfx/drivers_font_renderer/freetype.c +++ b/gfx/drivers_font_renderer/freetype.c @@ -166,8 +166,8 @@ static bool font_renderer_create_atlas(ft_font_renderer_t *handle, float font_si freetype_atlas_slot_t* slot = NULL; /* TODO: find a better way to determine max_width/max_height */ - unsigned max_width = font_size; - unsigned max_height = font_size; + unsigned max_width = font_size + 2; + unsigned max_height = font_size + 2; handle->atlas.width = max_width * FT_ATLAS_COLS; handle->atlas.height = max_height * FT_ATLAS_ROWS;