]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - client_common.c
Merge topic branch t/overflow into master
[paraslash.git] / client_common.c
index 3beeed1f49effebe1d6f92ceea0fdebb589a7fe6..f476a1c4ada24ddf4a7c5a825048ab7df9e7d9f5 100644 (file)
@@ -245,7 +245,7 @@ static int send_sb_command(struct client_task *ct)
 
        for (i = 0; i < num_inputs; i++)
                len += strlen(lls_input(i, ct->lpr)) + 1;
-       p = command = para_malloc(len);
+       p = command = alloc(len);
        for (i = 0; i < num_inputs; i++) {
                const char *str = lls_input(i, ct->lpr);
                strcpy(p, str);
@@ -336,8 +336,7 @@ static int client_post_monitor(struct sched *s, void *context)
                free(sbb.iov.iov_base);
                if (ret < 0)
                        goto out;
-               ct->challenge_hash = para_malloc(HASH2_SIZE);
-
+               ct->challenge_hash = alloc(HASH2_SIZE);
                if (has_feature("sha256", ct)) {
                        hash2_function((char *)crypt_buf, APC_CHALLENGE_SIZE, ct->challenge_hash);
                        hash2_to_asc(ct->challenge_hash, buf);
@@ -582,7 +581,7 @@ int client_parse_config(int argc, char *argv[], struct client_task **ct_ptr,
        PARA_INFO_LOG("user: %s\n", user);
        PARA_INFO_LOG("key file: %s\n", kf);
        PARA_INFO_LOG("loglevel: %d\n", ll);
-       ct = para_calloc(sizeof(*ct));
+       ct = zalloc(sizeof(*ct));
        ct->scc.fd = -1;
        ct->lpr = lpr;
        ct->key_file = kf;