pager_get_path: Append \0 to path

Change-Id: Iaabd89a649bb20b37b35cd345da0f468fd5dd0b5
This commit is contained in:
Masamichi Takagi
2018-07-03 15:16:48 +09:00
parent ae09d979b6
commit 992705d465
2 changed files with 3 additions and 1 deletions

View File

@ -1214,7 +1214,7 @@ static int pager_get_path(struct file *file, char *path) {
fullpath = d_path(&file->f_path, pathbuf, PATH_MAX);
if (!IS_ERR(fullpath)) {
memcpy(path, fullpath, strlen(fullpath));
memcpy(path, fullpath, strlen(fullpath) + 1);
}
else {
path[0] = 0;