From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59954) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZxM67-00087m-KO for qemu-devel@nongnu.org; Fri, 13 Nov 2015 16:41:32 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZxM64-0002RS-EG for qemu-devel@nongnu.org; Fri, 13 Nov 2015 16:41:31 -0500 References: <1447436727-26484-1-git-send-email-berrange@redhat.com> From: Eric Blake Message-ID: <56465906.50509@redhat.com> Date: Fri, 13 Nov 2015 14:41:26 -0700 MIME-Version: 1.0 In-Reply-To: <1447436727-26484-1-git-send-email-berrange@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="8RT5UvSoqf8wcB4SoU2JthfHHfcE2Nd18" Subject: Re: [Qemu-devel] [PATCH] crypto: avoid two coverity false positive error reports List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Daniel P. Berrange" , qemu-devel@nongnu.org Cc: qemu-trivial@nongnu.org, Paolo Bonzini This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --8RT5UvSoqf8wcB4SoU2JthfHHfcE2Nd18 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 11/13/2015 10:45 AM, Daniel P. Berrange wrote: > In qcrypto_tls_creds_get_path() coverity complains that > we are checking '*creds' for NULL, despite having > dereferenced it previously. This is harmless bug due > to fact that the trace call was too early. Moving it > after the cleanup gets the desired semantics. >=20 > In qcrypto_tls_creds_check_cert_key_purpose() coverity > complains that we're passing a pointer to a previously > free'd buffer into gnutls_x509_crt_get_key_purpose_oid() > This is harmless because we're passing a size =3D=3D 0, so > gnutls won't access the buffer, but rather just report > what size it needs to be. We can avoid it though by > explicitly setting the buffer to NULL after free'ing > it. >=20 > Signed-off-by: Daniel P. Berrange > --- > crypto/tlscreds.c | 4 ++-- > crypto/tlscredsx509.c | 1 + > 2 files changed, 3 insertions(+), 2 deletions(-) Reviewed-by: Eric Blake --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --8RT5UvSoqf8wcB4SoU2JthfHHfcE2Nd18 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/ iQEcBAEBCAAGBQJWRlkHAAoJEKeha0olJ0NqClEIAIp94/ccg8y0Q3sGlj0Id1Ww sF27MPaXq9snqFtSV+MAKwfnotRCvyMkI/PopedizVXP/mvdI9eU8Jle5gVMzQMB Z36PwrzKSf/gNgpJAWjK+eHTcGFV87lElnoRYddXNwk76WRix2V143GDFNSZTwQb Y9siVF1IUNGnGJ/HZAmMUwpdqdiehi4S3CxIGzlIHD92TG1XZWkZ12AdJrDTpNDp rXhLZfjUIdRCxqJQKBK9FFLfyDxVyJ5KEXBu047aWUDPcSslGtRu1/Rken7bDHNK PtBkuXkXS0NSGBoa11vAyCjgEZd5r8Mi9x78txMRL4YModnwv8N7Vzc4to8IXZA= =35JX -----END PGP SIGNATURE----- --8RT5UvSoqf8wcB4SoU2JthfHHfcE2Nd18--