Skip to content

Commit

Permalink
avoid MAX_PATH
Browse files Browse the repository at this point in the history
  • Loading branch information
h-vetinari committed Aug 23, 2024
1 parent 5128d8c commit 957a2a1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions recipe/win_forwarder.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ int _tmain( int argc, TCHAR *argv[] )
ZeroMemory( &pi, sizeof(pi) );

// reconstruct commandline call we received, pointing to versioned binary;
// MAX_PATH == 32767 == maximum length for lpCommandLine argument
char forwarded[MAX_PATH];
// 32767 == maximum length for lpCommandLine argument
char forwarded[32767];
// initialize buffer with dummy so that strlen below is not UB
strcat(forwarded, "xxx");

Expand Down

0 comments on commit 957a2a1

Please sign in to comment.