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 <[email protected]>
> ---
>  block/sheepdog.c | 66 
> ++++++++++++++++++++++++++++++++++++++++++++++----------
>  1 file changed, 55 insertions(+), 11 deletions(-)
> 

Reviewed-by: Eric Blake <[email protected]>

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to