mirror of https://github.com/acidanthera/audk.git
89910a39dc
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1135 For 4bit BMP, there are only 2^4 = 16 colors in the palette. But when a corrupted BMP contains more than 16 colors in the palette, today's implementation wrongly copies all colors to the local PaletteValue[16] array which causes stack overflow. The similar issue also exists in the logic to handle 8bit BMP. The patch fixes the issue by only copies the first 16 or 256 colors in the palette depending on the BMP type. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ray Ni <ray.ni@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Reviewed-by: Jian J Wang <jian.j.wang@intel.com> |
||
---|---|---|
.. | ||
ConfigKeywordHandler.c | ||
ConfigRouting.c | ||
Database.c | ||
Font.c | ||
HiiDatabase.h | ||
HiiDatabase.uni | ||
HiiDatabaseDxe.inf | ||
HiiDatabaseEntry.c | ||
HiiDatabaseExtra.uni | ||
Image.c | ||
ImageEx.c | ||
String.c |