cpp-base64 icon indicating copy to clipboard operation
cpp-base64 copied to clipboard

Decode does not safely handle strings of size not multiple of 4

Open jlcordeiro opened this issue 3 years ago • 1 comments

Passing the decode method a strings of size so that (size % 4) != 0

causes the algorithm to try to read memory not belonging to the input data

jlcordeiro avatar Dec 20 '22 23:12 jlcordeiro

I see if ( ( pos + 2 < length_of_string ) ... can you explain?

br101 avatar Sep 25 '23 09:09 br101