]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blobdiff - src/misc-progs/pakfire.c
Set backupiso to 2.9beta3.
[people/pmueller/ipfire-2.x.git] / src / misc-progs / pakfire.c
index 04e8f01b112d1a6f5443594d87f6521c40197b73..113216faa71dede918f35c49f740d25d74d9e0aa 100644 (file)
 
 int main(int argc, char *argv[]) {
        int i;
-       char command; // Add size here
-       char add; // Add size here
+       char command[1024];
+       char add[STRING_SIZE];
        
        if (!(initsetuid()))
                exit(1);
 
-       sprintf(command, "/opt/pakfire/pakfire");
+       snprintf(command, STRING_SIZE, "/opt/pakfire/pakfire");
 
-       for (i = 0; i < argc - 1; i++) {
+       for (i = 1; i < argc; i++) {
                sprintf(add, " %s", argv[i]);
                strcat(command, add);
        }
        
        return safe_system(command);
-       
 }