+2003-10-06 Andrew Pinski <apinski@apple.com> + + * config/darwin.c...
authorAndrew Pinski <apinski@apple.com>
Mon, 6 Oct 2003 13:35:36 +0000 (13:35 +0000)
committerAndrew Pinski <pinskia@gcc.gnu.org>
Mon, 6 Oct 2003 13:35:36 +0000 (06:35 -0700)
+2003-10-06  Andrew Pinski  <apinski@apple.com>
+
+ * config/darwin.c (machopic_non_lazy_ptr_name): Fix off by one
+ error in calculating the length of the string.
+ (machopic_stub_name): Likewise.

From-SVN: r72149

gcc/ChangeLog
gcc/config/darwin.c

index 4b4130637bcef27d9071bc5601fde64466bdbc8a..401de258290732e4b03b72aeb51187d48de3646b 100644 (file)
@@ -1,3 +1,9 @@
+2003-10-06  Andrew Pinski  <apinski@apple.com>
+
+       * config/darwin.c (machopic_non_lazy_ptr_name): Fix off by one
+       error in calculating the length of the string.
+       (machopic_stub_name): Likewise.
+
 2003-10-06  Roger Sayle  <roger@eyesopen.com>
 
        * optabs.c (prepare_float_lib_cmp):  Attach a REG_EQUAL note
index 4d62ea0d730b24e8be70eeba3dfa525e60726246..a548d3106970ce78b392530899a18b90e32c385b 100644 (file)
@@ -311,7 +311,7 @@ machopic_non_lazy_ptr_name (const char *name)
       {
        buffer[bufferlen] = '_';
        memcpy (buffer + bufferlen +1, name, namelen+1);
-        bufferlen += namelen;
+        bufferlen += namelen +1;
       }
 
     memcpy (buffer + bufferlen, "$non_lazy_ptr", strlen("$non_lazy_ptr")+1);
@@ -386,7 +386,7 @@ machopic_stub_name (const char *name)
       {
        buffer[bufferlen] = '_';
        memcpy (buffer + bufferlen +1, name, namelen+1);
-        bufferlen += namelen;
+        bufferlen += namelen +1;
       }
 
     if (needs_quotes)