emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r108397: * unexmacosx.c (copy_data_se


From: Andreas Schwab
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r108397: * unexmacosx.c (copy_data_segment): Truncate after 16 characters
Date: Sun, 27 May 2012 14:18:35 +0200
User-agent: Bazaar (2.5.0)

------------------------------------------------------------
revno: 108397
committer: Andreas Schwab <address@hidden>
branch nick: emacs
timestamp: Sun 2012-05-27 14:18:35 +0200
message:
  * unexmacosx.c (copy_data_segment): Truncate after 16 characters
  when referring to sectname field in printf format.
modified:
  src/ChangeLog
  src/unexmacosx.c
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2012-05-27 07:51:09 +0000
+++ b/src/ChangeLog     2012-05-27 12:18:35 +0000
@@ -1,3 +1,8 @@
+2012-05-27  Andreas Schwab  <address@hidden>
+
+       * unexmacosx.c (copy_data_segment): Truncate after 16 characters
+       when referring to sectname field in printf format.
+
 2012-05-27  Paul Eggert  <address@hidden>
 
        * lisp.h [REL_ALLOC]: Omit duplicate prototypes.

=== modified file 'src/unexmacosx.c'
--- a/src/unexmacosx.c  2012-01-19 07:21:25 +0000
+++ b/src/unexmacosx.c  2012-05-27 12:18:35 +0000
@@ -809,9 +809,9 @@
        {
          sectp->flags = S_REGULAR;
          if (!unexec_write (sectp->offset, (void *) sectp->addr, sectp->size))
-           unexec_error ("cannot write section %s", sectp->sectname);
+           unexec_error ("cannot write section %.16s", sectp->sectname);
          if (!unexec_write (header_offset, sectp, sizeof (struct section)))
-           unexec_error ("cannot write section %s's header", sectp->sectname);
+           unexec_error ("cannot write section %.16s's header", 
sectp->sectname);
        }
       else if (strncmp (sectp->sectname, SECT_BSS, 16) == 0)
        {
@@ -829,15 +829,15 @@
          my_size = (unsigned long)my_endbss_static - sectp->addr;
          if (!(sectp->addr <= (unsigned long)my_endbss_static
                && my_size <= sectp->size))
-           unexec_error ("my_endbss_static is not in section %s",
+           unexec_error ("my_endbss_static is not in section %.16s",
                          sectp->sectname);
          if (!unexec_write (sectp->offset, (void *) sectp->addr, my_size))
-           unexec_error ("cannot write section %s", sectp->sectname);
+           unexec_error ("cannot write section %.16s", sectp->sectname);
          if (!unexec_write_zero (sectp->offset + my_size,
                                  sectp->size - my_size))
-           unexec_error ("cannot write section %s", sectp->sectname);
+           unexec_error ("cannot write section %.16s", sectp->sectname);
          if (!unexec_write (header_offset, sectp, sizeof (struct section)))
-           unexec_error ("cannot write section %s's header", sectp->sectname);
+           unexec_error ("cannot write section %.16s's header", 
sectp->sectname);
        }
       else if (strncmp (sectp->sectname, "__la_symbol_ptr", 16) == 0
               || strncmp (sectp->sectname, "__nl_symbol_ptr", 16) == 0
@@ -851,12 +851,13 @@
               || strncmp (sectp->sectname, "__objc_", 7) == 0)
        {
          if (!unexec_copy (sectp->offset, old_file_offset, sectp->size))
-           unexec_error ("cannot copy section %s", sectp->sectname);
+           unexec_error ("cannot copy section %.16s", sectp->sectname);
          if (!unexec_write (header_offset, sectp, sizeof (struct section)))
-           unexec_error ("cannot write section %s's header", sectp->sectname);
+           unexec_error ("cannot write section %.16s's header", 
sectp->sectname);
        }
       else
-       unexec_error ("unrecognized section name in __DATA segment");
+       unexec_error ("unrecognized section %.16s in __DATA segment",
+                     sectp->sectname);
 
       printf ("        section %-16.16s at %#8lx - %#8lx (sz: %#8lx)\n",
              sectp->sectname, (long) (sectp->offset),


reply via email to

[Prev in Thread] Current Thread [Next in Thread]