summaryrefslogtreecommitdiffstats
path: root/cpukit/libmisc
diff options
context:
space:
mode:
authorFrank Kühndel <frank.kuehndel@embedded-brains.de>2020-10-12 18:06:30 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2020-10-15 19:14:52 +0200
commitb03c103dbd3093ebbcd808122be5b04aa2678f57 (patch)
tree18120c7af2a42f58a9e6704f9b787a552c520194 /cpukit/libmisc
parentshell/shell.c: Fix illegal string copy (diff)
downloadrtems-b03c103dbd3093ebbcd808122be5b04aa2678f57.tar.bz2
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/libmisc')
-rw-r--r--cpukit/libmisc/shell/main_edit.c3
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;