Compare commits

...

No commits in common. 'c9' and 'i8c' have entirely different histories.
c9 ... i8c

@ -1,63 +0,0 @@
diff -up sblim-cmpi-base-1.6.4/OSBase_OperatingSystem.c.orig sblim-cmpi-base-1.6.4/OSBase_OperatingSystem.c
--- sblim-cmpi-base-1.6.4/OSBase_OperatingSystem.c.orig 2020-02-04 13:55:31.565801631 +0100
+++ sblim-cmpi-base-1.6.4/OSBase_OperatingSystem.c 2020-02-04 13:58:39.514189758 +0100
@@ -88,13 +88,21 @@ int get_operatingsystem_data( struct cim
bytes_read = fread(buf, 1, sizeof(buf)-1, fhd);
buf[bytes_read] = 0; /* safeguard end of buffer */
ptr = strstr(buf,"MemTotal");
- sscanf(ptr, "%*s %lld", &((*sptr)->totalPhysMem));
+ if( ptr != NULL ) {
+ sscanf(ptr, "%*s %lld", &((*sptr)->totalPhysMem));
+ }
ptr = strstr(buf,"MemFree");
- sscanf(ptr, "%*s %lld", &((*sptr)->freePhysMem));
+ if( ptr != NULL ) {
+ sscanf(ptr, "%*s %lld", &((*sptr)->freePhysMem));
+ }
ptr = strstr(buf,"SwapTotal");
- sscanf(ptr, "%*s %lld", &((*sptr)->totalSwapMem));
+ if( ptr != NULL ) {
+ sscanf(ptr, "%*s %lld", &((*sptr)->totalSwapMem));
+ }
ptr = strstr(buf,"SwapFree");
- sscanf(ptr, "%*s %lld", &((*sptr)->freeSwapMem));
+ if( ptr != NULL ) {
+ sscanf(ptr, "%*s %lld", &((*sptr)->freeSwapMem));
+ }
fclose(fhd);
}
/* TotalVirtualMemorySize */
diff -up sblim-cmpi-base-1.6.4/OSBase_OperatingSystemStatisticalData.c.orig sblim-cmpi-base-1.6.4/OSBase_OperatingSystemStatisticalData.c
--- sblim-cmpi-base-1.6.4/OSBase_OperatingSystemStatisticalData.c.orig 2020-02-04 13:55:31.557801615 +0100
+++ sblim-cmpi-base-1.6.4/OSBase_OperatingSystemStatisticalData.c 2020-02-04 14:09:01.613474453 +0100
@@ -109,13 +109,15 @@ int get_queue_info_24(struct os_statisti
if ((f = fopen("/proc/loadavg","r")) != NULL) {
fgets(buf,127,f);
strptr = strstr(buf,"/");
- *strptr = '\0';
- while (*strptr != ' ') {
- strptr--;
+ if (strptr != NULL) {
+ *strptr = '\0';
+ while (*strptr != ' ') {
+ strptr--;
+ }
+ stats->run_queue_length = atoll(strptr);
+ res = 1;
}
- stats->run_queue_length = atoll(strptr);
fclose(f);
- res = 1;
} else {
_OSBASE_TRACE(1,("get_queue_info: could not open /proc/loadavg: %s",strerror(errno)));
}
@@ -173,7 +175,8 @@ int get_cpu_page_data_24(struct os_stati
*
* page <in> <out>
*/
- if (sscanf(strptr,"page %lld %lld",&pages_in, &pages_out) == 2) {
+ if (strptr != NULL &&
+ sscanf(strptr,"page %lld %lld",&pages_in, &pages_out) == 2) {
stats->pages_in = pages_in;
stats->pages_out = pages_out;
res = 1;

@ -1,6 +1,6 @@
Name: sblim-cmpi-base
Version: 1.6.4
Release: 20%{?dist}
Release: 14%{?dist}
Summary: SBLIM CMPI Base Providers
License: EPL-1.0
@ -22,10 +22,7 @@ Patch7: sblim-cmpi-base-1.6.4-dont-install-license.patch
# Patch8: fixes getting of InstallDate property, improves it to work
# on non en_US locales and updates support for Fedora
Patch8: sblim-cmpi-base-1.6.4-fix-get-os-install-date.patch
# Patch9: fixes possible null pointer dereferences after strstr calls
Patch9: sblim-cmpi-base-1.6.4-fix-possible-null-dereference.patch
Requires: cim-server sblim-indication_helper
BuildRequires: make
BuildRequires: perl-generators
BuildRequires: sblim-cmpi-devel sblim-indication_helper-devel
BuildRequires: autoconf automake libtool pkgconfig
@ -67,7 +64,6 @@ autoreconf --install --force
%patch6 -p1 -b .list-lib-dependencies
%patch7 -p1 -b .dont-install-license
%patch8 -p1 -b .fix-get-os-install-date
%patch9 -p1 -b .fix-possible-null-dereference.patch
%build
%configure TESTSUITEDIR=%{_datadir}/sblim-testsuite --disable-static
@ -120,31 +116,16 @@ rm -f $RPM_BUILD_ROOT/%{_libdir}/cmpi/*a
%postun -p /sbin/ldconfig
%changelog
* Tue Aug 10 2021 Mohan Boddu <mboddu@redhat.com> - 1.6.4-20
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
Related: rhbz#1991688
* Wed Jul 26 2023 MSVSphere Packaging Team <packager@msvsphere.ru> - 1.6.4-14
- Rebuilt for MSVSphere 8.8
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 1.6.4-19
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.6.4-18
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.6.4-17
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Tue Feb 04 2020 Vitezslav Crhonek <vcrhonek@redhat.com> - 1.6.4-16
- Fix possible null pointer dereferences after strstr calls
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.6.4-15
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Wed Jan 22 2020 Vitezslav Crhonek <vcrhonek@redhat.com> - 1.6.4-14
* Tue Feb 04 2020 Vitezslav Crhonek <vcrhonek@redhat.com> - 1.6.4-14
- Fix getting of InstallDate property, improve it to work on non en_US locales
and update support for recent Fedora distributions
Resolves: #1776670
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.6.4-13
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Mon Aug 05 2019 Vitezslav Crhonek <vcrhonek@redhat.com> - 1.6.4-13
- Rebuild
* Tue May 14 2019 Vitezslav Crhonek <vcrhonek@redhat.com> - 1.6.4-12
- Fix URL

Loading…
Cancel
Save