commit dae20cc4c8e5298e229a072c2d53aa28fcca9993 Author: Tim Biermann <tbier@posteo.de> Date: Sat Jan 28 15:46:13 2023 +0100 lpsolve: pulled patches from libreoffice diff --git a/lpsolve/.signature b/lpsolve/.signature index 3e464134b..6022a7ab4 100644 --- a/lpsolve/.signature +++ b/lpsolve/.signature @@ -1,5 +1,6 @@ untrusted comment: verify with /etc/ports/contrib.pub -RWSagIOpLGJF33c5KYui1B2MMN/bWshQqzxi5DGZo3FB2wixvWRHsElEM2H+gOig7clZhL4ZPmPCPJfzNK80Vz+2fLA3+lrXGA8= -SHA256 (Pkgfile) = 0c5a5b2a55b3e5e56079a37bac636056d4d0b0782726b3c2d4e908952003e25f +RWSagIOpLGJF3wzZ4/Nz6v0h8Xq04lCPgZZ/zj3c1gCUi1ABGtNMzPG76MWnvCuwi4nb6vGZLaitmp59YChdlGg9R1vKGbvDqgk= +SHA256 (Pkgfile) = 93bff3316b268126a070b02e6215cb6f59caa5e94fd937307525da024ffd0790 SHA256 (.footprint) = b8cd5cff2918f0486c1bca11e7de996153b71a9452c465d604eed5c40281c1ae SHA256 (lp_solve_5.5.2.11_source.tar.gz) = 6d4abff5cc6aaa933ae8e6c17a226df0fc0b671c438f69715d41d09fe81f902f +SHA256 (lpsolve-ubsan.patch.0) = a369b0dbb1e664dd223bfd303f65f2456e3ab3e78b96152b71d5e41190ef42e1 diff --git a/lpsolve/Pkgfile b/lpsolve/Pkgfile index f1eeff15e..e1ecd7516 100644 --- a/lpsolve/Pkgfile +++ b/lpsolve/Pkgfile @@ -4,12 +4,15 @@ name=lpsolve version=5.5.2.11 -release=2 -source=(https://downloads.sourceforge.net/project/lpsolve/lpsolve/$version/lp_solve_"$version"_source.tar.gz) +release=3 +source=(https://downloads.sourceforge.net/project/lpsolve/lpsolve/$version/lp_solve_"$version"_source.tar.gz + lpsolve-ubsan.patch.0) build() { cd lp_solve_${version:0:3} + patch -Np0 -i $SRC/lpsolve-ubsan.patch.0 + sed -e "s|^\(opts=\).*|\1'$CFLAGS'|" -i lpsolve55/ccc lp_solve/ccc ( cd lpsolve55 diff --git a/lpsolve/lpsolve-ubsan.patch.0 b/lpsolve/lpsolve-ubsan.patch.0 new file mode 100644 index 000000000..7a5e308c6 --- /dev/null +++ b/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; +