summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 06372d2)
raw | patch | inline | side by side (parent: 06372d2)
author | Matthias Eble <psychotrahe@users.sourceforge.net> | |
Sat, 14 Jul 2007 19:36:48 +0000 (19:36 +0000) | ||
committer | Matthias Eble <psychotrahe@users.sourceforge.net> | |
Sat, 14 Jul 2007 19:36:48 +0000 (19:36 +0000) |
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1757 f882894a-f735-0410-b71e-b25c423dba1c
THANKS.in | patch | blob | history | |
plugins/check_smtp.c | patch | blob | history |
diff --git a/THANKS.in b/THANKS.in
index abe1ce4acbab8ff7d001b7c6a1b28cb21b6180bb..c788bac0df30a81ac28b83164cea3ee531e1b946 100644 (file)
--- a/THANKS.in
+++ b/THANKS.in
Ask Bjoern Hansen
Daniel Bimschas
Aurelien Bompard
+Christoph Schell
diff --git a/plugins/check_smtp.c b/plugins/check_smtp.c
index 5001b50224be597d16b07d6400de79c3bc5ba47a..a7a07838f9b10f5d08063467045b5f27f0aeaf25 100644 (file)
--- a/plugins/check_smtp.c
+++ b/plugins/check_smtp.c
break;
case 'C': /* commands */
if (ncommands >= command_size) {
- commands = realloc (commands, command_size+8);
+ command_size+=8;
+ commands = realloc (commands, sizeof(char *) * command_size);
if (commands == NULL)
die (STATE_UNKNOWN,
_("Could not realloc() units [%d]\n"), ncommands);
}
- commands[ncommands] = optarg;
+ commands[ncommands] = (char *) malloc (sizeof(char) * 255);
+ strncpy (commands[ncommands], optarg, 255);
ncommands++;
break;
case 'R': /* server responses */
if (nresponses >= response_size) {
- responses = realloc (responses, response_size+8);
+ response_size += 8;
+ responses = realloc (responses, sizeof(char *) * response_size);
if (responses == NULL)
die (STATE_UNKNOWN,
_("Could not realloc() units [%d]\n"), nresponses);
}
- responses[nresponses] = optarg;
+ responses[nresponses] = (char *) malloc (sizeof(char) * 255);
+ strncpy (responses[nresponses], optarg, 255);
nresponses++;
break;
case 'c': /* critical time threshold */