randombit / botan

Cryptography Toolkit

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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

BigInt right-shifting can cause std::vector to throw std::length_error

guidovranken opened this issue · comments

#include <botan/bigint.h>

int main(void)
{
    Botan::BigInt("0") >> (uint32_t)-1;

    return 0;
}
terminate called after throwing an instance of 'std::length_error'
  what():  vector::_M_default_append
Aborted (core dumped)

Fixed now thanks!