diff options
-rw-r--r-- | libbb/xreadlink.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libbb/xreadlink.c b/libbb/xreadlink.c index 6315033bb..ead30e499 100644 --- a/libbb/xreadlink.c +++ b/libbb/xreadlink.c | |||
@@ -143,7 +143,7 @@ char* FAST_FUNC xmalloc_realpath_coreutils(const char *path) | |||
143 | buf = xmalloc_realpath(path); | 143 | buf = xmalloc_realpath(path); |
144 | if (buf) { | 144 | if (buf) { |
145 | unsigned len = strlen(buf); | 145 | unsigned len = strlen(buf); |
146 | buf = xrealloc(buf, len + strlen(last_slash) + 2); | 146 | buf = xrealloc(buf, len + strlen(last_slash) + 2); |
147 | buf[len++] = '/'; | 147 | buf[len++] = '/'; |
148 | strcpy(buf + len, last_slash); | 148 | strcpy(buf + len, last_slash); |
149 | } | 149 | } |