69 lines
2.3 KiB
Diff
69 lines
2.3 KiB
Diff
commit 1a4d0668d18bf1090c5c08cdb5cb3ba2b8eb5410
|
|
Author: David Abdurachmanov <David.Abdurachmanov@cern.ch>
|
|
Date: Sun Jan 13 16:44:21 2013 +0100
|
|
|
|
ar.c (do_oper_delete): Fix num passed to memset.
|
|
|
|
Signed-off-by: David Abdurachmanov <David.Abdurachmanov@cern.ch>
|
|
|
|
diff --git a/src/ar.c b/src/ar.c
|
|
index 03da1b7..2d6ad60 100644
|
|
--- a/src/ar.c
|
|
+++ b/src/ar.c
|
|
@@ -919,7 +919,7 @@ do_oper_delete (const char *arfname, char **argv, int argc,
|
|
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;
|
|
|
|
commit 57bd66cabf6e6b9ecf622cdbf350804897a8df58
|
|
Author: Roland McGrath <roland@hack.frob.com>
|
|
Date: Tue Dec 11 09:42:07 2012 -0800
|
|
|
|
nm: Fix size passed to snprintf for invalid sh_name case.
|
|
|
|
Signed-off-by: Roland McGrath <roland@hack.frob.com>
|
|
|
|
diff --git a/src/nm.c b/src/nm.c
|
|
index f50da0b..8a1c57a 100644
|
|
--- a/src/nm.c
|
|
+++ b/src/nm.c
|
|
@@ -769,8 +769,9 @@ show_symbols_sysv (Ebl *ebl, GElf_Word strndx, const char *fullname,
|
|
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 "]",
|
|
+ const size_t bufsz = sizeof "[invalid sh_name 0x12345678]"
|
|
+ name = alloca (bufsz);
|
|
+ snprintf (name, bufsz, "[invalid sh_name %#" PRIx32 "]",
|
|
gelf_getshdr (scn, &shdr_mem)->sh_name);
|
|
}
|
|
scnnames[elf_ndxscn (scn)] = name;
|
|
|
|
commit 7df3d2cd70932cd70515dbeb75e4db66fd27f192
|
|
Author: Mark Wielaard <mjw@redhat.com>
|
|
Date: Tue Dec 11 22:27:05 2012 +0100
|
|
|
|
Add missing semicolon in show_symbols_sysv
|
|
|
|
Signed-off-by: Mark Wielaard <mjw@redhat.com>
|
|
|
|
diff --git a/src/nm.c b/src/nm.c
|
|
index 8a1c57a..7aae84b 100644
|
|
--- a/src/nm.c
|
|
+++ b/src/nm.c
|
|
@@ -769,7 +769,7 @@ show_symbols_sysv (Ebl *ebl, GElf_Word strndx, const char *fullname,
|
|
gelf_getshdr (scn, &shdr_mem)->sh_name);
|
|
if (unlikely (name == NULL))
|
|
{
|
|
- const size_t bufsz = sizeof "[invalid sh_name 0x12345678]"
|
|
+ const size_t bufsz = sizeof "[invalid sh_name 0x12345678]";
|
|
name = alloca (bufsz);
|
|
snprintf (name, bufsz, "[invalid sh_name %#" PRIx32 "]",
|
|
gelf_getshdr (scn, &shdr_mem)->sh_name);
|