From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60989) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a6gd9-0004qM-Tw for qemu-devel@nongnu.org; Wed, 09 Dec 2015 10:26:17 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a6gd8-0007bc-Pu for qemu-devel@nongnu.org; Wed, 09 Dec 2015 10:26:11 -0500 Received: from mx1.redhat.com ([209.132.183.28]:55008) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a6gd8-0007bY-K6 for qemu-devel@nongnu.org; Wed, 09 Dec 2015 10:26:10 -0500 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (Postfix) with ESMTPS id 24D9A19CBD1 for ; Wed, 9 Dec 2015 15:26:10 +0000 (UTC) References: <1449670091-5891-1-git-send-email-berrange@redhat.com> <1449670091-5891-2-git-send-email-berrange@redhat.com> From: Eric Blake Message-ID: <56684810.4010803@redhat.com> Date: Wed, 9 Dec 2015 08:26:08 -0700 MIME-Version: 1.0 In-Reply-To: <1449670091-5891-2-git-send-email-berrange@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="IPI48QETGwQmkCdgBSiTHULF9PNWa71u5" Subject: Re: [Qemu-devel] [PATCH v4 1/5] util: add base64 decoding function List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Daniel P. Berrange" , qemu-devel@nongnu.org Cc: Markus Armbruster This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --IPI48QETGwQmkCdgBSiTHULF9PNWa71u5 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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. >=20 > Signed-off-by: Daniel P. Berrange > --- > 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 --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --IPI48QETGwQmkCdgBSiTHULF9PNWa71u5 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJWaEgQAAoJEKeha0olJ0NqsB0H/3MIL2WLQ2JlcSbYNngmBccI xf6nR6BD/PrA7kIB+ThOG2SzUxQaMYUcyoj0JLRj4WKl+eesJh+7nbbKysA65tBZ +rlokDnUJqUfFn/oB14HxZAH5PBXEGk8B0uo/AGcvvTMK5TS0WVi2RIn90tXbtck mof6tCvvock6pJZut2pREo9BcDf73aY/Mmnn+aO2mwPnkDdNdmy2+mOFeaqVV0t3 ywQ6K6uLk37DWbbvxGYyQatoRDk5ei2tVBvnNJ1npctWs2KLe5gwUU0M0cb4XIKT Ao9MgvB9w5zyvtwz1hSa/WvlWeWac8s2pCb0YwgKnyXmDDAU194zUjjvSSqrLbI= =M2Hc -----END PGP SIGNATURE----- --IPI48QETGwQmkCdgBSiTHULF9PNWa71u5--