From 95c6efcc5eb8f8d2fcf4c1a6a9f9067d0ec2ba6c Mon Sep 17 00:00:00 2001 From: Karl DeBisschop Date: Wed, 29 Jan 2003 06:15:32 +0000 Subject: 1.8 git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@266 f882894a-f735-0410-b71e-b25c423dba1c --- plugins/check_by_ssh.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'plugins/check_by_ssh.c') diff --git a/plugins/check_by_ssh.c b/plugins/check_by_ssh.c index 34e67274..0cffaeb2 100644 --- a/plugins/check_by_ssh.c +++ b/plugins/check_by_ssh.c @@ -249,12 +249,12 @@ process_arguments (int argc, char **argv) passive = TRUE; break; case 's': /* description of service to check */ - service = realloc (service, ++services); + service = realloc (service, (++services) * sizeof(char *)); p1 = optarg; while (p2 = index (p1, ':')) { *p2 = '\0'; asprintf (&service[services-1], "%s", p1); - service = realloc (service, ++services); + service = realloc (service, (++services) * sizeof(char *)); p1 = p2 + 1; } asprintf (&service[services-1], "%s", p1); -- cgit v1.2.3