diff options
author | Alexandre Oliva <aoliva@redhat.com> | 2003-02-26 00:56:14 +0000 |
---|---|---|
committer | Alexandre Oliva <aoliva@redhat.com> | 2003-02-26 00:56:14 +0000 |
commit | 42644a8920a0cc315e2cc66f69af8b4150617b91 (patch) | |
tree | 4af97d753de10937c032f0cff5c952522abf9185 /ld/emultempl/elf32.em | |
parent | 66f24a0b523046d707f18462938189a7ad8846c5 (diff) | |
download | gdb-42644a8920a0cc315e2cc66f69af8b4150617b91.zip gdb-42644a8920a0cc315e2cc66f69af8b4150617b91.tar.gz gdb-42644a8920a0cc315e2cc66f69af8b4150617b91.tar.bz2 |
* emultempl/elf32.em (gld${EMULATION_NAME}_add_sysroot): Fix
memory allocation error.
Diffstat (limited to 'ld/emultempl/elf32.em')
-rw-r--r-- | ld/emultempl/elf32.em | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ld/emultempl/elf32.em b/ld/emultempl/elf32.em index c401fe2..839b7f4 100644 --- a/ld/emultempl/elf32.em +++ b/ld/emultempl/elf32.em @@ -461,7 +461,7 @@ gld${EMULATION_NAME}_add_sysroot (path) if (path[i]) colons++; - len = len + colons * strlen (ld_sysroot); + len = len + (colons + 1) * strlen (ld_sysroot); ret = xmalloc (len + 1); strcpy (ret, ld_sysroot); p = ret + strlen (ret); |