diff cinst/main.c @ 90:899fcddb92d0

Check parameters in readInput
author Andre Heinecke <aheinecke@intevation.de>
date Fri, 21 Mar 2014 09:45:54 +0000
parents 8ffbb48528ae
children 80ab2168760f
line wrap: on
line diff
--- 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) {

http://wald.intevation.org/projects/trustbridge/