summaryrefslogtreecommitdiffstats
path: root/external/lpsolve/lpsolve-ubsan.patch.0
blob: 7a5e308c6efd071e6b3d05670ccccdb0db9fa321 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
--- lp_presolve.c
+++ lp_presolve.c
@@ -168,7 +168,7 @@
   if(isprimal) {
     if(psdata->primalundo != NULL)
       mat = psdata->primalundo->tracker;
-    solution = lp->full_solution + lp->presolve_undo->orig_rows;
+    solution = lp->full_solution == NULL ? NULL : lp->full_solution + lp->presolve_undo->orig_rows;
     slacks   = lp->full_solution;
   }
   else {
--- lp_pricePSE.c
+++ lp_pricePSE.c
@@ -145,7 +147,7 @@
 
   /* Store the active/current pricing type */
   if(isdual == AUTOMATIC)
-    isdual = (MYBOOL) lp->edgeVector[0];
+    isdual = lp->edgeVector[0] != 0.0;
   else
     lp->edgeVector[0] = isdual;