summaryrefslogtreecommitdiff
path: root/LICENSE.LGPL2.1
diff options
context:
space:
mode:
authorTanu Kaskinen <tanu.kaskinen@linux.intel.com>2014-05-24 12:01:12 +0300
committerLennart Poettering <lennart@poettering.net>2014-05-25 11:21:19 +0800
commit5216f599ff677a18016bfa1995d1f1e6a50e4a0b (patch)
treeb189cc19b72aac514a380ee8b48f867e98bfbd38 /LICENSE.LGPL2.1
parent590b6b9188e75ba46c42995984a1c2fa06adb6d6 (diff)
path-util: fix missing terminating zero
There was this code: if (to_path_len > 0) memcpy(p, to_path, to_path_len); That didn't add the terminating zero, so the resulting string was corrupt if this code path was taken. Using strcpy() instead of memcpy() solves this issue, and also simplifies the code. Previously there was special handling for shortening "../../" to "../..", but that has now been replaced by a path_kill_slashes() call, which also makes the result prettier in case the input contains redundant slashes that would otherwise be copied to the result.
Diffstat (limited to 'LICENSE.LGPL2.1')
0 files changed, 0 insertions, 0 deletions