[SHUTDOWN] Actually all shutdown.exe utilities from all Windows (>= XP) versions (and not just Vista+) support a comment string of up to 512, *EVEN IF* they mention in their help message that the comment can only be up to 127 characters long. I have really tested that ;-) (And what is more, shutdown's utility from Whistler support an arbitrary comment length!) So here I remove the code that imposes this limit and I just check for no more than 512 characters. I also fix an out-of-bounds check for argv.

This commit is contained in:
Hermès Bélusca-Maïto 2018-05-01 23:41:41 +02:00
parent 11f0e2c0f6
commit f34a30fec4
No known key found for this signature in database
GPG key ID: 3B2539C65E7B93D0
3 changed files with 2 additions and 56 deletions

View file

@ -52,7 +52,6 @@ extern const DWORD defaultReason;
/* PROTOTYPES *****************************************************************/
/* misc.c */
BOOL CheckCommentLength(LPCWSTR);
DWORD ParseReasonCode(LPCWSTR);
VOID DisplayError(DWORD dwError);