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