Skip to content

Commit 280b158

Browse files
disconnect3dan3l
authored andcommitted
Fix wrong argument size passed to --parent-pid strncmp check
This PR fixes wrong size argument passed in `strncmp(arg, "--parent-pid", 10)` as the `"--parent-pid"` string has length of 12. Closes #1502
1 parent b7cfd19 commit 280b158

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mysql-test/lib/My/SafeProcess/safe_process_win.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ int main(int argc, const char** argv )
206206
} else {
207207
if (strcmp(arg, "--verbose") == 0)
208208
verbose++;
209-
else if (strncmp(arg, "--parent-pid", 10) == 0)
209+
else if (strncmp(arg, "--parent-pid", 12) == 0)
210210
{
211211
/* Override parent_pid with a value provided by user */
212212
const char* start;

0 commit comments

Comments
 (0)