[ 3528819 ] Crash in getInstance when instance has NULL properties
diff --git a/ChangeLog b/ChangeLog
index a90147c..dd27ffe 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2012-05-29  Chris Buccella  <buccella@linux.vnet.ibm.com>
+
+	* backend/cimxml/property.c:
+	[ 3528819 ] Crash in getInstance when instance has NULL properties
+	(patch by Klaus Kampf)
+
 2011-06-29  Michael Chase-Salerno <bratac@linux.vnet.ibm.com>
 
 	* cimc/cimcclient.c:
diff --git a/NEWS b/NEWS
index 1c6463e..0652caa 100644
--- a/NEWS
+++ b/NEWS
@@ -7,6 +7,7 @@
 - 3344403: Beam, unitialized vars
 - 3344757: Beam, deref of potential Null pointers.
 - 3344917: Beam, file leak
+- 3528819: Crash in getInstance when instance has NULL properties
 
 Changes in 2.2.3
 ================
diff --git a/backend/cimxml/property.c b/backend/cimxml/property.c
index 592ea2b..2d061bf 100644
--- a/backend/cimxml/property.c
+++ b/backend/cimxml/property.c
@@ -243,15 +243,16 @@
 	result->name  = strdup ( prop->name );
 	result->type  = prop->type;
 	result->state = prop->state;
-	result->value = native_clone_CMPIValue ( prop->type,
-						 &prop->value,
-						 &tmp );
-
-	if ( tmp.rc != CMPI_RC_OK ) {
+        if (prop->state != CMPI_nullValue
+            && prop->state != CMPI_badValue) {
+          result->value = native_clone_CMPIValue ( prop->type,
+                                                   &prop->value,
+                                                   &tmp );
+          if ( tmp.rc != CMPI_RC_OK ) {
 
 		result->state = CMPI_nullValue;
-	}
-
+	  }
+        }
 	result->qualifiers    = qualifierFT.clone ( prop->qualifiers, rc );
         
 	result->next  = __clone ( prop->next, rc );
diff --git a/contributions.txt b/contributions.txt
index d37e6a4..0a2984c 100644
--- a/contributions.txt
+++ b/contributions.txt
@@ -38,6 +38,7 @@
 09/22/2009 [ 2849853 ] getClass reports most property types as CMPI_Instance
 03/23/2011 [ 2990315 ] cmciRelease not called in case of error
 04/25/2011 [ 2967265 ] code cleanup in sfcclient
+05/29/2012 [ 3528819 ] Crash in getInstance when instance has NULL properties
 
 Suresh Sundriyal, VMWare
 ------------------------