Re: [Qemu-block] [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:

[Qemu-block] [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