mirror of
https://github.com/MidnightCommander/mc
synced 2025-02-28 13:14:31 +03:00
* ext.c (regex_command): Additional check to prevent reading
unallocated memory when matching "shell/". Found by Valgrind.
This commit is contained in:
parent
bda707e46b
commit
b698076e0e
@ -1,3 +1,8 @@
|
||||
2002-07-30 Pavel Roskin <proski@gnu.org>
|
||||
|
||||
* ext.c (regex_command): Additional check to prevent reading
|
||||
unallocated memory when matching "shell/". Found by Valgrind.
|
||||
|
||||
2002-07-29 Pavel Roskin <proski@gnu.org>
|
||||
|
||||
* setup.c: Eliminate all PORT* macros.
|
||||
|
@ -472,9 +472,9 @@ file as an example of how to write it.\n\
|
||||
found = 1;
|
||||
} else if (!strncmp (p, "shell/", 6)) {
|
||||
p += 6;
|
||||
if (*p == '.') {
|
||||
if (!strncmp (p, filename + file_len - (q - p),
|
||||
q - p))
|
||||
if (*p == '.' && file_len >= (q - p)) {
|
||||
if (file_len >= (q - p) &&
|
||||
!strncmp (p, filename + file_len - (q - p), q - p))
|
||||
found = 1;
|
||||
} else {
|
||||
if (q - p == file_len && !strncmp (p, filename, q - p))
|
||||
|
Loading…
x
Reference in New Issue
Block a user