From: Viktor M. <mih...@us...> - 2005-06-01 12:28:48
|
Update of /cvsroot/sblim/cmpi-fsvol In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv333 Modified Files: ChangeLog NEWS cmpiOSBase_BlockStorageStatisticalDataProvider.c Log Message: Bugs fixed: 1201380. InstanceId is checked for validity to avoid segfault. Index: NEWS =================================================================== RCS file: /cvsroot/sblim/cmpi-fsvol/NEWS,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- NEWS 12 May 2005 15:21:33 -0000 1.3 +++ NEWS 1 Jun 2005 12:28:35 -0000 1.4 @@ -5,3 +5,4 @@ - 1199129 Added toleration for newer (spec-conforming) CMPI headers. - 1199146 Added missing registration for BlockDeviceStatisticalData. - 1183805 Added support for OpenWBEM provider registration. +- 1201380 Fixed core dump in case of incorrect object path. Index: cmpiOSBase_BlockStorageStatisticalDataProvider.c =================================================================== RCS file: /cvsroot/sblim/cmpi-fsvol/cmpiOSBase_BlockStorageStatisticalDataProvider.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- cmpiOSBase_BlockStorageStatisticalDataProvider.c 20 Apr 2005 11:40:19 -0000 1.1 +++ cmpiOSBase_BlockStorageStatisticalDataProvider.c 1 Jun 2005 12:28:35 -0000 1.2 @@ -164,18 +164,21 @@ _OSBASE_TRACE(1,("--- %s CMPI GetInstance() called",_ClassName)); name = CMGetKey( cop, "InstanceID", &rc).value.string; - c_name = CMGetCharPtr(name); - + if (name) { + c_name = CMGetCharPtr(name); + } else { + c_name = ""; + } disk_id = strrchr(c_name,'_'); - disk_id += 1; - if (strlen(disk_id) <= 0) { + if (disk_id == NULL || strlen(disk_id+1) <= 0) { CMSetStatusWithChars( _broker, &rc, CMPI_RC_ERR_FAILED, "Could not get disk name." ); _OSBASE_TRACE(1,("--- %s CMPI GetInstance() failed for %s : %s",_ClassName,c_name,CMGetCharPtr(rc.msg))); return rc; } + disk_id += 1; cmdrc = get_disk_data(disk_id, &disk); if (cmdrc == 0 || disk == NULL) { Index: ChangeLog =================================================================== RCS file: /cvsroot/sblim/cmpi-fsvol/ChangeLog,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- ChangeLog 12 May 2005 15:21:33 -0000 1.5 +++ ChangeLog 1 Jun 2005 12:28:35 -0000 1.6 @@ -1,3 +1,9 @@ +2005-06-01 <mih...@dy...> + + * cmpiOSBase_BlockStorageStatisticalDataProvider.c: + Bug 1201380: check InstanceId key in getInstance to avoid + segfault. + 2005-05-12 <mih...@dy...> * provider-register.sh: Updated for OpenWBEM support. |