qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: zhanghailiang <zhang.zhanghailiang@huawei.com>, 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
Subject: Re: [Qemu-devel] [PATCH v2] qga: Rewrite code where using readdir_r
Date: Fri, 26 Sep 2014 09:45:31 -0600	[thread overview]
Message-ID: <54258A1B.1060604@redhat.com> (raw)
In-Reply-To: <1411096150-3044-1-git-send-email-zhang.zhanghailiang@huawei.com>

[-- Attachment #1: Type: text/plain, Size: 634 bytes --]

On 09/18/2014 09:09 PM, zhanghailiang wrote:
> If readdir_r fails, error_setg_errno will reference the freed
> pointer *dirpath*.
> 
> Moreover, readdir_r may cause a buffer overflow, using readdir instead.
> 
> Signed-off-by: zhanghailiang <zhang.zhanghailiang@huawei.com>
> ---
>  v2:
> - Switch readdir_r to readdir (Comment of Eric Blake)
> ---
>  qga/commands-posix.c | 27 +++++++++++++++------------
>  1 file changed, 15 insertions(+), 12 deletions(-)
> 

Reviewed-by: Eric Blake <eblake@redhat.com>

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 539 bytes --]

  parent reply	other threads:[~2014-09-26 15:46 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-19  3:09 [Qemu-devel] [PATCH v2] qga: Rewrite code where using readdir_r zhanghailiang
2014-09-26  8:32 ` zhanghailiang
2014-09-26 15:40 ` Paolo Bonzini
2014-09-28  6:06   ` zhanghailiang
2014-09-26 15:45 ` Eric Blake [this message]
2014-10-01 17:47 ` Michael Roth

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=54258A1B.1060604@redhat.com \
    --to=eblake@redhat.com \
    --cc=armbru@redhat.com \
    --cc=lcapitulino@redhat.com \
    --cc=luonengjun@huawei.com \
    --cc=mdroth@linux.vnet.ibm.com \
    --cc=peter.huangpeng@huawei.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-stable@nongnu.org \
    --cc=zhang.zhanghailiang@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).