qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] hw/9pfs: use g_strdup_printf() instead of PATH_


From: Gang Chen
Subject: Re: [Qemu-devel] [PATCH] hw/9pfs: use g_strdup_printf() instead of PATH_MAX limitation
Date: Mon, 24 Feb 2014 19:16:44 +0800

Firstly, thank you very much for your reviewing.  :-)

On 02/24/2014 05:22 PM, Markus Armbruster wrote:
> Chen Gang <address@hidden> writes:
>
>> When path is truncated by PATH_MAX limitation, it causes QEMU to access
>> incorrect file. So use original full path instead of PATH_MAX within
>> 9pfs (need check/process ENOMEM for related memory allocation).
>>
>> Also find/fix several another related issues when failure occurs.
>>
>>  - check 'fh' in handle_name_to_path().
>>

As you said at the bottom, it is not an issue, need be skipped.

>>  - need call v9fs_string_free() at 'err_out:' in local_unlinkat().
>>
>>  - sprintf() will cause memory overflow in "virtio-9p-local.c"
>
> Sound like distinct bugs.  Have you considered fixing them in separate
> patches for easier review and clearer commit messages?
>

OK, I will/should separate them, but I have to send them (the 2 patches
for 2 issues above) firstly, then send this patch (total 3 patches).

>
[...]
> Can't happen, because g_malloc() returns NULL only when its argument is
> zero.  Many more instances below, also with other memory allocation
> functions, such as g_strdup_printf().  Please clean up and resubmit.
>

OK, thank you, I will/should clean up and resubmit.

Excuse me, I have no enough time resources during work day, so I
will/should send the patches within week end (2014-03-02). If we can not
bear the time point, please help send the patches for me.

Thanks.
-- 
Chen Gang

Open, share, and attitude like air, water, and life which God blessed



reply via email to

[Prev in Thread] Current Thread [Next in Thread]