Commit c10572fe authored by Ed Catmur's avatar Ed Catmur

Don't write plainchar on entry in step a

for the same reason - if we're called on an empty input, the output might not be a writeable pointer.
Results in memory corruption and crash in delete on MSVC.
parent c2fbfc70
......@@ -687,7 +687,9 @@ int base64_decode_block(const char* code_in, const int length_in,
char* plainchar = plaintext_out;
char fragment;
*plainchar = state_in->plainchar;
if (state_in->step != step_a) {
*plainchar = state_in->plainchar;
}
switch (state_in->step)
{
......
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