Hello Andrew, hello Alex,
in glpk-4.45/src/glpsql.c a memory access error may occur for multiple
line SQL statements.
Please, apply the patch below. I have uploaded patched Windows
executables and sources at
http://sourceforge.net/projects/winglpk/files/winglpk/GLPK-4.45.2/
I also applied the patch described in
http://lists.gnu.org/archive/html/help-glpk/2011-02/msg00049.html
I will go on analyzing the bkf file Alex sent.
Best regards
Xypron
--- glpk-4.45/src/glpsql.c 2010-12-05 10:00:00.000000000 +0100
+++ glpk-4.45/src/glpsql.c 2011-06-30 07:19:49.000000000 +0200
@@ -116,10 +116,13 @@
{
arg = mpl_tab_get_arg(dca, j);
len = strlen(arg);
+ /* add length of part */
lentot += len;
+ /* add length of space separating parts or 0x00 at end of SQL
statement */
+ lentot++;
if (arg[len-1] == ';' || j == narg)
{ /* Join arguments for a single SQL statement */
- sqllines[i] = xmalloc(lentot+1);
+ sqllines[i] = xmalloc(lentot);
sqllines[i+1] = NULL;
sqllines[i][0] = 0x00;
for (j1 = j0; j1 <= j; j1++)
_______________________________________________
Bug-glpk mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-glpk