From 2312d488aaa4cd7a777cedf1d635756e4d06d6d6 Mon Sep 17 00:00:00 2001 From: Tobias Jakobi Date: Thu, 7 Aug 2014 23:26:00 +0200 Subject: [PATCH] exynos: fix font rendering It would just segfault after a while, since we weren't deferencing the 'msg' pointer to check for the end of the string. Eventually this would let 'msg' point to invalid memory. --- gfx/exynos_gfx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gfx/exynos_gfx.c b/gfx/exynos_gfx.c index 5a91cc8414..efbbda51ed 100644 --- a/gfx/exynos_gfx.c +++ b/gfx/exynos_gfx.c @@ -1125,7 +1125,7 @@ static int exynos_render_msg(struct exynos_video *vid, atlas = vid->font_driver->get_atlas(vid->font); - for (; msg; ++msg) { + for (; *msg; ++msg) { const struct font_glyph *glyph = vid->font_driver->get_glyph(vid->font, (uint8_t)*msg); if (glyph == NULL) continue;