Re: [Qemu-devel] [PATCH v8 10/12] uuid: Tighten uuid parse

2016-09-19 Thread Eric Blake
On 09/17/2016 11:25 PM, Fam Zheng wrote: > sscanf is relatively loose (tolerate) on some invalid formats that we > should fail instead of generating a wrong uuid structure, like with > whitespaces and short strings. > > Add and use a helper function to first check the format. > > Signed-off-by:

Re: [Qemu-devel] [PATCH v8 10/12] uuid: Tighten uuid parse

2016-09-18 Thread Jeff Cody
On Sun, Sep 18, 2016 at 12:25:30PM +0800, Fam Zheng wrote: > sscanf is relatively loose (tolerate) on some invalid formats that we > should fail instead of generating a wrong uuid structure, like with > whitespaces and short strings. > > Add and use a helper function to first check the format. >

[Qemu-devel] [PATCH v8 10/12] uuid: Tighten uuid parse

2016-09-17 Thread Fam Zheng
sscanf is relatively loose (tolerate) on some invalid formats that we should fail instead of generating a wrong uuid structure, like with whitespaces and short strings. Add and use a helper function to first check the format. Signed-off-by: Fam Zheng --- util/uuid.c | 24