From 75f604438c2fec75b9cca6e4917679d5250babb1 Mon Sep 17 00:00:00 2001 From: Andrew Pinski Date: Mon, 6 Oct 2003 13:35:36 +0000 Subject: [PATCH] +2003-10-06 Andrew Pinski + + * config/darwin.c... +2003-10-06 Andrew Pinski + + * 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 | 6 ++++++ gcc/config/darwin.c | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 4b4130637bc..401de258290 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2003-10-06 Andrew Pinski + + * 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 * optabs.c (prepare_float_lib_cmp): Attach a REG_EQUAL note diff --git a/gcc/config/darwin.c b/gcc/config/darwin.c index 4d62ea0d730..a548d310697 100644 --- a/gcc/config/darwin.c +++ b/gcc/config/darwin.c @@ -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) -- 2.30.2