*** check_smtp.c.orig Wed Jun 13 12:19:37 2007 --- check_smtp.c Wed Jun 13 12:22:30 2007 *************** process_arguments (int argc, char **argv *** 582,603 **** break; case 'C': /* commands */ if (ncommands >= command_size) { ! commands = realloc (commands, command_size+8); if (commands == NULL) die (STATE_UNKNOWN, _("Could not realloc() units [%d]\n"), ncommands); } ! commands[ncommands] = optarg; ncommands++; break; case 'R': /* server responses */ if (nresponses >= response_size) { ! responses = realloc (responses, response_size+8); if (responses == NULL) die (STATE_UNKNOWN, _("Could not realloc() units [%d]\n"), nresponses); } ! responses[nresponses] = optarg; nresponses++; break; case 'c': /* critical time threshold */ --- 582,607 ---- break; case 'C': /* commands */ if (ncommands >= command_size) { ! 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] = (char *)malloc (sizeof(char)*255); ! strncpy (commands[ncommands], optarg, 250); ncommands++; break; case 'R': /* server responses */ if (nresponses >= response_size) { ! 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] = (char *)malloc (sizeof(char)*255); ! strncpy (responses[nresponses], optarg, 250); nresponses++; break; case 'c': /* critical time threshold */