diff options
Diffstat (limited to 'ld/ldlang.c')
-rw-r--r-- | ld/ldlang.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ld/ldlang.c b/ld/ldlang.c index b53a2fa..e2e8d5f 100644 --- a/ld/ldlang.c +++ b/ld/ldlang.c @@ -2449,7 +2449,8 @@ lang_process () { /* Read the emulation's appropriate default script. */ char *scriptname = ldemul_get_script (); - size_t size = strlen (scriptname) + 13; + /* sizeof counts the terminating NUL. */ + size_t size = strlen (scriptname) + sizeof ("-Tldscripts/"); char *buf = (char *) ldmalloc(size); sprintf (buf, "-Tldscripts/%s", scriptname); |