bug-glpk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-glpk] Illegal memory access in printf


From: glpk xypron
Subject: [Bug-glpk] Illegal memory access in printf
Date: Fri, 29 Oct 2010 00:03:36 +0200

Hello Andrew,

the following model creates unexpected output. The underlying
bug may cause a memory access error.

printf "\";
end;

If the last character of the format string is a backslash,
the printf command does not recognize the 0x00 terminator
and outputs data until reaching another 0x00.

Please apply the patch below to glpmpl03.c.

Best regards

Xypron

--- glpmpl03.c  2010-06-03 10:00:00.000000000 +0200
+++ glpmpl03.c  2010-10-28 10:54:34.154069600 +0200
@@ -5857,6 +5857,8 @@
                print_char(mpl, '\t');
             else if (*c == 'n')
                print_char(mpl, '\n');
+            else if (*c == '\0')
+               error(mpl, "missing control letter");
             else
                print_char(mpl, *c);
          }

-- 
GRATIS! Movie-FLAT mit über 300 Videos. 
Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome



reply via email to

[Prev in Thread] Current Thread [Next in Thread]