# HG changeset patch # User Andre Heinecke # Date 1395395154 0 # Node ID 899fcddb92d04e4882a0b507702c25b92eb94836 # Parent 00f9b91f4039cc77ef87034ca5424254f2678f86 Check parameters in readInput diff -r 00f9b91f4039 -r 899fcddb92d0 cinst/main.c --- a/cinst/main.c Thu Mar 20 18:40:15 2014 +0000 +++ b/cinst/main.c Fri Mar 21 09:45:54 2014 +0000 @@ -62,6 +62,11 @@ int readingList = 0; char buf[MAX_LINE_LENGTH + 1]; + if (*certificate_list || *to_install || *to_remove) { + printf("Error invalid parameters\n"); + return -1; + } + while (fgets(buf, MAX_LINE_LENGTH + 1, stdin)) { size_t len = strlen(buf); /* fgets ensures buf is terminated */ if (lines_read ++ > MAX_LINES) {