From b03c103dbd3093ebbcd808122be5b04aa2678f57 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Frank=20K=C3=BChndel?= Date: Mon, 12 Oct 2020 18:06:30 +0200 Subject: 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)'. --- cpukit/libmisc/shell/main_edit.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'cpukit') diff --git a/cpukit/libmisc/shell/main_edit.c b/cpukit/libmisc/shell/main_edit.c index e43ff68d2b..02214bd942 100644 --- a/cpukit/libmisc/shell/main_edit.c +++ b/cpukit/libmisc/shell/main_edit.c @@ -32,6 +32,7 @@ // #include +#include #include #include #include @@ -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; -- cgit v1.2.3