rescrv/libmacaroons — pull request #2 by rgov (2014-05-16 22:54:25+00:00)
Title: Do not silently truncate the key if it is too long

Previously, the length argument passed to memmove was min(sizeof(buffer), input_size), which will silently truncate the key if it is larger than the buffer. This should be a hard failure instead.

It's unclear to me whether it is better to use an assertion, which might be disabled at compile time, or to return -1. Please advise.