diff options
author | Frank Kühndel <frank.kuehndel@embedded-brains.de> | 2020-10-12 18:06:30 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2020-10-15 19:14:52 +0200 |
commit | b03c103dbd3093ebbcd808122be5b04aa2678f57 (patch) | |
tree | 18120c7af2a42f58a9e6704f9b787a552c520194 /cpukit | |
parent | 529402f597184a735a691aa95fb32ab9a42946ef (diff) |
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)'.
Diffstat (limited to 'cpukit')
-rw-r--r-- | cpukit/libmisc/shell/main_edit.c | 3 |
1 files changed, 2 insertions, 1 deletions
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 <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; |