Skip to content

Commit

Permalink
Fix wrong argument size passed to --parent-pid strncmp check
Browse files Browse the repository at this point in the history
This PR fixes wrong size argument passed in `strncmp(arg, "--parent-pid", 10)` as the `"--parent-pid"` string has length of 12.

Closes #1502
  • Loading branch information
disconnect3d authored and an3l committed Apr 16, 2020
1 parent b7cfd19 commit 280b158
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mysql-test/lib/My/SafeProcess/safe_process_win.cc
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ int main(int argc, const char** argv )
} else {
if (strcmp(arg, "--verbose") == 0)
verbose++;
else if (strncmp(arg, "--parent-pid", 10) == 0)
else if (strncmp(arg, "--parent-pid", 12) == 0)
{
/* Override parent_pid with a value provided by user */
const char* start;
Expand Down

0 comments on commit 280b158

Please sign in to comment.