From: Kyle Mestery Date: Wed, 3 Oct 2012 19:46:55 +0000 (-0400) Subject: Correct checking of virStrcpyStatic() return value X-Git-Tag: v1.0.0-rc1~174 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=83aebf6de4e2902c621edcba65de1d1556bee454;p=thirdparty%2Flibvirt.git Correct checking of virStrcpyStatic() return value Correct the check for the return value of virStrcpyStatic() when copying port-profile names. Fixes Open vSwitch ports which utilize port-profiles from network definitions. Signed-off-by: Kyle Mestery --- diff --git a/src/util/virnetdevvportprofile.c b/src/util/virnetdevvportprofile.c index d774fb1add..ac7aa5fcbf 100644 --- a/src/util/virnetdevvportprofile.c +++ b/src/util/virnetdevvportprofile.c @@ -374,7 +374,7 @@ virNetDevVPortProfileMerge(virNetDevVPortProfilePtr orig, orig->profileID, mods->profileID); return -1; } - if (virStrcpyStatic(orig->profileID, mods->profileID)) { + if (virStrcpyStatic(orig->profileID, mods->profileID) == NULL) { /* this should never happen - it indicates mods->profileID * isn't properly null terminated. */ virReportError(VIR_ERR_INTERNAL_ERROR, "%s",