Skip to content

Commit

Permalink
Merge pull request #75 from happyharryh/fix/add_processname_filter
Browse files Browse the repository at this point in the history
fix: crash when process name filter longer than 7
  • Loading branch information
gsass1 authored Dec 23, 2024
2 parents e3cf5ec + a7e134a commit 326ccd8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ntop.c
Original file line number Diff line number Diff line change
Expand Up @@ -1700,7 +1700,7 @@ int _tmain(int argc, TCHAR *argv[])
TCHAR *Context;
TCHAR *Token = _tcstok_s(argv[i], Delim, &Context);
while(Token && NameFilterCount < MAX_NAMEPARTS) {
strcpy_s(NameFilterList[NameFilterCount++], sizeof(Token) < MAX_NAMEPARTSIZE ? sizeof(Token) : MAX_NAMEPARTSIZE, Token);
_tcsncpy_s(NameFilterList[NameFilterCount++], MAX_NAMEPARTSIZE+1, Token, MAX_NAMEPARTSIZE);
Token = _tcstok_s(0, Delim, &Context);
}

Expand Down

0 comments on commit 326ccd8

Please sign in to comment.