From f2cd3c2e87d0f4193a4200210c4e5cdaa6f26b14 Mon Sep 17 00:00:00 2001 From: Hao Liu Date: Tue, 9 Dec 2014 13:09:27 +0800 Subject: [PATCH] Fix memory corruption when calling migrate_to_uri The variable `nparams` didn't change accordingly when adding a new parameter in commit b2cecf73. This patch fixes https://bugzilla.redhat.com/show_bug.cgi?id=1171938 Signed-off-by: Hao Liu (cherry picked from commit 3c5059eab19c612614848d7033bb7e5a0e310779) --- Virt.xs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Virt.xs b/Virt.xs index 839d9a6..091a8e5 100644 --- a/Virt.xs +++ b/Virt.xs @@ -4301,7 +4301,7 @@ _migrate_to_uri(dom, desturi, newparams, flags=0) virTypedParameter *params; int nparams; PPCODE: - nparams = 5; + nparams = 6; Newx(params, nparams, virTypedParameter); strncpy(params[0].field, VIR_MIGRATE_PARAM_URI,