[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-glpk] bug detected in glpk sql module
From: |
Andrew Makhorin |
Subject: |
[Bug-glpk] bug detected in glpk sql module |
Date: |
Fri, 21 Mar 2008 07:25:49 +0300 |
A bug was detected in the glpk sql module (incorrect pointer is
passed to the routine xfree in case of invalid sql syntax).
To fix the bug right now please replace src/glpsql.c by a patched
version (see the attachment) or apply the following patch:
--- glpk/glpk/trunk/glpk-4.28/src/glpsql.c 2008/03/20
21:07:51 202
+++ glpk/glpk/trunk/glpk-4.28/src/glpsql.c 2008/03/20
22:58:45 204
@@ -342,8 +342,7 @@
SQLDisconnect(sql->hdbc);
SQLFreeHandle(SQL_HANDLE_DBC, sql->hdbc);
SQLFreeHandle(SQL_HANDLE_ENV, sql->henv);
- xfree(sql->query);
- xfree(sql);
+ xfree(sql);
return NULL;
}
/* commit statement */
@@ -759,8 +758,7 @@
xprintf("db_mysql_open: Query\n\"%s\"\nfailed.\n",
query);
xprintf("%s\n",mysql_error(sql->con));
mysql_close(sql->con);
- xfree(query);
- xfree(sql);
+ xfree(sql);
return NULL;
}
}
glpsql.c.gz
Description: GNU Zip compressed data
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Bug-glpk] bug detected in glpk sql module,
Andrew Makhorin <=