Fixed Out-of-bound read in glyph_cache_put

CVE-2020-11098 thanks to @antonio-morales for finding this.
This commit is contained in:
akallabeth 2020-05-25 09:42:02 +02:00 committed by Armin Novak
parent 6ade7b4cbf
commit c0fd449ec0

View File

@ -579,7 +579,7 @@ BOOL glyph_cache_put(rdpGlyphCache* glyphCache, UINT32 id, UINT32 index, rdpGlyp
return FALSE;
}
if (index > glyphCache->glyphCache[id].number)
if (index >= glyphCache->glyphCache[id].number)
{
WLog_ERR(TAG, "invalid glyph cache index: %" PRIu32 " in cache id: %" PRIu32 "", index, id);
return FALSE;