summaryrefslogtreecommitdiffstats
path: root/external/lpsolve/lpsolve-ubsan.patch.0
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 09:06:44 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 09:06:44 +0000
commited5640d8b587fbcfed7dd7967f3de04b37a76f26 (patch)
tree7a5f7c6c9d02226d7471cb3cc8fbbf631b415303 /external/lpsolve/lpsolve-ubsan.patch.0
parentInitial commit. (diff)
downloadlibreoffice-ed5640d8b587fbcfed7dd7967f3de04b37a76f26.tar.xz
libreoffice-ed5640d8b587fbcfed7dd7967f3de04b37a76f26.zip
Adding upstream version 4:7.4.7.upstream/4%7.4.7upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--external/lpsolve/lpsolve-ubsan.patch.022
1 files changed, 22 insertions, 0 deletions
diff --git a/external/lpsolve/lpsolve-ubsan.patch.0 b/external/lpsolve/lpsolve-ubsan.patch.0
new file mode 100644
index 000000000..7a5e308c6
--- /dev/null
+++ b/external/lpsolve/lpsolve-ubsan.patch.0
@@ -0,0 +1,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;
+