forked from pool/elfutils
Accepting request 179593 from home:Andreas_Schwab:Factory
- elfutils-sizeof-pointer-memaccess.patch: Fix sizeof-pointer-memaccess warnings OBS-URL: https://build.opensuse.org/request/show/179593 OBS-URL: https://build.opensuse.org/package/show/Base:System/elfutils?expand=0&rev=50
This commit is contained in:
parent
84a889d144
commit
1001be6ec5
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
|
||||
|
||||
|
@ -35,6 +35,7 @@ Patch6: elfutils-0.137-dwarf-header-check-fix.diff
|
||||
Patch7: elfutils-0.148-dont-crash.diff
|
||||
Patch8: elfutils-revert-portability-scanf.patch
|
||||
Patch9: elfutils-aarch64.patch
|
||||
Patch10: elfutils-sizeof-pointer-memaccess.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
BuildRequires: bison
|
||||
BuildRequires: flex
|
||||
@ -146,6 +147,7 @@ to develop applications that require these.
|
||||
%patch7 -p1
|
||||
%patch8 -p1 -R
|
||||
%patch9 -p1
|
||||
%patch10 -p1
|
||||
|
||||
%build
|
||||
# Change DATE/TIME macros to use last change time of elfutils.changes
|
||||
|
Loading…
Reference in New Issue
Block a user