Commit 75039c57 authored by Tatsuhiro Tsujikawa's avatar Tatsuhiro Tsujikawa

base64: Assert that input is multiple of 4

parent 4b5179a5
......@@ -108,7 +108,7 @@ OutputIt decode(InputIt first, InputIt last, OutputIt d_first) {
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1};
assert(std::distance(first, last) % 4 == 0);
auto p = d_first;
for (; first != last;) {
uint32_t n = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment