summaryrefslogtreecommitdiffstats
path: root/patches/ccpi-regularisation-toolkit-fgptv-integer-overflow.patch
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@ipecompute4.ands.kit.edu>2022-09-06 19:12:09 +0200
committerSuren A. Chilingaryan <csa@ipecompute4.ands.kit.edu>2022-09-06 19:12:09 +0200
commitefa4313aa57e4c3511eb1d5d88edc37e99f899fa (patch)
treeb4061f583770608a19a313a9ef40cef71cc053d2 /patches/ccpi-regularisation-toolkit-fgptv-integer-overflow.patch
parent4616a04086c1f9248008add524a9cf74ffecca33 (diff)
downloadccpi-efa4313aa57e4c3511eb1d5d88edc37e99f899fa.tar.gz
ccpi-efa4313aa57e4c3511eb1d5d88edc37e99f899fa.tar.bz2
ccpi-efa4313aa57e4c3511eb1d5d88edc37e99f899fa.tar.xz
ccpi-efa4313aa57e4c3511eb1d5d88edc37e99f899fa.zip
Add all CCPi patches (patches are not applied automatically, but just collected)
Diffstat (limited to 'patches/ccpi-regularisation-toolkit-fgptv-integer-overflow.patch')
-rw-r--r--patches/ccpi-regularisation-toolkit-fgptv-integer-overflow.patch12
1 files changed, 12 insertions, 0 deletions
diff --git a/patches/ccpi-regularisation-toolkit-fgptv-integer-overflow.patch b/patches/ccpi-regularisation-toolkit-fgptv-integer-overflow.patch
new file mode 100644
index 0000000..cc53b1d
--- /dev/null
+++ b/patches/ccpi-regularisation-toolkit-fgptv-integer-overflow.patch
@@ -0,0 +1,12 @@
+diff -dPNur CCPi-Regularisation-Toolkit-orig/src/Core/regularisers_CPU/FGP_TV_core.c CCPi-Regularisation-Toolkit/src/Core/regularisers_CPU/FGP_TV_core.c
+--- CCPi-Regularisation-Toolkit-orig/src/Core/regularisers_CPU/FGP_TV_core.c 2021-12-17 12:17:12.000000000 +0100
++++ CCPi-Regularisation-Toolkit/src/Core/regularisers_CPU/FGP_TV_core.c 2022-09-06 18:52:32.460225737 +0200
+@@ -104,7 +104,7 @@
+ else {
+ /*3D case*/
+ float *Output_prev=NULL, *P1=NULL, *P2=NULL, *P3=NULL, *P1_prev=NULL, *P2_prev=NULL, *P3_prev=NULL, *R1=NULL, *R2=NULL, *R3=NULL;
+- DimTotal = (long)(dimX*dimY*dimZ);
++ DimTotal = (long)dimX*(long)dimY*(long)dimZ;
+
+ if (epsil != 0.0f) Output_prev = calloc(DimTotal, sizeof(float));
+ P1 = calloc(DimTotal, sizeof(float));