From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41327) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XXXic-00047p-90 for qemu-devel@nongnu.org; Fri, 26 Sep 2014 11:46:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XXXiX-000712-Ql for qemu-devel@nongnu.org; Fri, 26 Sep 2014 11:46:02 -0400 Message-ID: <54258A1B.1060604@redhat.com> Date: Fri, 26 Sep 2014 09:45:31 -0600 From: Eric Blake MIME-Version: 1.0 References: <1411096150-3044-1-git-send-email-zhang.zhanghailiang@huawei.com> In-Reply-To: <1411096150-3044-1-git-send-email-zhang.zhanghailiang@huawei.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="JAMAwuSapFN551lCkq7e9TC4kirWOTD8c" Subject: Re: [Qemu-devel] [PATCH v2] qga: Rewrite code where using readdir_r List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: zhanghailiang , qemu-devel@nongnu.org Cc: mdroth@linux.vnet.ibm.com, armbru@redhat.com, luonengjun@huawei.com, peter.huangpeng@huawei.com, qemu-stable@nongnu.org, lcapitulino@redhat.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --JAMAwuSapFN551lCkq7e9TC4kirWOTD8c Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 09/18/2014 09:09 PM, zhanghailiang wrote: > If readdir_r fails, error_setg_errno will reference the freed > pointer *dirpath*. >=20 > Moreover, readdir_r may cause a buffer overflow, using readdir instead.= >=20 > Signed-off-by: zhanghailiang > --- > v2: > - Switch readdir_r to readdir (Comment of Eric Blake) > --- > qga/commands-posix.c | 27 +++++++++++++++------------ > 1 file changed, 15 insertions(+), 12 deletions(-) >=20 Reviewed-by: Eric Blake --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --JAMAwuSapFN551lCkq7e9TC4kirWOTD8c Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg iQEcBAEBCAAGBQJUJYobAAoJEKeha0olJ0Nq6vQIAIW+2Q2ufwiPdUrAzPezinL8 UiWb0j4a0ifIYa4uKarU2ZqC9sxnAHHAW8tgthu1Aqf8H5qwlM1Weyc0vhAsH+p2 CDP2Bce9ZrvtKCtkjpxCAZOyaqOosAPNo8hulP29Ei0cUAO7PgdyzRgHC2ioVp5U 9oJCQKeHPnD8facv3rXdfES+yjW4GknizMOISWiqgkJs5rA/4wuXHmPeoMp0EAuF BQu0HfL6Q4l6lm/8d9KS2LaNU8Jv7efPFknPMFTSn8j72c52K15WWyaSHskPET/y Wp9FX77Ng00/4o2oqKSIkMeTDJcN3eAF3lA7vjYPOViIMMndXTKmxgg4CvlhnwY= =pNa1 -----END PGP SIGNATURE----- --JAMAwuSapFN551lCkq7e9TC4kirWOTD8c--