mirror of
https://github.com/troglobit/editline.git
synced 2025-05-06 04:21:24 +08:00
Merge branch 'mlundh-bufferOverrunFix'
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
commit
69c7e86967
@ -197,7 +197,7 @@ char *el_filename_complete(char *pathname, int *match)
|
||||
if (ac == 1) {
|
||||
/* Exactly one match -- finish it off. */
|
||||
*match = 1;
|
||||
j = strlen(av[0]) - len + 2;
|
||||
j = strlen(av[0]) - len + 1;
|
||||
p = malloc(sizeof(char) * (j + 1));
|
||||
if (p) {
|
||||
memcpy(p, av[0] + len, j);
|
||||
|
Loading…
Reference in New Issue
Block a user