fix potential segfault in para_client
[paraslash.git] / recv_common.c
index 3a09e7c..39a8408 100644 (file)
@@ -39,7 +39,7 @@ static void *parse_receiver_args(int receiver_num, char *options)
 //             options? options : "(none)");
        if (options) {
 //             PARA_DEBUG_LOG("%s options: %s\n", name, options);
-               argc = split_args(options, &argv, ':');
+               argc = split_args(options, &argv, ' ');
 //             PARA_DEBUG_LOG("argc = %d, argv[0]: %s\n", fn->argc, fn->argv[0]);
                for (i = argc; i >= 0; i--)
                        argv[i + 1] = argv[i];
@@ -74,13 +74,13 @@ void *check_receiver_arg(char *ra, int *receiver_num)
                if (strncmp(name, ra, len))
                        continue;
                c = ra[len];
-               if (c && c != ':')
+               if (c && c != ' ')
                        continue;
                if (c && !receivers[j].parse_config)
                        return NULL;
                *receiver_num = j;
                return parse_receiver_args(j, c? ra + len + 1: NULL);
        }
-       PARA_ERROR_LOG("%s", "receiver not found:");
+       PARA_ERROR_LOG("%s", "receiver not found\n");
        return NULL;
 }