randombit / botan

Cryptography Toolkit

Home Page:https://botan.randombit.net

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Undefined behavior upon instantiating DL_Group

guidovranken opened this issue · comments

#include <botan/dh.h>

int main(void)
{
    Botan::DL_Group grp(9, 6);
    return 0;
}
src/lib/pubkey/workfactor.cpp:33:31: runtime error: -1.70126 is outside the range of representable values of type 'unsigned long'
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior src/lib/pubkey/workfactor.cpp:33:31 in 

Fixed thanks