Protect and test programs/cmd against path which length exceeds MAX_PATH Patch to programs/cmd is applied before adding the tests as the tests make cmd.exe crash with a stack overflow
A+
v2: - not forgetting to send the patches along - added helper to wrap around testing for overflow (including error message to user) - fixed a couple of other locations for potential overflow
---
Eric Pouech (2): programs/cmd: bail out when full path name exceeds MAX_PATH programs/cmd/tests: test paths which length exceeds MAX_PATH
programs/cmd/batch.c | 2 +- programs/cmd/builtins.c | 21 +++++++++++---------- programs/cmd/cmd.rc | 1 + programs/cmd/directory.c | 2 +- programs/cmd/tests/test_builtins.cmd | 19 +++++++++++++++++++ programs/cmd/tests/test_builtins.cmd.exp | 4 ++++ programs/cmd/wcmd.h | 2 ++ programs/cmd/wcmdmain.c | 18 +++++++++++++++--- 8 files changed, 54 insertions(+), 15 deletions(-)