From 55aa202ff58477921d783ff9501d7fe3a50e16bb Mon Sep 17 00:00:00 2001 From: akallabeth Date: Thu, 11 Apr 2024 10:47:12 +0200 Subject: [PATCH] [coverity] 1543037 Out-of-bounds read --- rdtk/librdtk/rdtk_font.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rdtk/librdtk/rdtk_font.c b/rdtk/librdtk/rdtk_font.c index ccd8f461a..c44e95256 100644 --- a/rdtk/librdtk/rdtk_font.c +++ b/rdtk/librdtk/rdtk_font.c @@ -410,7 +410,7 @@ static int rdtk_font_parse_descriptor_buffer(rdtkFont* font, uint8_t* buffer, si *r = '\0'; /* start parsing glyph */ - if (index > font->glyphCount) + if (index >= font->glyphCount) return -1; rdtkGlyph* glyph = &font->glyphs[index];