X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=dccp_send.c;h=e90c63c4c9f3527b6d65f06d252940a0ba2cab05;hp=7d8967cca6f9ad47dc5b8578b350fd81d2ad49d8;hb=23f053fc0a392079213bf2f979b7c098baa9d30c;hpb=eecc102ad0abeb0335fe994bb72031a15b9090d7 diff --git a/dccp_send.c b/dccp_send.c index 7d8967cc..e90c63c4 100644 --- a/dccp_send.c +++ b/dccp_send.c @@ -140,12 +140,13 @@ static int dccp_com_allow(struct sender_command_data *scd) */ static const char *dccp_list_available_ccids(void) { - uint8_t ccids[DCCP_MAX_HOST_CCIDS]; - uint8_t nccids = sizeof(ccids), i, len; /* Worst case length: n * 3 digits + n-1 spaces + '\0' */ static char list[DCCP_MAX_HOST_CCIDS * 4]; + uint8_t *ccids; + int i, len, nccids; - if (dccp_available_ccids(ccids, &nccids) == NULL) { + nccids = dccp_available_ccids(&ccids); + if (nccids < 0) { snprintf(list, sizeof(list), "Unable to query available CCIDs"); } else { for (i = len = 0; i < nccids; i++)