shell/main_edit.c: Fix use of wrong constant

realpath() requires a buffer of size PATH_MAX and not of size
FILENAME_MAX according to 'man realpath (3)'.
This commit is contained in:
Frank Kühndel
2020-10-12 18:06:30 +02:00
committed by Sebastian Huber
parent 529402f597
commit b03c103dbd

View File

@@ -32,6 +32,7 @@
//
#include <signal.h>
#include <limits.h>
#include <stdlib.h>
#include <stdio.h>
#include <stdarg.h>
@@ -282,7 +283,7 @@ static void delete_editor(struct editor *ed) {
}
static struct editor *find_editor(struct env *env, char *filename) {
char fn[FILENAME_MAX];
char fn[PATH_MAX];
struct editor *ed = env->current;
struct editor *start = ed;