[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 05/15] sheepdog: Fix snapshot ID parsing in _ope
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH 05/15] sheepdog: Fix snapshot ID parsing in _open(), _create, _goto() |
Date: |
Thu, 2 Mar 2017 17:30:33 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 |
On 03/02/2017 03:43 PM, Markus Armbruster wrote:
> sd_parse_uri() and sd_snapshot_goto() screw up error checking after
> strtoul(), and truncate long tag names silently. Fix by replacing
> those parts by new sd_parse_snapid_or_tag(), which checks more
> carefully.
At least we've fixed checkpatch to gripe at new uses of strtoul(), but
yeah, we've got lots of existing poor usage. It is a very hard
interface to use correctly, as evidenced by your cleanups here.
>
> sd_snapshot_delete() also parses snapshot IDs, but is currently too
> broken for me to touch. Mark TODO.
>
> Two calls of strtol() without error checking remain in
> parse_redundancy(). Mark them FIXME.
>
> More silent truncation of configuration strings remains elsewhere.
> Not marked.
>
> Signed-off-by: Markus Armbruster <address@hidden>
> ---
> block/sheepdog.c | 66
> ++++++++++++++++++++++++++++++++++++++++++++++----------
> 1 file changed, 55 insertions(+), 11 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
- Re: [Qemu-devel] [PATCH 15/15] sheepdog: Support blockdev-add, (continued)
[Qemu-devel] [PATCH 05/15] sheepdog: Fix snapshot ID parsing in _open(), _create, _goto(), Markus Armbruster, 2017/03/02
[Qemu-devel] [PATCH 08/15] sheepdog: Use SocketAddress and socket_connect(), Markus Armbruster, 2017/03/02
[Qemu-devel] [PATCH 14/15] qapi-schema: Rename SocketAddressFlat's variant tcp to inet, Markus Armbruster, 2017/03/02
[Qemu-devel] [PATCH 07/15] sheepdog: Report errors in pseudo-filename more usefully, Markus Armbruster, 2017/03/02