From 53c65d0bcde2a4e13c3b67a4d9b367d5c4e36b02 Mon Sep 17 00:00:00 2001
From: Karl DeBisschop <kdebisschop@users.sourceforge.net>
Date: Tue, 28 Jan 2003 07:26:05 +0000
Subject: missed argc check on port parameter

git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@258 f882894a-f735-0410-b71e-b25c423dba1c

diff --git a/plugins/check_mysql.c b/plugins/check_mysql.c
index 5c7bcb0..6d6f19a 100644
--- a/plugins/check_mysql.c
+++ b/plugins/check_mysql.c
@@ -207,7 +207,7 @@ process_arguments (int argc, char **argv)
 	if (strlen(db) == 0 && argc > c)
 		db = argv[c++];
 
-	if (is_intnonneg (argv[c]))
+	if (is_intnonneg (argv[c]) && argc > c)
 		db_port = atoi (argv[c++]);
 
 	return validate_arguments ();
-- 
cgit v0.10-9-g596f

