Update of /cvsroot/sblim/sfcb
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9676
Modified Files:
args.c instance.c objectpath.c
Log Message:
Fixed [ 1199104 ] Segfault on setProperty with a NULL char pointer
fixed by checking for value && value->string && value->string->hdl.
Checks done in instance.c objectpath.c and args.c
Index: args.c
===================================================================
RCS file: /cvsroot/sblim/sfcb/args.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- args.c 26 Apr 2005 21:58:46 -0000 1.2
+++ args.c 17 May 2005 13:04:21 -0000 1.3
@@ -93,6 +93,12 @@
if (type == CMPI_chars)
data.value.chars = (char *) value;
+ else if (type == CMPI_string) {
+ if (value && value->string && value->string->hdl)
+ data.value.chars = (char *) value->string->hdl;
+ else data.value.chars=NULL;
+ data.type=CMPI_chars;
+ }
else if (type == CMPI_sint64 || type == CMPI_uint64 || type == CMPI_real64)
data.value = *value;
else
Index: objectpath.c
===================================================================
RCS file: /cvsroot/sblim/sfcb/objectpath.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- objectpath.c 26 Apr 2005 14:11:20 -0000 1.4
+++ objectpath.c 17 May 2005 13:04:21 -0000 1.5
@@ -216,7 +216,9 @@
if (type == CMPI_chars)
data.value.chars = (char *) value;
else if (type == CMPI_string) {
- data.value.chars = (char *) value->string->hdl;
+ if (value && value->string && value->string->hdl)
+ data.value.chars = (char *) value->string->hdl;
+ else data.value.chars=NULL;
data.type=CMPI_chars;
}
else if (type == CMPI_sint64 || type == CMPI_uint64 || type == CMPI_real64)
Index: instance.c
===================================================================
RCS file: /cvsroot/sblim/sfcb/instance.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- instance.c 26 Apr 2005 14:11:19 -0000 1.4
+++ instance.c 17 May 2005 13:04:21 -0000 1.5
@@ -217,7 +217,9 @@
if (type == CMPI_chars)
data.value.chars = (char *) value;
else if (type == CMPI_string) {
- data.value.chars = (char *) value->string->hdl;
+ if (value && value->string && value->string->hdl)
+ data.value.chars = (char *) value->string->hdl;
+ else data.value.chars=NULL;
data.type=CMPI_chars;
}
else if (type == CMPI_sint64 || type == CMPI_uint64 || type == CMPI_real64)
|