Ejemplo n.º 1
0
int main(void)//int argc, char* argv[])
{
    int N;

    MAX_PACKET = BUGST_ARBITRARY_INT();
    PACKET_SIZE = BUGST_ARBITRARY_INT();

    BUGST_IGNORE_UNINITIALISED_INT(&N);
    if (MAX_PACKET > 0 && PACKET_SIZE > 0 && N > 0)
    {
        elem_type A[N];
        elem_type** B;
        int i;
        BUGST_IGNORE_UNINITIALISED_INT_ARRAY(A,N);
        B = decode_packets(A,&i);
        if (i == 3)
        {
            BUGST_REPORT_TARGET_LOCATION_REACHED();
            BUGST_TERMINATE_WHOLE_PROGRAM_ANALYSIS();
        }
        BUGST_DEATH_END();
        for (i = 0; i < MAX_PACKET; ++i)
            free(B[i]);
        free(B);
    }
    return 0;
}
Ejemplo n.º 2
0
size_t transmit(quicly_conn_t *src, quicly_conn_t *dst)
{
    quicly_raw_packet_t *packets[32];
    size_t num_packets, i;
    quicly_decoded_packet_t decoded[32];
    int ret;

    num_packets = sizeof(packets) / sizeof(packets[0]);
    ret = quicly_send(src, packets, &num_packets);
    ok(ret == 0);

    if (num_packets != 0) {
        decode_packets(decoded, packets, num_packets);
        for (i = 0; i != num_packets; ++i) {
            ret = quicly_receive(dst, decoded + i);
            ok(ret == 0);
        }
        free_packets(packets, num_packets);
    }

    return num_packets;
}