Undefined left shift by -1 in ord2w_dloghyb
jschanck opened this issue · 1 comments
jschanck commented
It is possible for the following line to be executed with ord=1, in which case the left shift is undefined.
PQCrypto-SIDH/src/compression/dlog.c
Line 183 in 0b6f740
It would be OK to multiply through by 2 or 4 here, there's no risk of overflow.
patricklonga commented
Thanks for reporting this issue, John. A related variable wasn't properly corrected to the range [0, p-1] before being tested against 0. I pushed a fix.