zack
809e34e527
libmisc/shell/main_edit.c: User cannot cut using ctrl e and x
...
Closes #4557
2023-02-15 15:16:37 -06:00
Chris Johns
edea93c40b
libmisc/shell/edit: Return if no memory in move_gap
...
Closes #4835
2023-01-31 07:16:14 +11:00
Chris Johns
3ad2789fc6
libmisc/shell/edit: Fix closing the editor
...
Closes #4834
2023-01-31 07:16:14 +11:00
Chris Johns
904a9112de
libmisc/shell: Fix edit Coverity error
...
Coverity Id: CID 1517029, CID 1517030, CID 1517031
2022-11-25 12:16:02 +11:00
Chris Johns
8425e679c1
libmisc/shell: Support terminal size as env variables
...
Closes #4763
2022-11-23 07:00:08 +11:00
Chris Johns
acc32a8e5c
cpukit: Fixes for GCC 12 warnings
...
Updates #6442
2022-06-15 13:01:03 +10:00
Ryan Long
4127a6c056
main_edit.c: get rid of malloc warning
...
A warning was present when building RTEMS that stated that the argument
for malloc() exceeded the maximum object size. To get rid of this, I
changed many places where 'int' was being used to 'size_t'.
2021-06-09 11:52:24 -05:00
Ryan Long
3246fa42e2
main_edit.c: Fix Unchecked return value (CID #1255318 )
...
CID 1255318: Unchecked return value in display_line().
Updates #4257
2021-03-08 14:04:10 -06:00
Frank Kühndel
1dbd1079a5
shell/main_edit.c: Fix string truncation warning
...
Using strlcpy() instead of strncpy():
1) Prevents the compiler warnings
2) Ensures, the string is NUL terminated.
3) Avoids that strncpy() unnecessary fills the unused part of the buffer with
0 bytes.
(Note that realpath() also returns NULL if the file does not exist - that
happens always if someone creates a new file with the editor of the shell.)
2020-10-15 19:14:52 +02:00
Frank Kühndel
b03c103dbd
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)'.
2020-10-15 19:14:52 +02:00
Joel Sherrill
c319945f53
main_edit.c: Use strncpy() to eliminate potential buffer overflow.
2019-03-14 08:21:44 -05:00
Chris Johns
e37e8504f1
libmisc/shell: Edit history hack is corrupting memory. Remove it.
...
The hack was a debug aid and is not needed.
Close #2203 .
2014-12-01 14:53:55 +11:00
Sebastian Huber
fdd1e20579
shell: Include missing header
2014-11-26 09:58:40 +01:00
Joel Sherrill
3bd0cd1ad5
main_edit.c: Do not reference beyond end of array
2014-11-25 12:58:00 -06:00
Joel Sherrill
d15202490c
shell/main_edit.c: Note return value not checked
...
Coverity Id 1255320 spotted an unchecked return value.
2014-11-25 12:57:09 -06:00
Joel Sherrill
4afa216ba8
cpukit/libmisc/shell/main_edit.c: Fix use after free()
...
Coverity Id 1255353. Read from pointer after free().
2014-11-25 12:57:08 -06:00
Joel Sherrill
54998f6ef1
shell/main_edit.c: Fix warnings
2014-11-05 09:29:47 -06:00
Chris Johns
42c77e9982
shell: Add an editor to the shell.
...
This is a small (21K on sparc) editor that provides some powerful
features useful when a file needs editing on an embedded
board. No need to copy files off, edit, copy back.
2014-10-24 16:06:54 -07:00