mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-19 15:23:30 +08:00
Fix snafu parsing $ORIGIN.
PR ld/20858 * emultempl/elf32.em (_search_needed): Allow for path separator and terminating NUL byte when allocating space for new $ORIGIN path.
This commit is contained in:
parent
0b14696aed
commit
51750acd08
@ -1,3 +1,10 @@
|
||||
2016-11-24 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
PR ld/20858
|
||||
* emultempl/elf32.em (_search_needed): Allow for path separator
|
||||
and terminating NUL byte when allocating space for new $ORIGIN
|
||||
path.
|
||||
|
||||
2016-11-23 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
* testsuite/ld-arm/vxworks2.sd: Update expected readelf output.
|
||||
|
@ -585,7 +585,7 @@ gld${EMULATION_NAME}_search_needed (const char *path,
|
||||
{
|
||||
char * current_dir = getpwd ();
|
||||
|
||||
freeme = xmalloc (strlen (replacement) + strlen (current_dir));
|
||||
freeme = xmalloc (strlen (replacement) + strlen (current_dir) + 2);
|
||||
sprintf (freeme, "%s/%s", current_dir, replacement);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user