Botan::SecureVector - Destructor called in Constructor???

Posted by sheepsimulator on Stack Overflow See other posts from Stack Overflow or by sheepsimulator
Published on 2010-05-25T16:04:27Z Indexed on 2010/05/25 16:11 UTC
Read the original article Hit count: 217

Filed under:
|

When using the Botan::SecureVector in the following unit test:

void UnitTest()
{
    std::vector<byte> vbData;
    vbData.push_back(0x04);
    vbData.push_back(0x04);
    vbData.push_back(0x04);

    Botan::SecureVector<Botan::byte> svData(&vbData[0], vbData.size());
    CPPUNIT_ASSERT(vbData == std::vector<byte>(svData.begin(), svData.end()));
}

a segmentation fault occurs when trying to allocate the SecureVector.

© Stack Overflow or respective owner

Related posts about c++

Related posts about botan