]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Fix address violation bugs when writing beyond the end of a local string buffer.
authorNick Clifton <nickc@redhat.com>
Tue, 8 Aug 2017 10:57:22 +0000 (11:57 +0100)
committerNick Clifton <nickc@redhat.com>
Tue, 8 Aug 2017 10:57:22 +0000 (11:57 +0100)
PR 21909
* prdbg.c (pr_int_type): Increase size of local string buffer.
(pr_float_type): Likewise.
(pr_bool_type): Likewise.

binutils/ChangeLog
binutils/prdbg.c

index c941aeeff1d1469b13cd2f21041daa8f6e6e0a4b..fa2b3674f7d6ee1cf1c048d5b0a67e0131be4c14 100644 (file)
@@ -1,3 +1,10 @@
+2017-08-08  Nick Clifton  <nickc@redhat.com>
+
+       PR 21909
+       * prdbg.c (pr_int_type): Increase size of local string buffer.
+       (pr_float_type): Likewise.
+       (pr_bool_type): Likewise.
+
 2017-08-02  Nick Clifton  <nickc@redhat.com>
 
        PR 21702
index 9bd01bc071a8704e0c0662708d4eae8338e3b6f6..7b24fbe61613da28708a3dd746e5bc2bb24b8d0a 100644 (file)
@@ -581,7 +581,7 @@ static bfd_boolean
 pr_int_type (void *p, unsigned int size, bfd_boolean unsignedp)
 {
   struct pr_handle *info = (struct pr_handle *) p;
-  char ab[10];
+  char ab[40];
 
   sprintf (ab, "%sint%d", unsignedp ? "u" : "", size * 8);
   return push_type (info, ab);
@@ -593,7 +593,7 @@ static bfd_boolean
 pr_float_type (void *p, unsigned int size)
 {
   struct pr_handle *info = (struct pr_handle *) p;
-  char ab[10];
+  char ab[40];
 
   if (size == 4)
     return push_type (info, "float");
@@ -623,7 +623,7 @@ static bfd_boolean
 pr_bool_type (void *p, unsigned int size)
 {
   struct pr_handle *info = (struct pr_handle *) p;
-  char ab[10];
+  char ab[40];
 
   sprintf (ab, "bool%d", size * 8);