miracl / MIRACL

MIRACL Cryptographic SDK: Multiprecision Integer and Rational Arithmetic Cryptographic Library is a C software library that is widely regarded by developers as the gold standard open source SDK for elliptic curve cryptography (ECC).
https://miracl.com
645 stars 242 forks source link

Source code ecdh.c: potentially uninitialized local pointer variable #123

Open ghost opened 1 year ago

ghost commented 1 year ago

Hi all I am now working with the provided ecdh.c and ecdh.h codes. I didn't change any thing but the error shows: potentially uninitialized local pointer variable 'q' used ecdh.c line 624 potentially uninitialized local pointer variable 'a' used ecdh.c line 624 potentially uninitialized local pointer variable 'b' used ecdh.c line 624 potentially uninitialized local pointer variable 'r' used ecdh.c line 632 ...... an so on. All the same type of error. Perhaps the code should be updated? I would appreciate for any suggestions or tips!

ghost commented 1 year ago

I just copy the all initialization parts before the if(). Then it should works. Hopes that is helpful to anyone meet the same problem.