Fix a crash in FTCharToGlyphIndexMap::find(). Addresses SF bug #2471550.
diff --git a/src/FTCharToGlyphIndexMap.h b/src/FTCharToGlyphIndexMap.h
index 0d09003..70f7904 100644
--- a/src/FTCharToGlyphIndexMap.h
+++ b/src/FTCharToGlyphIndexMap.h
@@ -106,7 +106,8 @@ class FTCharToGlyphIndexMap
// Find position of char code in buckets
div_t pos = div(c, FTCharToGlyphIndexMap::BucketSize);
- if(!this->Indices[pos.quot])
+ if (pos.quot >= FTCharToGlyphIndexMap::NumberOfBuckets
+ || !this->Indices[pos.quot])
{
return 0;
}