MarioVilas/winappdbg

Issue with null termination on command line arguments

ChibiDenDen opened this issue · 0 comments

There is an issue iv'e encountered in at least one location in the win32 api.

In kernel32.py line 3857:
using max(MAX_PATH, len(lpCommandLine)) will create a string without a null terminator
this creates invalid command lines since the command line will contain heap garbage appended to it
using max(MAX_PATH, len(lpCommandLine+1)) should fix the issue here.

the same happenes in lines 3900 (using +2 should fix the issue here, i think)