bug-glpk
[Top][All Lists]
Advanced

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

Re: [Bug-glpk] Segmentation fault (core dumped) in table statement


From: Andrew Makhorin
Subject: Re: [Bug-glpk] Segmentation fault (core dumped) in table statement
Date: Sun, 28 Sep 2008 21:48:56 +0400

To fix the bug reported by Xypron please apply the patch below.
Note that the bug will be fixed in the next release of the package.

*** glpk-4.31/src/glpmpl03.c    Tue Sep  2 12:00:00 2008
--- glpk-4.32/src/glpmpl03.c    Thu Sep  4 12:00:00 2008
***************
*** 4895,4900 ****
--- 4895,4903 ----
        for (arg = tab->arg; arg != NULL; arg = arg->next)
           dca->na++;
        dca->arg = xcalloc(1+dca->na, sizeof(char *));
+ #if 1 /* 28/IX-2008 */
+       for (k = 1; k <= dca->na; k++) dca->arg[k] = NULL;
+ #endif
        /* evaluate argument values */
        k = 0;
        for (arg = tab->arg; arg != NULL; arg = arg->next)
***************
*** 5088,5093 ****
--- 5091,5099 ----
              mpl_tab_drv_close(mpl);
           if (dca->arg != NULL)
           {  for (k = 1; k <= dca->na; k++)
+ #if 1 /* 28/IX-2008 */
+                if (dca->arg[k] != NULL)
+ #endif
                 xfree(dca->arg[k]);
              xfree(dca->arg);
           }





reply via email to

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