During a build of giflib
, the below issue was reported at build time. Attached patch should fix the issue based on compiler hints.
giflib: Patch buffer overrun revealed by FORTIFY_SOURCE
--- a/giftext.c 2025-01-09 20:54:01.061791223 +0000
+++ b/giftext.c 2025-01-09 21:04:39.525735979 +0000
@@ -418,7 +418,7 @@
static void PrintExtBlock(GifByteType *Extension, bool Reset) {
static int CrntPlace = 0;
static long ExtCount = 0;
- static char HexForm[49], AsciiForm[17];
+ static char HexForm[49], AsciiForm[18];
if (Reset || Extension == NULL) {
if (Extension == NULL) {
@@ -464,7 +464,7 @@
static void PrintPixelBlock(GifByteType *PixelBlock, int Len, bool Reset) {
static int CrntPlace = 0;
static long ExtCount = 0;
- static char HexForm[49], AsciiForm[17];
+ static char HexForm[49], AsciiForm[18];
int i;
if (Reset || PixelBlock == NULL) {