Fix potential stack memory leak in gbagfx due to out of bounds read (#2162)
* fix(tools): gbagfx potential oob read --------- Co-authored-by: sbird <sbird@no.tld>
This commit is contained in:
@@ -333,6 +333,9 @@ void HandleJascToGbaPaletteCommand(char *inputPath, char *outputPath, int argc,
|
|||||||
|
|
||||||
if (numColors < 1)
|
if (numColors < 1)
|
||||||
FATAL_ERROR("Number of colors must be positive.\n");
|
FATAL_ERROR("Number of colors must be positive.\n");
|
||||||
|
|
||||||
|
if (numColors > 255)
|
||||||
|
FATAL_ERROR("Number of colors must be less than 256.\n");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user