Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@happyharryh
Copy link

There are two issues in the codes related to the process name filter that result in a crash when the provided process name exceeds 7 characters in length:

  1. The use of sizeof(Token) does not return the length of the string but instead gives the size of a pointer to TCHAR, which is always 8 bytes on the amd64 platform.

  2. The strcpy_s function crashes when the length of the src (the third argument) exceeds the destsz (the second argument), as observed in my tests.

This PR resolves the crash by replacing strcpy_s with _tcsncpy_s.

@4x3-64

@gsass1 gsass1 merged commit 326ccd8 into gsass1:master Dec 23, 2024
@gsass1
Copy link
Owner

gsass1 commented Dec 23, 2024

Ty

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants