]> git.proxmox.com Git - mirror_qemu.git/commit
sheepdog: Fix snapshot ID parsing in _open(), _create, _goto()
authorMarkus Armbruster <armbru@redhat.com>
Mon, 6 Mar 2017 19:00:39 +0000 (20:00 +0100)
committerKevin Wolf <kwolf@redhat.com>
Tue, 7 Mar 2017 13:53:28 +0000 (14:53 +0100)
commit89e2a31d337f96ab8d5b7bdfe4bcce0a25181ed1
treee32cf2a31e57dfb44aad2c9bf1c71d4ce790ebf3
parenta0dc0e2bfe543404c07258b2a2c4f9d53c0430b1
sheepdog: Fix snapshot ID parsing in _open(), _create, _goto()

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.

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 <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block/sheepdog.c