!6 Update to 2.4.3
From: @lyn1001 Reviewed-by: @wu-leilei Signed-off-by: @wu-leilei
This commit is contained in:
commit
a35b1cc2bf
@ -1,51 +0,0 @@
|
|||||||
From 22728f16eb611411258146045030292e1170bfef Mon Sep 17 00:00:00 2001
|
|
||||||
From: Peter Jones <pjones@redhat.com>
|
|
||||||
Date: Wed, 14 Feb 2018 16:15:28 -0500
|
|
||||||
Subject: [PATCH] libsmbios: fix more places with loop iterators with bad types
|
|
||||||
|
|
||||||
In these cases we get:
|
|
||||||
|
|
||||||
../src/libsmbios_c/smbios/smbios_obj.c: In function 'smbios_verify_smbios':
|
|
||||||
../src/libsmbios_c/smbios/smbios_obj.c:415:31: error: comparison of integer expressions of different signedness: 'unsigned int' and 'long int' [-Werror=sign-compare]
|
|
||||||
for(unsigned int i = 0; i < length ; ++i )
|
|
||||||
^
|
|
||||||
../src/libsmbios_c/smbios/smbios_obj.c: In function 'smbios_verify_smbios3':
|
|
||||||
../src/libsmbios_c/smbios/smbios_obj.c:436:31: error: comparison of integer expressions of different signedness: 'unsigned int' and 'long int' [-Werror=sign-compare]
|
|
||||||
for(unsigned int i = 0; i < length ; ++i )
|
|
||||||
^
|
|
||||||
|
|
||||||
I really don't understand why gcc will complain about it being signed vs
|
|
||||||
unsigned, but not about the fact that the int can obviously overflow
|
|
||||||
before the condition being checked against length, a larger type, is
|
|
||||||
satisfied.
|
|
||||||
|
|
||||||
Signed-off-by: Peter Jones <pjones@redhat.com>
|
|
||||||
---
|
|
||||||
src/libsmbios_c/smbios/smbios_obj.c | 4 ++--
|
|
||||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/libsmbios_c/smbios/smbios_obj.c b/src/libsmbios_c/smbios/smbios_obj.c
|
|
||||||
index a6f2e1e3525..c932ba59535 100644
|
|
||||||
--- a/src/libsmbios_c/smbios/smbios_obj.c
|
|
||||||
+++ b/src/libsmbios_c/smbios/smbios_obj.c
|
|
||||||
@@ -412,7 +412,7 @@ bool __hidden smbios_verify_smbios(const char *buf, long length, long *dmi_lengt
|
|
||||||
bool retval = true;
|
|
||||||
|
|
||||||
u8 checksum = 0;
|
|
||||||
- for(unsigned int i = 0; i < length ; ++i )
|
|
||||||
+ for(long i = 0; i < length ; ++i )
|
|
||||||
checksum = (checksum + buf[i]) & 0xFF;
|
|
||||||
|
|
||||||
fnprintf("SMBIOS TEP csum %d.\n", (int)checksum);
|
|
||||||
@@ -433,7 +433,7 @@ bool __hidden smbios_verify_smbios3(const char *buf, long length, long *dmi_leng
|
|
||||||
{
|
|
||||||
struct smbios_table_entry_point_64 *ep;
|
|
||||||
u8 checksum = 0;
|
|
||||||
- for(unsigned int i = 0; i < length ; ++i )
|
|
||||||
+ for(long i = 0; i < length ; ++i )
|
|
||||||
checksum = (checksum + buf[i]) & 0xFF;
|
|
||||||
|
|
||||||
fnprintf("SMBIOS TEP csum %d.\n", (int)checksum);
|
|
||||||
--
|
|
||||||
2.14.3
|
|
||||||
|
|
||||||
Binary file not shown.
BIN
libsmbios-2.4.3.tar.gz
Normal file
BIN
libsmbios-2.4.3.tar.gz
Normal file
Binary file not shown.
@ -3,17 +3,15 @@
|
|||||||
%define lang_dom libsmbios-2.4
|
%define lang_dom libsmbios-2.4
|
||||||
|
|
||||||
Name: libsmbios
|
Name: libsmbios
|
||||||
Version: 2.4.2
|
Version: 2.4.3
|
||||||
Release: 3
|
Release: 1
|
||||||
Summary: Interface with the SMBIOS tables
|
Summary: Interface with the SMBIOS tables
|
||||||
License: GPLv2+ or OSL 2.1
|
License: GPLv2+ or OSL 2.1
|
||||||
URL: https://github.com/dell/libsmbios
|
URL: https://github.com/dell/libsmbios
|
||||||
Source0: https://github.com/dell/libsmbios/archive/v%{version}/libsmbios-%{version}.tar.gz
|
Source0: https://github.com/dell/libsmbios/archive/v%{version}/libsmbios-%{version}.tar.gz
|
||||||
|
|
||||||
Patch0001: 0001-libsmbios-fix-more-places-with-loop-iterators-with-b.patch
|
|
||||||
|
|
||||||
BuildRequires: autoconf automake cppunit-devel doxygen gcc-c++ gettext gettext-devel
|
BuildRequires: autoconf automake cppunit-devel doxygen gcc-c++ gettext gettext-devel
|
||||||
BuildRequires: git help2man libtool libxml2-devel pkgconfig python3-devel strace valgrind
|
BuildRequires: git help2man libtool libxml2-devel pkgconfig python3-devel strace valgrind make
|
||||||
|
|
||||||
ExclusiveArch: x86_64 %{ix86}
|
ExclusiveArch: x86_64 %{ix86}
|
||||||
|
|
||||||
@ -112,6 +110,8 @@ find %{buildroot}/%{_includedir} out/libsmbios_c -exec touch -r $TOPDIR/configur
|
|||||||
|
|
||||||
mv out/libsmbios_c out/libsmbios_c-%{_arch}
|
mv out/libsmbios_c out/libsmbios_c-%{_arch}
|
||||||
|
|
||||||
|
%py_byte_compile %{__python3} %{buildroot}%{python3_sitearch}/
|
||||||
|
|
||||||
rename %{pot_file}.mo %{lang_dom}.mo $(find %{buildroot}/%{_datadir} -name %{pot_file}.mo)
|
rename %{pot_file}.mo %{lang_dom}.mo $(find %{buildroot}/%{_datadir} -name %{pot_file}.mo)
|
||||||
%find_lang %{lang_dom}
|
%find_lang %{lang_dom}
|
||||||
|
|
||||||
@ -170,6 +170,9 @@ rename %{pot_file}.mo %{lang_dom}.mo $(find %{buildroot}/%{_datadir} -name %{pot
|
|||||||
%{_mandir}/man?/smbios-*
|
%{_mandir}/man?/smbios-*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Sun Oct 8 2023 liyanan <thistleslyn@163.com> - 2.4.3-1
|
||||||
|
- Update to 2.4.3
|
||||||
|
|
||||||
* Tue Dec 10 2019 openEuler Buildteam <buildteam@openeuler.org> - 2.4.2-3
|
* Tue Dec 10 2019 openEuler Buildteam <buildteam@openeuler.org> - 2.4.2-3
|
||||||
- Package init
|
- Package init
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user