From 8e0407a425535d67919101a4685d6876055e49d0 Mon Sep 17 00:00:00 2001 From: hendricks266 Date: Tue, 11 Feb 2020 06:35:17 +0000 Subject: [PATCH] SW: Fix potential buffer overrun in colormap From JFSW commit 18d1c68893693e68d0ce7d41bd1eacbec5655d4f git-svn-id: https://svn.eduke32.com/eduke32@8624 1a8010ca-5511-0410-912e-c29ae57300e0 --- source/sw/src/colormap.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/sw/src/colormap.cpp b/source/sw/src/colormap.cpp index 9145bcb34..e6bc99f44 100644 --- a/source/sw/src/colormap.cpp +++ b/source/sw/src/colormap.cpp @@ -275,7 +275,7 @@ InitPalette(void) // Save default palette // - memcpy(DefaultPalette, palookup[PALETTE_DEFAULT], 256 * 32); + memcpy(DefaultPalette, palookup[PALETTE_DEFAULT], 256 * numshades); // // Dive palettes