From e4e24acbc8053e0397c44e10e1b3ea02ea7cd913 Mon Sep 17 00:00:00 2001 From: DJ Delorie Date: Tue, 14 Sep 1999 22:19:55 +0000 Subject: [PATCH] 1999-09-14 Donn Terry * emultempl/pe.em (gld_${EMULATION_NAME}_after_open): allow for terminating null. --- ld/ChangeLog | 5 +++++ ld/emultempl/pe.em | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ld/ChangeLog b/ld/ChangeLog index ad28432adcc..3af112db156 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,8 @@ +1999-09-14 Donn Terry + + * emultempl/pe.em (gld_${EMULATION_NAME}_after_open): allow for + terminating null. + 1999-09-14 Nick Clifton * Makefile.in: Add earm_epoc_pe.c build target. diff --git a/ld/emultempl/pe.em b/ld/emultempl/pe.em index 8823e18e264..1727b4f15cc 100644 --- a/ld/emultempl/pe.em +++ b/ld/emultempl/pe.em @@ -753,11 +753,11 @@ gld_${EMULATION_NAME}_after_open () else /* sentinel */ seq = 'c'; - new_name = xmalloc (strlen (is->the_bfd->filename) + 2); + new_name = xmalloc (strlen (is->the_bfd->filename) + 3); sprintf (new_name, "%s.%c", is->the_bfd->filename, seq); is->the_bfd->filename = new_name; - new_name = xmalloc (strlen(is->filename) + 2); + new_name = xmalloc (strlen(is->filename) + 3); sprintf (new_name, "%s.%c", is->filename, seq); is->filename = new_name; } -- 2.30.2