[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: |
Markus Armbruster |
Subject: |
Re: [Qemu-devel] [PATCH] hw/9pfs: use g_strdup_printf() instead of PATH_MAX limitation |
Date: |
Mon, 24 Feb 2014 13:52:58 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux) |
Gang Chen <address@hidden> writes:
> 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.
Next weekend should be fine. Happy hacking!
- Re: [Qemu-devel] [PATCH] hw/9pfs/virtio-9p-local.c: use snprintf() instead of sprintf(), (continued)
- Re: [Qemu-devel] [PATCH] hw/9pfs/virtio-9p-local.c: use snprintf() instead of sprintf(), Chen Gang, 2014/02/04
- Re: [Qemu-devel] [PATCH] hw/9pfs/virtio-9p-local.c: use snprintf() instead of sprintf(), Daniel P. Berrange, 2014/02/04
- Re: [Qemu-devel] [PATCH] hw/9pfs/virtio-9p-local.c: use snprintf() instead of sprintf(), Chen Gang, 2014/02/04
- Re: [Qemu-devel] [PATCH] hw/9pfs/virtio-9p-local.c: use snprintf() instead of sprintf(), Aneesh Kumar K.V, 2014/02/04
- Re: [Qemu-devel] [PATCH] hw/9pfs/virtio-9p-local.c: use snprintf() instead of sprintf(), Chen Gang, 2014/02/04
- Re: [Qemu-devel] [PATCH] hw/9pfs/virtio-9p-local.c: use snprintf() instead of sprintf(), Chen Gang, 2014/02/15
- [Qemu-devel] [PATCH] hw/9pfs: use g_strdup_printf() instead of PATH_MAX limitation, Chen Gang, 2014/02/22
- Re: [Qemu-devel] [PATCH] hw/9pfs: use g_strdup_printf() instead of PATH_MAX limitation, Chen Gang, 2014/02/23
- Re: [Qemu-devel] [PATCH] hw/9pfs: use g_strdup_printf() instead of PATH_MAX limitation, Markus Armbruster, 2014/02/24
- Re: [Qemu-devel] [PATCH] hw/9pfs: use g_strdup_printf() instead of PATH_MAX limitation, Gang Chen, 2014/02/24
- Re: [Qemu-devel] [PATCH] hw/9pfs: use g_strdup_printf() instead of PATH_MAX limitation,
Markus Armbruster <=
- Re: [Qemu-devel] [PATCH] hw/9pfs: use g_strdup_printf() instead of PATH_MAX limitation, Chen Gang, 2014/02/27
- Re: [Qemu-devel] [PATCH] hw/9pfs/virtio-9p-local.c: use snprintf() instead of sprintf(), Eric Blake, 2014/02/04
- Re: [Qemu-devel] [PATCH] hw/9pfs/virtio-9p-local.c: use snprintf() instead of sprintf(), Markus Armbruster, 2014/02/04
- Re: [Qemu-devel] [PATCH] hw/9pfs/virtio-9p-local.c: use snprintf() instead of sprintf(), Eric Blake, 2014/02/04
- Re: [Qemu-devel] [PATCH] hw/9pfs/virtio-9p-local.c: use snprintf() instead of sprintf(), Chen Gang, 2014/02/04