On 12/09/2015 07:08 AM, Daniel P. Berrange wrote: > The standard glib provided g_base64_decode doesn't provide any > kind of sensible error checking on its input. Add a QEMU custom > wrapper qbase64_decode which can be used with untrustworthy > input that can contain invalid base64 characters, embedded > NUL characters, or not be NUL terminated at all. > > Signed-off-by: Daniel P. Berrange <[email protected]> > --- > include/qemu/base64.h | 58 +++++++++++++++++++++++++++ > tests/.gitignore | 1 + > tests/Makefile | 3 ++ > tests/test-base64.c | 109 > ++++++++++++++++++++++++++++++++++++++++++++++++++ > util/Makefile.objs | 1 + > util/base64.c | 60 +++++++++++++++++++++++++++ > 6 files changed, 232 insertions(+) > create mode 100644 include/qemu/base64.h > create mode 100644 tests/test-base64.c > create mode 100644 util/base64.c
Reviewed-by: Eric Blake <[email protected]> -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
