[libvirt] [PATCH 2/6] qemuMigrationCookieStatisticsXMLParse: Check for retvals of virXPath*()

Peter Krempa pkrempa at redhat.com
Thu Aug 4 10:09:59 UTC 2016


On Thu, Aug 04, 2016 at 09:47:46 +0200, Michal Privoznik wrote:
> There's no critical bug fix in here, but if there's ever a bug in
> our code and we send some gibberish in migration cookie, the
> other side doesn't check if conversion from string to integer
> was successful or not.
> 
> Signed-off-by: Michal Privoznik <mprivozn at redhat.com>
> ---
>  src/qemu/qemu_migration.c | 80 ++++++++++++++++++++++-------------------------
>  1 file changed, 38 insertions(+), 42 deletions(-)

I don't think this makes sense. If the stats can't be parsed it won't
break anything. Also it's internaly generated and parsed so the
possibility it will break is very low.

Also you don't want to fail migration due to a mishap like this.

I presume this is due to coverity. If it bothers you enough add a
ignore_value().

NACK

Peter




More information about the libvir-list mailing list