libgpuverify

Signature verification on GPUs (WiP)
Log | Files | Refs | README | LICENSE

commit f0b217a0f0227da1d10f6275b8d803c83256e03d
parent fd6091a95ba057dabd495239a57d1d03f3f367b9
Author: Cedric <cedric.zwahlen@students.bfh.ch>
Date:   Tue,  5 Dec 2023 01:13:49 +0100

Fix memory issue

Diffstat:
Msource/montgomery-test.c | 10++++++----
Mxcode/lib-gpu-verify.xcodeproj/project.xcworkspace/xcuserdata/cedriczwahlen.xcuserdatad/UserInterfaceState.xcuserstate | 0
2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/source/montgomery-test.c b/source/montgomery-test.c @@ -422,13 +422,15 @@ int mont_rsa_tests(void) { memset(m, 0, str_sz); memset(s, 0, str_sz); - memset(b_off, 0, str_sz); - memset(e_off, 0, str_sz); - memset(m_off, 0, str_sz); - memset(s_off, 0, str_sz); + memset(b_off, 0, pairs * sizeof(unsigned long)); + memset(e_off, 0, pairs * sizeof(unsigned long)); + memset(m_off, 0, pairs * sizeof(unsigned long)); + memset(s_off, 0, pairs * sizeof(unsigned long)); unsigned long *pks = malloc(pairs * sizeof(unsigned long)); + memset(pks, 0, pairs * sizeof(unsigned long)); + mpz_pairs_from_files(b, b_off, e, e_off, m, m_off, s, s_off, pks, &pairs); diff --git a/xcode/lib-gpu-verify.xcodeproj/project.xcworkspace/xcuserdata/cedriczwahlen.xcuserdatad/UserInterfaceState.xcuserstate b/xcode/lib-gpu-verify.xcodeproj/project.xcworkspace/xcuserdata/cedriczwahlen.xcuserdatad/UserInterfaceState.xcuserstate Binary files differ.