In load_key_vector(), the program passes a std::vector<byte> to
a C-style function, load_key (const byte*begin, const byte*end)
by creating references
load_key (& (K[0]), & (K[K.size()]));
However, accessing the one-past-the-last element in a std::vector
via [] is not allowed in C++, it triggers an assertion failure.
Assertion '__builtin_expect(__n < this->size(), true)' failed.
In this commit, we use K.data() and K.data() + K.size() to expose
the underlying pointers and pass them to the C function.
Signed-off-by: Tom Li <tomli@tomli.me>
A minor bug was discovered in padding of short message signatures. If is
silently fixed, causing some (very minor) incompatibility of signatures
with previous versions.