[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-stable] [PATCH v2] qga: Rewrite code where using readdir_r
From: |
Eric Blake |
Subject: |
Re: [Qemu-stable] [PATCH v2] qga: Rewrite code where using readdir_r |
Date: |
Fri, 26 Sep 2014 09:45:31 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.1.0 |
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 <address@hidden>
> ---
> 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 <address@hidden>
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature