mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2025-12-26 06:08:20 +00:00
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:
committed by
Sebastian Huber
parent
529402f597
commit
b03c103dbd
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user