summaryrefslogtreecommitdiff
path: root/mysql-test/lib/My/SafeProcess
diff options
context:
space:
mode:
authorDisconnect3d <dominik.b.czarnota@gmail.com>2020-04-13 16:12:18 +0200
committerAnel Husakovic <anel@mariadb.org>2020-04-16 13:47:35 +0200
commit280b158501fdb889beee3a0ea0b9acbf723acf66 (patch)
tree5f41e8d752136b4344e87f948caa52df812e9807 /mysql-test/lib/My/SafeProcess
parentb7cfd197591bb69a292bd610a650f004d6a29565 (diff)
downloadmariadb-git-280b158501fdb889beee3a0ea0b9acbf723acf66.tar.gz
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
Diffstat (limited to 'mysql-test/lib/My/SafeProcess')
-rw-r--r--mysql-test/lib/My/SafeProcess/safe_process_win.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/mysql-test/lib/My/SafeProcess/safe_process_win.cc b/mysql-test/lib/My/SafeProcess/safe_process_win.cc
index 7d81bf1a1b4..4dd4e24f30d 100644
--- a/mysql-test/lib/My/SafeProcess/safe_process_win.cc
+++ b/mysql-test/lib/My/SafeProcess/safe_process_win.cc
@@ -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;