This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Commit: readelf: Increase size of time buffer


Hi Guys,

  I am applying the patch below to increase the size of the string
  buffer used to hold printed versions of timestamps.  An experimental
  gcc enhancement showed that it was theoretically possible to overflow
  the current 20 byte buffers, so I have increased the size to 128.

Cheers
  Nick

binutils/ChangeLog
2016-06-22  Nick Clifton  <nickc@redhat.com>

	* readelf.c (dynamic_section_mips_val): Increase size of timebuf.
	(process_mips_specific): Likewise.
	(process_gnu_liblist): Likewise.

diff --git a/binutils/readelf.c b/binutils/readelf.c
index 8145918..274ddd1 100644
--- a/binutils/readelf.c
+++ b/binutils/readelf.c
@@ -8711,7 +8711,7 @@ dynamic_section_mips_val (Elf_Internal_Dyn * entry)
 
     case DT_MIPS_TIME_STAMP:
       {
-	char timebuf[20];
+	char timebuf[128];
 	struct tm * tmp;
 	time_t atime = entry->d_un.d_val;
 
@@ -14489,7 +14489,7 @@ process_mips_specific (FILE * file)
 	    {
 	      Elf32_Lib liblist;
 	      time_t atime;
-	      char timebuf[20];
+	      char timebuf[128];
 	      struct tm * tmp;
 
 	      liblist.l_name = BYTE_GET (elib[cnt].l_name);
@@ -15143,7 +15143,7 @@ process_gnu_liblist (FILE * file)
 	    {
 	      Elf32_Lib liblist;
 	      time_t atime;
-	      char timebuf[20];
+	      char timebuf[128];
 	      struct tm * tmp;
 
 	      liblist.l_name = BYTE_GET (elib[cnt].l_name);


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]