mirror of https://github.com/OISF/suricata
util/base64: fix padding bytes for trailing data
Padding bytes for the last remainder data should be as follows: Case | Remainder bytes | Padding ---------------------------------------------- I | 1 | 3 II | 2 | 2 III | 3 | 1 However, we calculate the decoded_bytes with the formula: decoded_bytes = ASCII_BLOCK - padding this means for Case I when padding is 3 bytes, the decoded_bytes would be 0. This is incorrect for any trailing data. In any of the above cases, if the parsing was successful, there should at least be 1 decoded byte.pull/9198/head
parent
e46b0337e5
commit
095c335c72
Loading…
Reference in New Issue