# HG changeset patch
# User Richard Maciel <rmaciel(a)linux.vnet.ibm.com>
# Date 1247770802 10800
# Node ID 7f2654e5776c0528dfb69a80f3b626dca47464ce
# Parent 39a2f25cda5d49863f319236c3edb5272f3602ba
Fix segfault VSMS provider when passing an incorrect namespace
Checks if the vssd_to_domain function in Virt_VirtualSystemManagementService.c can get the
object path from the CMPIInstance parameter.
Signed-off-by: Richard Maciel <rmaciel(a)linux.vnet.ibm.com>
diff -r 39a2f25cda5d -r 7f2654e5776c src/Virt_VirtualSystemManagementService.c
--- a/src/Virt_VirtualSystemManagementService.c Thu Jul 16 15:28:11 2009 -0300
+++ b/src/Virt_VirtualSystemManagementService.c Thu Jul 16 16:00:02 2009 -0300
@@ -388,8 +388,16 @@
const char *cn;
char *pfx = NULL;
bool fullvirt;
+ CMPIObjectPath *opathp = NULL;
- cn = CLASSNAME(CMGetObjectPath(inst, NULL));
+
+ opathp = CMGetObjectPath(inst, NULL);
+ if (opathp == NULL) {
+ CU_DEBUG("Got a null object path");
+ return 0;
+ }
+
+ cn = CLASSNAME(opathp);
pfx = class_prefix_name(cn);
if (pfx == NULL) {
CU_DEBUG("Unknown prefix for class: %s", cn);
Show replies by date