Skip to content

Commit 75db7e9

Browse files
author
Sascha Schumann
committed
(_ps_files_path_create) terminate string correctly and append the whole key instead of the rest key
1 parent 00e3bb6 commit 75db7e9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ext/session/mod_files.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,9 @@ static char *_ps_files_path_create(char *buf, size_t buflen, ps_files *data, con
105105
buf[n++] = *p++;
106106
buf[n++] = DIR_DELIMITER;
107107
}
108+
buf[n] = '\0';
108109
strcat(buf, FILE_PREFIX);
109-
strcat(buf, p);
110+
strcat(buf, key);
110111

111112
return buf;
112113
}

0 commit comments

Comments
 (0)