forked from pool/elfutils
Accepting request 179624 from Base:System
- elfutils-sizeof-pointer-memaccess.patch: Fix sizeof-pointer-memaccess warnings (forwarded request 179593 from Andreas_Schwab) OBS-URL: https://build.opensuse.org/request/show/179624 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/elfutils?expand=0&rev=38
This commit is contained in:
commit
01331bc5b8
38
elfutils-sizeof-pointer-memaccess.patch
Normal file
38
elfutils-sizeof-pointer-memaccess.patch
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
Index: elfutils-0.155/src/ar.c
|
||||||
|
===================================================================
|
||||||
|
--- elfutils-0.155.orig/src/ar.c
|
||||||
|
+++ elfutils-0.155/src/ar.c
|
||||||
|
@@ -461,7 +461,7 @@ do_oper_extract (int oper, const char *a
|
||||||
|
long int instance)
|
||||||
|
{
|
||||||
|
bool found[argc];
|
||||||
|
- memset (found, '\0', sizeof (found));
|
||||||
|
+ memset (found, '\0', sizeof (bool) * argc);
|
||||||
|
|
||||||
|
size_t name_max = 0;
|
||||||
|
inline bool should_truncate_fname (void)
|
||||||
|
@@ -919,7 +919,7 @@ do_oper_delete (const char *arfname, cha
|
||||||
|
long int instance)
|
||||||
|
{
|
||||||
|
bool *found = alloca (sizeof (bool) * argc);
|
||||||
|
- memset (found, '\0', sizeof (found));
|
||||||
|
+ memset (found, '\0', sizeof (bool) * argc);
|
||||||
|
|
||||||
|
/* List of the files we keep. */
|
||||||
|
struct armem *to_copy = NULL;
|
||||||
|
Index: elfutils-0.155/src/nm.c
|
||||||
|
===================================================================
|
||||||
|
--- elfutils-0.155.orig/src/nm.c
|
||||||
|
+++ elfutils-0.155/src/nm.c
|
||||||
|
@@ -769,8 +769,9 @@ show_symbols_sysv (Ebl *ebl, GElf_Word s
|
||||||
|
gelf_getshdr (scn, &shdr_mem)->sh_name);
|
||||||
|
if (unlikely (name == NULL))
|
||||||
|
{
|
||||||
|
- name = alloca (sizeof "[invalid sh_name 0x12345678]");
|
||||||
|
- snprintf (name, sizeof name, "[invalid sh_name %#" PRIx32 "]",
|
||||||
|
+ size_t len = sizeof "[invalid sh_name 0x12345678]";
|
||||||
|
+ name = alloca (len);
|
||||||
|
+ snprintf (name, len, "[invalid sh_name %#" PRIx32 "]",
|
||||||
|
gelf_getshdr (scn, &shdr_mem)->sh_name);
|
||||||
|
}
|
||||||
|
scnnames[elf_ndxscn (scn)] = name;
|
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Jun 18 16:05:13 UTC 2013 - schwab@suse.de
|
||||||
|
|
||||||
|
- elfutils-sizeof-pointer-memaccess.patch: Fix sizeof-pointer-memaccess
|
||||||
|
warnings
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue Mar 26 12:56:03 UTC 2013 - mmeister@suse.com
|
Tue Mar 26 12:56:03 UTC 2013 - mmeister@suse.com
|
||||||
|
|
||||||
|
@ -35,6 +35,7 @@ Patch6: elfutils-0.137-dwarf-header-check-fix.diff
|
|||||||
Patch7: elfutils-0.148-dont-crash.diff
|
Patch7: elfutils-0.148-dont-crash.diff
|
||||||
Patch8: elfutils-revert-portability-scanf.patch
|
Patch8: elfutils-revert-portability-scanf.patch
|
||||||
Patch9: elfutils-aarch64.patch
|
Patch9: elfutils-aarch64.patch
|
||||||
|
Patch10: elfutils-sizeof-pointer-memaccess.patch
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
BuildRequires: bison
|
BuildRequires: bison
|
||||||
BuildRequires: flex
|
BuildRequires: flex
|
||||||
@ -146,6 +147,7 @@ to develop applications that require these.
|
|||||||
%patch7 -p1
|
%patch7 -p1
|
||||||
%patch8 -p1 -R
|
%patch8 -p1 -R
|
||||||
%patch9 -p1
|
%patch9 -p1
|
||||||
|
%patch10 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
# Change DATE/TIME macros to use last change time of elfutils.changes
|
# Change DATE/TIME macros to use last change time of elfutils.changes
|
||||||
|
Loading…
Reference in New Issue
Block a user