mirror of
https://github.com/pret/pokeemerald.git
synced 2026-08-24 11:10:48 -05:00
Fix potential stack memory leak in gbagfx due to out of bounds read (#2162)
Some checks are pending
CI / build (push) Waiting to run
Some checks are pending
CI / build (push) Waiting to run
* 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)
|
||||
FATAL_ERROR("Number of colors must be positive.\n");
|
||||
|
||||
if (numColors > 255)
|
||||
FATAL_ERROR("Number of colors must be less than 256.\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user