]> git.ipfire.org Git - thirdparty/suricata.git/commit
base64: make decoder handle decoded data space constraints
authorShivani Bhardwaj <shivanib134@gmail.com>
Thu, 2 Jun 2022 15:20:07 +0000 (20:50 +0530)
committerVictor Julien <vjulien@oisf.net>
Mon, 6 Jun 2022 19:12:42 +0000 (21:12 +0200)
commit2eebad50cdfa4682ae100d9576357fa356239ae0
tree64598adb2e68da73b571e03757c09d38c61cd987
parentdec114d206d5b689b58241c0a76e7c4291f6c690
base64: make decoder handle decoded data space constraints

So far, it was the job of caller to send the bae64 decoder a perfect
block of data and take care of the destination buffer (decoded data)
size. Now, make it the decoder's job to take care of any space
constraints that the destination buffer may have and return accordingly.

Also, handle space characters in base64 encoded data as per RFC 2045.

Update MIME parser accordingly to handle the base64 data.

Ticket: 5315
(cherry picked from commit 5b2761977871a94d559a9ba3b026593bb1ffd68b)
src/datasets.c
src/detect-base64-decode.c
src/util-base64.c
src/util-base64.h
src/util-decode-mime.c