Stop decoding when there are no more input bytes.
This commit is contained in:
parent
8d46091533
commit
5e4bca3747
@ -258,6 +258,9 @@ size_t b64Encoder::decode(utility::inputStream& in,
|
||||
}
|
||||
}
|
||||
|
||||
if (count != 4) // input length is not a multiple of 4 bytes
|
||||
break;
|
||||
|
||||
// Decode the bytes
|
||||
byte_t c1 = bytes[0];
|
||||
byte_t c2 = bytes[1];
|
||||
|
Loading…
Reference in New Issue
Block a user