On 08/16/2013 07:18 AM, arm...@redhat.com wrote: > From: Markus Armbruster <arm...@redhat.com> > > Currently, -smbios type=T,NAME=VAL,... adds one field (T,NAME) with > value VAL to fw_cfg for each unique NAME. If NAME occurs multiple > times, the last one's VAL is used (before the QemuOpts conversion, the > first one was used). >
> + > + val = qemu_opt_get(opts, "release"); > + if (val) { > + if (sscanf(val, "%hhu.%hhu", &type0.major, &type0.minor) != > 2) { > + error_report("Invalid release"); As in v1, I'm not a fan of using sscanf for integer parsing (it has undefined behavior if the user provides a value that overflows the destination type); but as this is code motion, it does not invalidate my review. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature