if (len > b_result.size()) {
len = b_result.size();
}
- return (std::vector<uint8_t>(&b_result[0], &b_result[len]));
+ // Return vector with content. Construct &b_result[len] attempts
+ // to get an address of one element beyond the b_result. Replaced
+ // with the address of first element + len
+ return (std::vector<uint8_t>(&b_result[0], &b_result[0]+len));
} catch (const Botan::Exception& exc) {
isc_throw(isc::cryptolink::LibraryError,
"Botan error: " << exc.what());
if (len > b_result.size()) {
len = b_result.size();
}
- return (std::vector<uint8_t>(&b_result[0], &b_result[len]));
+ // Return vector with content. Construct &b_result[len] attempts
+ // to get an address of one element beyond the b_result. Replaced
+ // with the address of first element + len
+ return (std::vector<uint8_t>(&b_result[0], &b_result[0]+len));
} catch (const Botan::Exception& exc) {
isc_throw(LibraryError, "Botan error: " << exc.what());
}