idx
int64
func_before
string
Vulnerability Classification
string
vul
int64
func_after
string
patch
string
CWE ID
string
lines_before
string
lines_after
string
1,700
static void red_channel_client_set_migration_seamless(RedChannelClient *rcc) { spice_assert(rcc->client->during_target_migrate && rcc->client->seamless_migrate); if (rcc->channel->migration_flags & SPICE_MIGRATE_NEED_DATA_TRANSFER) { rcc->wait_migrate_data = TRUE; rcc->client->num_migrated_chan...
DoS
0
static void red_channel_client_set_migration_seamless(RedChannelClient *rcc) { spice_assert(rcc->client->during_target_migrate && rcc->client->seamless_migrate); if (rcc->channel->migration_flags & SPICE_MIGRATE_NEED_DATA_TRANSFER) { rcc->wait_migrate_data = TRUE; rcc->client->num_migrated_chan...
@@ -1572,9 +1572,9 @@ void red_channel_client_pipe_add_type(RedChannelClient *rcc, int pipe_item_type) void red_channel_pipes_add_type(RedChannel *channel, int pipe_item_type) { - RingItem *link; + RingItem *link, *next; - RING_FOREACH(link, &channel->clients) { + RING_FOREACH_SAFE(link, next, &channe...
CWE-399
null
null
1,701
static void red_channel_client_set_remote_caps(RedChannelClient* rcc, int num_common_caps, uint32_t *common_caps, int num_caps, uint32_t *caps) { rcc->remote_caps.num_common_caps = num_common_caps; rcc->remote_caps.com...
DoS
0
static void red_channel_client_set_remote_caps(RedChannelClient* rcc, int num_common_caps, uint32_t *common_caps, int num_caps, uint32_t *caps) { rcc->remote_caps.num_common_caps = num_common_caps; rcc->remote_caps.com...
@@ -1572,9 +1572,9 @@ void red_channel_client_pipe_add_type(RedChannelClient *rcc, int pipe_item_type) void red_channel_pipes_add_type(RedChannel *channel, int pipe_item_type) { - RingItem *link; + RingItem *link, *next; - RING_FOREACH(link, &channel->clients) { + RING_FOREACH_SAFE(link, next, &channe...
CWE-399
null
null
1,702
void red_channel_client_shutdown(RedChannelClient *rcc) { if (rcc->stream && !rcc->stream->shutdown) { rcc->channel->core->watch_remove(rcc->stream->watch); rcc->stream->watch = NULL; shutdown(rcc->stream->socket, SHUT_RDWR); rcc->stream->shutdown = TRUE; } }
DoS
0
void red_channel_client_shutdown(RedChannelClient *rcc) { if (rcc->stream && !rcc->stream->shutdown) { rcc->channel->core->watch_remove(rcc->stream->watch); rcc->stream->watch = NULL; shutdown(rcc->stream->socket, SHUT_RDWR); rcc->stream->shutdown = TRUE; } }
@@ -1572,9 +1572,9 @@ void red_channel_client_pipe_add_type(RedChannelClient *rcc, int pipe_item_type) void red_channel_pipes_add_type(RedChannel *channel, int pipe_item_type) { - RingItem *link; + RingItem *link, *next; - RING_FOREACH(link, &channel->clients) { + RING_FOREACH_SAFE(link, next, &channe...
CWE-399
null
null
1,703
static void red_channel_client_start_ping_timer(RedChannelClient *rcc, uint32_t timeout) { if (!rcc->latency_monitor.timer) { return; } if (rcc->latency_monitor.state != PING_STATE_NONE) { return; } rcc->latency_monitor.state = PING_STATE_TIMER; rcc->channel->core->timer_start(rc...
DoS
0
static void red_channel_client_start_ping_timer(RedChannelClient *rcc, uint32_t timeout) { if (!rcc->latency_monitor.timer) { return; } if (rcc->latency_monitor.state != PING_STATE_NONE) { return; } rcc->latency_monitor.state = PING_STATE_TIMER; rcc->channel->core->timer_start(rc...
@@ -1572,9 +1572,9 @@ void red_channel_client_pipe_add_type(RedChannelClient *rcc, int pipe_item_type) void red_channel_pipes_add_type(RedChannel *channel, int pipe_item_type) { - RingItem *link; + RingItem *link, *next; - RING_FOREACH(link, &channel->clients) { + RING_FOREACH_SAFE(link, next, &channe...
CWE-399
null
null
1,704
int red_channel_client_test_remote_common_cap(RedChannelClient *rcc, uint32_t cap) { return test_capabilty(rcc->remote_caps.common_caps, rcc->remote_caps.num_common_caps, cap); }
DoS
0
int red_channel_client_test_remote_common_cap(RedChannelClient *rcc, uint32_t cap) { return test_capabilty(rcc->remote_caps.common_caps, rcc->remote_caps.num_common_caps, cap); }
@@ -1572,9 +1572,9 @@ void red_channel_client_pipe_add_type(RedChannelClient *rcc, int pipe_item_type) void red_channel_pipes_add_type(RedChannel *channel, int pipe_item_type) { - RingItem *link; + RingItem *link, *next; - RING_FOREACH(link, &channel->clients) { + RING_FOREACH_SAFE(link, next, &channe...
CWE-399
null
null
1,705
static void red_channel_client_unref(RedChannelClient *rcc) { if (!--rcc->refs) { if (rcc->send_data.main.marshaller) { spice_marshaller_destroy(rcc->send_data.main.marshaller); } if (rcc->send_data.urgent.marshaller) { spice_marshaller_destroy(rcc->send_data.urgent....
DoS
0
static void red_channel_client_unref(RedChannelClient *rcc) { if (!--rcc->refs) { if (rcc->send_data.main.marshaller) { spice_marshaller_destroy(rcc->send_data.main.marshaller); } if (rcc->send_data.urgent.marshaller) { spice_marshaller_destroy(rcc->send_data.urgent....
@@ -1572,9 +1572,9 @@ void red_channel_client_pipe_add_type(RedChannelClient *rcc, int pipe_item_type) void red_channel_pipes_add_type(RedChannel *channel, int pipe_item_type) { - RingItem *link; + RingItem *link, *next; - RING_FOREACH(link, &channel->clients) { + RING_FOREACH_SAFE(link, next, &channe...
CWE-399
null
null
1,706
static inline int red_channel_client_urgent_marshaller_is_active(RedChannelClient *rcc) { return (rcc->send_data.marshaller == rcc->send_data.urgent.marshaller); }
DoS
0
static inline int red_channel_client_urgent_marshaller_is_active(RedChannelClient *rcc) { return (rcc->send_data.marshaller == rcc->send_data.urgent.marshaller); }
@@ -1572,9 +1572,9 @@ void red_channel_client_pipe_add_type(RedChannelClient *rcc, int pipe_item_type) void red_channel_pipes_add_type(RedChannel *channel, int pipe_item_type) { - RingItem *link; + RingItem *link, *next; - RING_FOREACH(link, &channel->clients) { + RING_FOREACH_SAFE(link, next, &channe...
CWE-399
null
null
1,707
static inline int red_channel_client_waiting_for_ack(RedChannelClient *rcc) { return (rcc->channel->handle_acks && (rcc->ack_data.messages_window > rcc->ack_data.client_window * 2)); }
DoS
0
static inline int red_channel_client_waiting_for_ack(RedChannelClient *rcc) { return (rcc->channel->handle_acks && (rcc->ack_data.messages_window > rcc->ack_data.client_window * 2)); }
@@ -1572,9 +1572,9 @@ void red_channel_client_pipe_add_type(RedChannelClient *rcc, int pipe_item_type) void red_channel_pipes_add_type(RedChannel *channel, int pipe_item_type) { - RingItem *link; + RingItem *link, *next; - RING_FOREACH(link, &channel->clients) { + RING_FOREACH_SAFE(link, next, &channe...
CWE-399
null
null
1,708
int red_channel_client_waits_for_migrate_data(RedChannelClient *rcc) { return rcc->wait_migrate_data; }
DoS
0
int red_channel_client_waits_for_migrate_data(RedChannelClient *rcc) { return rcc->wait_migrate_data; }
@@ -1572,9 +1572,9 @@ void red_channel_client_pipe_add_type(RedChannelClient *rcc, int pipe_item_type) void red_channel_pipes_add_type(RedChannel *channel, int pipe_item_type) { - RingItem *link; + RingItem *link, *next; - RING_FOREACH(link, &channel->clients) { + RING_FOREACH_SAFE(link, next, &channe...
CWE-399
null
null
1,709
RedChannel *red_channel_create_dummy(int size, uint32_t type, uint32_t id) { RedChannel *channel; ClientCbs client_cbs = { NULL, }; spice_assert(size >= sizeof(*channel)); channel = spice_malloc0(size); channel->type = type; channel->id = id; channel->refs = 1; channel->core = &dummy_co...
DoS
0
RedChannel *red_channel_create_dummy(int size, uint32_t type, uint32_t id) { RedChannel *channel; ClientCbs client_cbs = { NULL, }; spice_assert(size >= sizeof(*channel)); channel = spice_malloc0(size); channel->type = type; channel->id = id; channel->refs = 1; channel->core = &dummy_co...
@@ -1572,9 +1572,9 @@ void red_channel_client_pipe_add_type(RedChannelClient *rcc, int pipe_item_type) void red_channel_pipes_add_type(RedChannel *channel, int pipe_item_type) { - RingItem *link; + RingItem *link, *next; - RING_FOREACH(link, &channel->clients) { + RING_FOREACH_SAFE(link, next, &channe...
CWE-399
null
null
1,710
void red_channel_destroy(RedChannel *channel) { RingItem *link; RingItem *next; if (!channel) { return; } RING_FOREACH_SAFE(link, next, &channel->clients) { red_channel_client_destroy( SPICE_CONTAINEROF(link, RedChannelClient, channel_link)); } red_channel_unref...
DoS
0
void red_channel_destroy(RedChannel *channel) { RingItem *link; RingItem *next; if (!channel) { return; } RING_FOREACH_SAFE(link, next, &channel->clients) { red_channel_client_destroy( SPICE_CONTAINEROF(link, RedChannelClient, channel_link)); } red_channel_unref...
@@ -1572,9 +1572,9 @@ void red_channel_client_pipe_add_type(RedChannelClient *rcc, int pipe_item_type) void red_channel_pipes_add_type(RedChannel *channel, int pipe_item_type) { - RingItem *link; + RingItem *link, *next; - RING_FOREACH(link, &channel->clients) { + RING_FOREACH_SAFE(link, next, &channe...
CWE-399
null
null
1,711
void red_channel_disconnect(RedChannel *channel) { RingItem *link; RingItem *next; RING_FOREACH_SAFE(link, next, &channel->clients) { red_channel_client_disconnect( SPICE_CONTAINEROF(link, RedChannelClient, channel_link)); } }
DoS
0
void red_channel_disconnect(RedChannel *channel) { RingItem *link; RingItem *next; RING_FOREACH_SAFE(link, next, &channel->clients) { red_channel_client_disconnect( SPICE_CONTAINEROF(link, RedChannelClient, channel_link)); } }
@@ -1572,9 +1572,9 @@ void red_channel_client_pipe_add_type(RedChannelClient *rcc, int pipe_item_type) void red_channel_pipes_add_type(RedChannel *channel, int pipe_item_type) { - RingItem *link; + RingItem *link, *next; - RING_FOREACH(link, &channel->clients) { + RING_FOREACH_SAFE(link, next, &channe...
CWE-399
null
null
1,712
static void red_channel_handle_migrate_data(RedChannelClient *rcc, uint32_t size, void *message) { spice_debug("channel type %d id %d rcc %p size %u", rcc->channel->type, rcc->channel->id, rcc, size); if (!rcc->channel->channel_cbs.handle_migrate_data) { return; } if (!red_channe...
DoS
0
static void red_channel_handle_migrate_data(RedChannelClient *rcc, uint32_t size, void *message) { spice_debug("channel type %d id %d rcc %p size %u", rcc->channel->type, rcc->channel->id, rcc, size); if (!rcc->channel->channel_cbs.handle_migrate_data) { return; } if (!red_channe...
@@ -1572,9 +1572,9 @@ void red_channel_client_pipe_add_type(RedChannelClient *rcc, int pipe_item_type) void red_channel_pipes_add_type(RedChannel *channel, int pipe_item_type) { - RingItem *link; + RingItem *link, *next; - RING_FOREACH(link, &channel->clients) { + RING_FOREACH_SAFE(link, next, &channe...
CWE-399
null
null
1,713
void red_channel_init_outgoing_messages_window(RedChannel *channel) { RingItem *link; RingItem *next; RING_FOREACH_SAFE(link, next, &channel->clients) { red_channel_client_init_outgoing_messages_window( SPICE_CONTAINEROF(link, RedChannelClient, channel_link)); } }
DoS
0
void red_channel_init_outgoing_messages_window(RedChannel *channel) { RingItem *link; RingItem *next; RING_FOREACH_SAFE(link, next, &channel->clients) { red_channel_client_init_outgoing_messages_window( SPICE_CONTAINEROF(link, RedChannelClient, channel_link)); } }
@@ -1572,9 +1572,9 @@ void red_channel_client_pipe_add_type(RedChannelClient *rcc, int pipe_item_type) void red_channel_pipes_add_type(RedChannel *channel, int pipe_item_type) { - RingItem *link; + RingItem *link, *next; - RING_FOREACH(link, &channel->clients) { + RING_FOREACH_SAFE(link, next, &channe...
CWE-399
null
null
1,714
int red_channel_is_connected(RedChannel *channel) { return channel && (channel->clients_num > 0); }
DoS
0
int red_channel_is_connected(RedChannel *channel) { return channel && (channel->clients_num > 0); }
@@ -1572,9 +1572,9 @@ void red_channel_client_pipe_add_type(RedChannelClient *rcc, int pipe_item_type) void red_channel_pipes_add_type(RedChannel *channel, int pipe_item_type) { - RingItem *link; + RingItem *link, *next; - RING_FOREACH(link, &channel->clients) { + RING_FOREACH_SAFE(link, next, &channe...
CWE-399
null
null
1,715
uint32_t red_channel_max_pipe_size(RedChannel *channel) { RingItem *link; RedChannelClient *rcc; uint32_t pipe_size = 0; RING_FOREACH(link, &channel->clients) { rcc = SPICE_CONTAINEROF(link, RedChannelClient, channel_link); pipe_size = pipe_size > rcc->pipe_size ? pipe_size : rcc->pipe_...
DoS
0
uint32_t red_channel_max_pipe_size(RedChannel *channel) { RingItem *link; RedChannelClient *rcc; uint32_t pipe_size = 0; RING_FOREACH(link, &channel->clients) { rcc = SPICE_CONTAINEROF(link, RedChannelClient, channel_link); pipe_size = pipe_size > rcc->pipe_size ? pipe_size : rcc->pipe_...
@@ -1572,9 +1572,9 @@ void red_channel_client_pipe_add_type(RedChannelClient *rcc, int pipe_item_type) void red_channel_pipes_add_type(RedChannel *channel, int pipe_item_type) { - RingItem *link; + RingItem *link, *next; - RING_FOREACH(link, &channel->clients) { + RING_FOREACH_SAFE(link, next, &channe...
CWE-399
null
null
1,716
uint32_t red_channel_min_pipe_size(RedChannel *channel) { RingItem *link; RedChannelClient *rcc; uint32_t pipe_size = ~0; RING_FOREACH(link, &channel->clients) { rcc = SPICE_CONTAINEROF(link, RedChannelClient, channel_link); pipe_size = pipe_size < rcc->pipe_size ? pipe_size : rcc->pipe...
DoS
0
uint32_t red_channel_min_pipe_size(RedChannel *channel) { RingItem *link; RedChannelClient *rcc; uint32_t pipe_size = ~0; RING_FOREACH(link, &channel->clients) { rcc = SPICE_CONTAINEROF(link, RedChannelClient, channel_link); pipe_size = pipe_size < rcc->pipe_size ? pipe_size : rcc->pipe...
@@ -1572,9 +1572,9 @@ void red_channel_client_pipe_add_type(RedChannelClient *rcc, int pipe_item_type) void red_channel_pipes_add_type(RedChannel *channel, int pipe_item_type) { - RingItem *link; + RingItem *link, *next; - RING_FOREACH(link, &channel->clients) { + RING_FOREACH_SAFE(link, next, &channe...
CWE-399
null
null
1,717
int red_channel_no_item_being_sent(RedChannel *channel) { RingItem *link; RedChannelClient *rcc; RING_FOREACH(link, &channel->clients) { rcc = SPICE_CONTAINEROF(link, RedChannelClient, channel_link); if (!red_channel_client_no_item_being_sent(rcc)) { return FALSE; } ...
DoS
0
int red_channel_no_item_being_sent(RedChannel *channel) { RingItem *link; RedChannelClient *rcc; RING_FOREACH(link, &channel->clients) { rcc = SPICE_CONTAINEROF(link, RedChannelClient, channel_link); if (!red_channel_client_no_item_being_sent(rcc)) { return FALSE; } ...
@@ -1572,9 +1572,9 @@ void red_channel_client_pipe_add_type(RedChannelClient *rcc, int pipe_item_type) void red_channel_pipes_add_type(RedChannel *channel, int pipe_item_type) { - RingItem *link; + RingItem *link, *next; - RING_FOREACH(link, &channel->clients) { + RING_FOREACH_SAFE(link, next, &channe...
CWE-399
null
null
1,718
static void red_channel_peer_on_out_msg_done(void *opaque) { RedChannelClient *rcc = (RedChannelClient *)opaque; rcc->send_data.size = 0; red_channel_client_release_sent_item(rcc); if (rcc->send_data.blocked) { rcc->send_data.blocked = FALSE; rcc->channel->core->watch_update_mask(rcc->s...
DoS
0
static void red_channel_peer_on_out_msg_done(void *opaque) { RedChannelClient *rcc = (RedChannelClient *)opaque; rcc->send_data.size = 0; red_channel_client_release_sent_item(rcc); if (rcc->send_data.blocked) { rcc->send_data.blocked = FALSE; rcc->channel->core->watch_update_mask(rcc->s...
@@ -1572,9 +1572,9 @@ void red_channel_client_pipe_add_type(RedChannelClient *rcc, int pipe_item_type) void red_channel_pipes_add_type(RedChannel *channel, int pipe_item_type) { - RingItem *link; + RingItem *link, *next; - RING_FOREACH(link, &channel->clients) { + RING_FOREACH_SAFE(link, next, &channe...
CWE-399
null
null
1,719
void red_channel_pipe_item_init(RedChannel *channel, PipeItem *item, int type) { ring_item_init(&item->link); item->type = type; }
DoS
0
void red_channel_pipe_item_init(RedChannel *channel, PipeItem *item, int type) { ring_item_init(&item->link); item->type = type; }
@@ -1572,9 +1572,9 @@ void red_channel_client_pipe_add_type(RedChannelClient *rcc, int pipe_item_type) void red_channel_pipes_add_type(RedChannel *channel, int pipe_item_type) { - RingItem *link; + RingItem *link, *next; - RING_FOREACH(link, &channel->clients) { + RING_FOREACH_SAFE(link, next, &channe...
CWE-399
null
null
1,720
static void red_channel_pipes_create_batch(RedChannel *channel, new_pipe_item_t creator, void *data, rcc_item_t callback) { RingItem *link; RedChannelClient *rcc; PipeItem *item; int num = 0; RING_FOREACH(link, &channel->clients) { ...
DoS
0
static void red_channel_pipes_create_batch(RedChannel *channel, new_pipe_item_t creator, void *data, rcc_item_t callback) { RingItem *link; RedChannelClient *rcc; PipeItem *item; int num = 0; RING_FOREACH(link, &channel->clients) { ...
@@ -1572,9 +1572,9 @@ void red_channel_client_pipe_add_type(RedChannelClient *rcc, int pipe_item_type) void red_channel_pipes_add_type(RedChannel *channel, int pipe_item_type) { - RingItem *link; + RingItem *link, *next; - RING_FOREACH(link, &channel->clients) { + RING_FOREACH_SAFE(link, next, &channe...
CWE-399
null
null
1,721
void red_channel_pipes_new_add(RedChannel *channel, new_pipe_item_t creator, void *data) { red_channel_pipes_create_batch(channel, creator, data, red_channel_client_pipe_add); }
DoS
0
void red_channel_pipes_new_add(RedChannel *channel, new_pipe_item_t creator, void *data) { red_channel_pipes_create_batch(channel, creator, data, red_channel_client_pipe_add); }
@@ -1572,9 +1572,9 @@ void red_channel_client_pipe_add_type(RedChannelClient *rcc, int pipe_item_type) void red_channel_pipes_add_type(RedChannel *channel, int pipe_item_type) { - RingItem *link; + RingItem *link, *next; - RING_FOREACH(link, &channel->clients) { + RING_FOREACH_SAFE(link, next, &channe...
CWE-399
null
null
1,722
void red_channel_pipes_new_add_push(RedChannel *channel, new_pipe_item_t creator, void *data) { red_channel_pipes_create_batch(channel, creator, data, red_channel_client_pipe_add); red_channel_push(channel); }
DoS
0
void red_channel_pipes_new_add_push(RedChannel *channel, new_pipe_item_t creator, void *data) { red_channel_pipes_create_batch(channel, creator, data, red_channel_client_pipe_add); red_channel_push(channel); }
@@ -1572,9 +1572,9 @@ void red_channel_client_pipe_add_type(RedChannelClient *rcc, int pipe_item_type) void red_channel_pipes_add_type(RedChannel *channel, int pipe_item_type) { - RingItem *link; + RingItem *link, *next; - RING_FOREACH(link, &channel->clients) { + RING_FOREACH_SAFE(link, next, &channe...
CWE-399
null
null
1,723
void red_channel_pipes_new_add_tail(RedChannel *channel, new_pipe_item_t creator, void *data) { red_channel_pipes_create_batch(channel, creator, data, red_channel_client_pipe_add_tail_no_push); }
DoS
0
void red_channel_pipes_new_add_tail(RedChannel *channel, new_pipe_item_t creator, void *data) { red_channel_pipes_create_batch(channel, creator, data, red_channel_client_pipe_add_tail_no_push); }
@@ -1572,9 +1572,9 @@ void red_channel_client_pipe_add_type(RedChannelClient *rcc, int pipe_item_type) void red_channel_pipes_add_type(RedChannel *channel, int pipe_item_type) { - RingItem *link; + RingItem *link, *next; - RING_FOREACH(link, &channel->clients) { + RING_FOREACH_SAFE(link, next, &channe...
CWE-399
null
null
1,724
void red_channel_push(RedChannel *channel) { RingItem *link; RingItem *next; RedChannelClient *rcc; if (!channel) { return; } RING_FOREACH_SAFE(link, next, &channel->clients) { rcc = SPICE_CONTAINEROF(link, RedChannelClient, channel_link); red_channel_client_push(rcc); ...
DoS
0
void red_channel_push(RedChannel *channel) { RingItem *link; RingItem *next; RedChannelClient *rcc; if (!channel) { return; } RING_FOREACH_SAFE(link, next, &channel->clients) { rcc = SPICE_CONTAINEROF(link, RedChannelClient, channel_link); red_channel_client_push(rcc); ...
@@ -1572,9 +1572,9 @@ void red_channel_client_pipe_add_type(RedChannelClient *rcc, int pipe_item_type) void red_channel_pipes_add_type(RedChannel *channel, int pipe_item_type) { - RingItem *link; + RingItem *link, *next; - RING_FOREACH(link, &channel->clients) { + RING_FOREACH_SAFE(link, next, &channe...
CWE-399
null
null
1,725
void red_channel_push_set_ack(RedChannel *channel) { red_channel_pipes_add_type(channel, PIPE_ITEM_TYPE_SET_ACK); }
DoS
0
void red_channel_push_set_ack(RedChannel *channel) { red_channel_pipes_add_type(channel, PIPE_ITEM_TYPE_SET_ACK); }
@@ -1572,9 +1572,9 @@ void red_channel_client_pipe_add_type(RedChannelClient *rcc, int pipe_item_type) void red_channel_pipes_add_type(RedChannel *channel, int pipe_item_type) { - RingItem *link; + RingItem *link, *next; - RING_FOREACH(link, &channel->clients) { + RING_FOREACH_SAFE(link, next, &channe...
CWE-399
null
null
1,726
void red_channel_receive(RedChannel *channel) { RingItem *link; RingItem *next; RedChannelClient *rcc; RING_FOREACH_SAFE(link, next, &channel->clients) { rcc = SPICE_CONTAINEROF(link, RedChannelClient, channel_link); red_channel_client_receive(rcc); } }
DoS
0
void red_channel_receive(RedChannel *channel) { RingItem *link; RingItem *next; RedChannelClient *rcc; RING_FOREACH_SAFE(link, next, &channel->clients) { rcc = SPICE_CONTAINEROF(link, RedChannelClient, channel_link); red_channel_client_receive(rcc); } }
@@ -1572,9 +1572,9 @@ void red_channel_client_pipe_add_type(RedChannelClient *rcc, int pipe_item_type) void red_channel_pipes_add_type(RedChannel *channel, int pipe_item_type) { - RingItem *link; + RingItem *link, *next; - RING_FOREACH(link, &channel->clients) { + RING_FOREACH_SAFE(link, next, &channe...
CWE-399
null
null
1,727
static void red_channel_ref(RedChannel *channel) { channel->refs++; }
DoS
0
static void red_channel_ref(RedChannel *channel) { channel->refs++; }
@@ -1572,9 +1572,9 @@ void red_channel_client_pipe_add_type(RedChannelClient *rcc, int pipe_item_type) void red_channel_pipes_add_type(RedChannel *channel, int pipe_item_type) { - RingItem *link; + RingItem *link, *next; - RING_FOREACH(link, &channel->clients) { + RING_FOREACH_SAFE(link, next, &channe...
CWE-399
null
null
1,728
void red_channel_send(RedChannel *channel) { RingItem *link; RingItem *next; RING_FOREACH_SAFE(link, next, &channel->clients) { red_channel_client_send(SPICE_CONTAINEROF(link, RedChannelClient, channel_link)); } }
DoS
0
void red_channel_send(RedChannel *channel) { RingItem *link; RingItem *next; RING_FOREACH_SAFE(link, next, &channel->clients) { red_channel_client_send(SPICE_CONTAINEROF(link, RedChannelClient, channel_link)); } }
@@ -1572,9 +1572,9 @@ void red_channel_client_pipe_add_type(RedChannelClient *rcc, int pipe_item_type) void red_channel_pipes_add_type(RedChannel *channel, int pipe_item_type) { - RingItem *link; + RingItem *link, *next; - RING_FOREACH(link, &channel->clients) { + RING_FOREACH_SAFE(link, next, &channe...
CWE-399
null
null
1,729
void red_channel_set_cap(RedChannel *channel, uint32_t cap) { add_capability(&channel->local_caps.caps, &channel->local_caps.num_caps, cap); }
DoS
0
void red_channel_set_cap(RedChannel *channel, uint32_t cap) { add_capability(&channel->local_caps.caps, &channel->local_caps.num_caps, cap); }
@@ -1572,9 +1572,9 @@ void red_channel_client_pipe_add_type(RedChannelClient *rcc, int pipe_item_type) void red_channel_pipes_add_type(RedChannel *channel, int pipe_item_type) { - RingItem *link; + RingItem *link, *next; - RING_FOREACH(link, &channel->clients) { + RING_FOREACH_SAFE(link, next, &channe...
CWE-399
null
null
1,730
void red_channel_set_data(RedChannel *channel, void *data) { spice_assert(channel); channel->data = data; }
DoS
0
void red_channel_set_data(RedChannel *channel, void *data) { spice_assert(channel); channel->data = data; }
@@ -1572,9 +1572,9 @@ void red_channel_client_pipe_add_type(RedChannelClient *rcc, int pipe_item_type) void red_channel_pipes_add_type(RedChannel *channel, int pipe_item_type) { - RingItem *link; + RingItem *link, *next; - RING_FOREACH(link, &channel->clients) { + RING_FOREACH_SAFE(link, next, &channe...
CWE-399
null
null
1,731
uint32_t red_channel_sum_pipes_size(RedChannel *channel) { RingItem *link; RedChannelClient *rcc; uint32_t sum = 0; RING_FOREACH(link, &channel->clients) { rcc = SPICE_CONTAINEROF(link, RedChannelClient, channel_link); sum += rcc->pipe_size; } return sum; }
DoS
0
uint32_t red_channel_sum_pipes_size(RedChannel *channel) { RingItem *link; RedChannelClient *rcc; uint32_t sum = 0; RING_FOREACH(link, &channel->clients) { rcc = SPICE_CONTAINEROF(link, RedChannelClient, channel_link); sum += rcc->pipe_size; } return sum; }
@@ -1572,9 +1572,9 @@ void red_channel_client_pipe_add_type(RedChannelClient *rcc, int pipe_item_type) void red_channel_pipes_add_type(RedChannel *channel, int pipe_item_type) { - RingItem *link; + RingItem *link, *next; - RING_FOREACH(link, &channel->clients) { + RING_FOREACH_SAFE(link, next, &channe...
CWE-399
null
null
1,732
int red_channel_test_remote_cap(RedChannel *channel, uint32_t cap) { RingItem *link; RING_FOREACH(link, &channel->clients) { RedChannelClient *rcc = SPICE_CONTAINEROF(link, RedChannelClient, channel_link); if (!red_channel_client_test_remote_cap(rcc, cap)) { return FALSE; }...
DoS
0
int red_channel_test_remote_cap(RedChannel *channel, uint32_t cap) { RingItem *link; RING_FOREACH(link, &channel->clients) { RedChannelClient *rcc = SPICE_CONTAINEROF(link, RedChannelClient, channel_link); if (!red_channel_client_test_remote_cap(rcc, cap)) { return FALSE; }...
@@ -1572,9 +1572,9 @@ void red_channel_client_pipe_add_type(RedChannelClient *rcc, int pipe_item_type) void red_channel_pipes_add_type(RedChannel *channel, int pipe_item_type) { - RingItem *link; + RingItem *link, *next; - RING_FOREACH(link, &channel->clients) { + RING_FOREACH_SAFE(link, next, &channe...
CWE-399
null
null
1,733
static void red_channel_unref(RedChannel *channel) { if (!--channel->refs) { if (channel->local_caps.num_common_caps) { free(channel->local_caps.common_caps); } if (channel->local_caps.num_caps) { free(channel->local_caps.caps); } free(channel); ...
DoS
0
static void red_channel_unref(RedChannel *channel) { if (!--channel->refs) { if (channel->local_caps.num_common_caps) { free(channel->local_caps.common_caps); } if (channel->local_caps.num_caps) { free(channel->local_caps.caps); } free(channel); ...
@@ -1572,9 +1572,9 @@ void red_channel_client_pipe_add_type(RedChannelClient *rcc, int pipe_item_type) void red_channel_pipes_add_type(RedChannel *channel, int pipe_item_type) { - RingItem *link; + RingItem *link, *next; - RING_FOREACH(link, &channel->clients) { + RING_FOREACH_SAFE(link, next, &channe...
CWE-399
null
null
1,734
static void red_client_add_channel(RedClient *client, RedChannelClient *rcc) { spice_assert(rcc && client); ring_add(&client->channels, &rcc->client_link); if (client->during_target_migrate && client->seamless_migrate) { red_channel_client_set_migration_seamless(rcc); } client->channels_num+...
DoS
0
static void red_client_add_channel(RedClient *client, RedChannelClient *rcc) { spice_assert(rcc && client); ring_add(&client->channels, &rcc->client_link); if (client->during_target_migrate && client->seamless_migrate) { red_channel_client_set_migration_seamless(rcc); } client->channels_num+...
@@ -1572,9 +1572,9 @@ void red_channel_client_pipe_add_type(RedChannelClient *rcc, int pipe_item_type) void red_channel_pipes_add_type(RedChannel *channel, int pipe_item_type) { - RingItem *link; + RingItem *link, *next; - RING_FOREACH(link, &channel->clients) { + RING_FOREACH_SAFE(link, next, &channe...
CWE-399
null
null
1,735
int red_client_during_migrate_at_target(RedClient *client) { int ret; pthread_mutex_lock(&client->lock); ret = client->during_target_migrate; pthread_mutex_unlock(&client->lock); return ret; }
DoS
0
int red_client_during_migrate_at_target(RedClient *client) { int ret; pthread_mutex_lock(&client->lock); ret = client->during_target_migrate; pthread_mutex_unlock(&client->lock); return ret; }
@@ -1572,9 +1572,9 @@ void red_channel_client_pipe_add_type(RedChannelClient *rcc, int pipe_item_type) void red_channel_pipes_add_type(RedChannel *channel, int pipe_item_type) { - RingItem *link; + RingItem *link, *next; - RING_FOREACH(link, &channel->clients) { + RING_FOREACH_SAFE(link, next, &channe...
CWE-399
null
null
1,736
static RedChannelClient *red_client_get_channel(RedClient *client, int type, int id) { RingItem *link; RedChannelClient *rcc; RedChannelClient *ret = NULL; RING_FOREACH(link, &client->channels) { rcc = SPICE_CONTAINEROF(link, RedChannelClient, client_link); if (rcc->channel->type == typ...
DoS
0
static RedChannelClient *red_client_get_channel(RedClient *client, int type, int id) { RingItem *link; RedChannelClient *rcc; RedChannelClient *ret = NULL; RING_FOREACH(link, &client->channels) { rcc = SPICE_CONTAINEROF(link, RedChannelClient, client_link); if (rcc->channel->type == typ...
@@ -1572,9 +1572,9 @@ void red_channel_client_pipe_add_type(RedChannelClient *rcc, int pipe_item_type) void red_channel_pipes_add_type(RedChannel *channel, int pipe_item_type) { - RingItem *link; + RingItem *link, *next; - RING_FOREACH(link, &channel->clients) { + RING_FOREACH_SAFE(link, next, &channe...
CWE-399
null
null
1,737
MainChannelClient *red_client_get_main(RedClient *client) { return client->mcc; }
DoS
0
MainChannelClient *red_client_get_main(RedClient *client) { return client->mcc; }
@@ -1572,9 +1572,9 @@ void red_channel_client_pipe_add_type(RedChannelClient *rcc, int pipe_item_type) void red_channel_pipes_add_type(RedChannel *channel, int pipe_item_type) { - RingItem *link; + RingItem *link, *next; - RING_FOREACH(link, &channel->clients) { + RING_FOREACH_SAFE(link, next, &channe...
CWE-399
null
null
1,738
void red_client_migrate(RedClient *client) { RingItem *link, *next; RedChannelClient *rcc; spice_printerr("migrate client with #channels %d", client->channels_num); if (!pthread_equal(pthread_self(), client->thread_id)) { spice_warning("client->thread_id (0x%lx) != pthread_self (0x%lx)." ...
DoS
0
void red_client_migrate(RedClient *client) { RingItem *link, *next; RedChannelClient *rcc; spice_printerr("migrate client with #channels %d", client->channels_num); if (!pthread_equal(pthread_self(), client->thread_id)) { spice_warning("client->thread_id (0x%lx) != pthread_self (0x%lx)." ...
@@ -1572,9 +1572,9 @@ void red_channel_client_pipe_add_type(RedChannelClient *rcc, int pipe_item_type) void red_channel_pipes_add_type(RedChannel *channel, int pipe_item_type) { - RingItem *link; + RingItem *link, *next; - RING_FOREACH(link, &channel->clients) { + RING_FOREACH_SAFE(link, next, &channe...
CWE-399
null
null
1,739
RedClient *red_client_new(int migrated) { RedClient *client; client = spice_malloc0(sizeof(RedClient)); ring_init(&client->channels); pthread_mutex_init(&client->lock, NULL); client->thread_id = pthread_self(); client->during_target_migrate = migrated; return client; }
DoS
0
RedClient *red_client_new(int migrated) { RedClient *client; client = spice_malloc0(sizeof(RedClient)); ring_init(&client->channels); pthread_mutex_init(&client->lock, NULL); client->thread_id = pthread_self(); client->during_target_migrate = migrated; return client; }
@@ -1572,9 +1572,9 @@ void red_channel_client_pipe_add_type(RedChannelClient *rcc, int pipe_item_type) void red_channel_pipes_add_type(RedChannel *channel, int pipe_item_type) { - RingItem *link; + RingItem *link, *next; - RING_FOREACH(link, &channel->clients) { + RING_FOREACH_SAFE(link, next, &channe...
CWE-399
null
null
1,740
static void red_client_remove_channel(RedChannelClient *rcc) { pthread_mutex_lock(&rcc->client->lock); ring_remove(&rcc->client_link); rcc->client->channels_num--; pthread_mutex_unlock(&rcc->client->lock); }
DoS
0
static void red_client_remove_channel(RedChannelClient *rcc) { pthread_mutex_lock(&rcc->client->lock); ring_remove(&rcc->client_link); rcc->client->channels_num--; pthread_mutex_unlock(&rcc->client->lock); }
@@ -1572,9 +1572,9 @@ void red_channel_client_pipe_add_type(RedChannelClient *rcc, int pipe_item_type) void red_channel_pipes_add_type(RedChannel *channel, int pipe_item_type) { - RingItem *link; + RingItem *link, *next; - RING_FOREACH(link, &channel->clients) { + RING_FOREACH_SAFE(link, next, &channe...
CWE-399
null
null
1,741
void red_client_semi_seamless_migrate_complete(RedClient *client) { RingItem *link; pthread_mutex_lock(&client->lock); if (!client->during_target_migrate || client->seamless_migrate) { spice_error("unexpected"); pthread_mutex_unlock(&client->lock); return; } client->during_t...
DoS
0
void red_client_semi_seamless_migrate_complete(RedClient *client) { RingItem *link; pthread_mutex_lock(&client->lock); if (!client->during_target_migrate || client->seamless_migrate) { spice_error("unexpected"); pthread_mutex_unlock(&client->lock); return; } client->during_t...
@@ -1572,9 +1572,9 @@ void red_channel_client_pipe_add_type(RedChannelClient *rcc, int pipe_item_type) void red_channel_pipes_add_type(RedChannel *channel, int pipe_item_type) { - RingItem *link; + RingItem *link, *next; - RING_FOREACH(link, &channel->clients) { + RING_FOREACH_SAFE(link, next, &channe...
CWE-399
null
null
1,742
void red_client_set_main(RedClient *client, MainChannelClient *mcc) { client->mcc = mcc; }
DoS
0
void red_client_set_main(RedClient *client, MainChannelClient *mcc) { client->mcc = mcc; }
@@ -1572,9 +1572,9 @@ void red_channel_client_pipe_add_type(RedChannelClient *rcc, int pipe_item_type) void red_channel_pipes_add_type(RedChannel *channel, int pipe_item_type) { - RingItem *link; + RingItem *link, *next; - RING_FOREACH(link, &channel->clients) { + RING_FOREACH_SAFE(link, next, &channe...
CWE-399
null
null
1,743
static void red_peer_handle_incoming(RedsStream *stream, IncomingHandler *handler) { int bytes_read; uint8_t *parsed; size_t parsed_size; message_destructor_t parsed_free; uint16_t msg_type; uint32_t msg_size; /* XXX: This needs further investigation as to the underlying cause, it happened ...
DoS
0
static void red_peer_handle_incoming(RedsStream *stream, IncomingHandler *handler) { int bytes_read; uint8_t *parsed; size_t parsed_size; message_destructor_t parsed_free; uint16_t msg_type; uint32_t msg_size; /* XXX: This needs further investigation as to the underlying cause, it happened ...
@@ -1572,9 +1572,9 @@ void red_channel_client_pipe_add_type(RedChannelClient *rcc, int pipe_item_type) void red_channel_pipes_add_type(RedChannel *channel, int pipe_item_type) { - RingItem *link; + RingItem *link, *next; - RING_FOREACH(link, &channel->clients) { + RING_FOREACH_SAFE(link, next, &channe...
CWE-399
null
null
1,744
static int red_peer_receive(RedsStream *stream, uint8_t *buf, uint32_t size) { uint8_t *pos = buf; while (size) { int now; if (stream->shutdown) { return -1; } now = reds_stream_read(stream, pos, size); if (now <= 0) { if (now == 0) { ...
DoS
0
static int red_peer_receive(RedsStream *stream, uint8_t *buf, uint32_t size) { uint8_t *pos = buf; while (size) { int now; if (stream->shutdown) { return -1; } now = reds_stream_read(stream, pos, size); if (now <= 0) { if (now == 0) { ...
@@ -1572,9 +1572,9 @@ void red_channel_client_pipe_add_type(RedChannelClient *rcc, int pipe_item_type) void red_channel_pipes_add_type(RedChannel *channel, int pipe_item_type) { - RingItem *link; + RingItem *link, *next; - RING_FOREACH(link, &channel->clients) { + RING_FOREACH_SAFE(link, next, &channe...
CWE-399
null
null
1,745
int test_capabilty(uint32_t *caps, int num_caps, uint32_t cap) { uint32_t index = cap / 32; if (num_caps < index + 1) { return FALSE; } return (caps[index] & (1 << (cap % 32))) != 0; }
DoS
0
int test_capabilty(uint32_t *caps, int num_caps, uint32_t cap) { uint32_t index = cap / 32; if (num_caps < index + 1) { return FALSE; } return (caps[index] & (1 << (cap % 32))) != 0; }
@@ -1572,9 +1572,9 @@ void red_channel_client_pipe_add_type(RedChannelClient *rcc, int pipe_item_type) void red_channel_pipes_add_type(RedChannel *channel, int pipe_item_type) { - RingItem *link; + RingItem *link, *next; - RING_FOREACH(link, &channel->clients) { + RING_FOREACH_SAFE(link, next, &channe...
CWE-399
null
null
1,746
FoFiType1C::FoFiType1C(char *fileA, int lenA, GBool freeFileDataA): FoFiBase(fileA, lenA, freeFileDataA) { name = NULL; encoding = NULL; privateDicts = NULL; fdSelect = NULL; charset = NULL; charsetLength = 0; }
DoS
0
FoFiType1C::FoFiType1C(char *fileA, int lenA, GBool freeFileDataA): FoFiBase(fileA, lenA, freeFileDataA) { name = NULL; encoding = NULL; privateDicts = NULL; fdSelect = NULL; charset = NULL; charsetLength = 0; }
@@ -898,6 +898,9 @@ void FoFiType1C::convertToType0(char *psName, int *codeMap, int nCodes, } } + if (fd >= nFDs) + continue; + // font dictionary (unencrypted section) (*outputFunc)(outputStream, "16 dict begin\n", 14); (*outputFunc)(outputStream, "/FontName /", 11);
CWE-125
null
null
1,747
void FoFiType1C::buildEncoding() { char buf[256]; int nCodes, nRanges, encFormat; int pos, c, sid, nLeft, nSups, i, j; if (topDict.encodingOffset == 0) { encoding = (char **)fofiType1StandardEncoding; } else if (topDict.encodingOffset == 1) { encoding = (char **)fofiType1ExpertEncoding; } else { ...
DoS
0
void FoFiType1C::buildEncoding() { char buf[256]; int nCodes, nRanges, encFormat; int pos, c, sid, nLeft, nSups, i, j; if (topDict.encodingOffset == 0) { encoding = (char **)fofiType1StandardEncoding; } else if (topDict.encodingOffset == 1) { encoding = (char **)fofiType1ExpertEncoding; } else { ...
@@ -898,6 +898,9 @@ void FoFiType1C::convertToType0(char *psName, int *codeMap, int nCodes, } } + if (fd >= nFDs) + continue; + // font dictionary (unencrypted section) (*outputFunc)(outputStream, "16 dict begin\n", 14); (*outputFunc)(outputStream, "/FontName /", 11);
CWE-125
null
null
1,748
void FoFiType1C::cvtGlyph(int offset, int nBytes, GooString *charBuf, Type1CIndex *subrIdx, Type1CPrivateDict *pDict, GBool top) { Type1CIndexVal val; GBool ok, dFP; double d, dx, dy; Gushort r2; Guchar byte; int pos, subrBias, start, i, k; start = charBuf->getLength(); if (top) { charBuf...
DoS
0
void FoFiType1C::cvtGlyph(int offset, int nBytes, GooString *charBuf, Type1CIndex *subrIdx, Type1CPrivateDict *pDict, GBool top) { Type1CIndexVal val; GBool ok, dFP; double d, dx, dy; Gushort r2; Guchar byte; int pos, subrBias, start, i, k; start = charBuf->getLength(); if (top) { charBuf...
@@ -898,6 +898,9 @@ void FoFiType1C::convertToType0(char *psName, int *codeMap, int nCodes, } } + if (fd >= nFDs) + continue; + // font dictionary (unencrypted section) (*outputFunc)(outputStream, "16 dict begin\n", 14); (*outputFunc)(outputStream, "/FontName /", 11);
CWE-125
null
null
1,749
void FoFiType1C::cvtNum(double x, GBool isFP, GooString *charBuf) { Guchar buf[12]; int y, n; n = 0; if (isFP) { if (x >= -32768 && x < 32768) { y = (int)(x * 256.0); buf[0] = 255; buf[1] = (Guchar)(y >> 24); buf[2] = (Guchar)(y >> 16); buf[3] = (Guchar)(y >> 8); buf[4] ...
DoS
0
void FoFiType1C::cvtNum(double x, GBool isFP, GooString *charBuf) { Guchar buf[12]; int y, n; n = 0; if (isFP) { if (x >= -32768 && x < 32768) { y = (int)(x * 256.0); buf[0] = 255; buf[1] = (Guchar)(y >> 24); buf[2] = (Guchar)(y >> 16); buf[3] = (Guchar)(y >> 8); buf[4] ...
@@ -898,6 +898,9 @@ void FoFiType1C::convertToType0(char *psName, int *codeMap, int nCodes, } } + if (fd >= nFDs) + continue; + // font dictionary (unencrypted section) (*outputFunc)(outputStream, "16 dict begin\n", 14); (*outputFunc)(outputStream, "/FontName /", 11);
CWE-125
null
null
1,750
void FoFiType1C::eexecCvtGlyph(Type1CEexecBuf *eb, const char *glyphName, int offset, int nBytes, Type1CIndex *subrIdx, Type1CPrivateDict *pDict) { GooString *buf; GooString *charBuf; charBuf = new GooString(); cvtGlyph(offset, nBytes, charBuf, subrIdx, pDict, gTrue); buf = Goo...
DoS
0
void FoFiType1C::eexecCvtGlyph(Type1CEexecBuf *eb, const char *glyphName, int offset, int nBytes, Type1CIndex *subrIdx, Type1CPrivateDict *pDict) { GooString *buf; GooString *charBuf; charBuf = new GooString(); cvtGlyph(offset, nBytes, charBuf, subrIdx, pDict, gTrue); buf = Goo...
@@ -898,6 +898,9 @@ void FoFiType1C::convertToType0(char *psName, int *codeMap, int nCodes, } } + if (fd >= nFDs) + continue; + // font dictionary (unencrypted section) (*outputFunc)(outputStream, "16 dict begin\n", 14); (*outputFunc)(outputStream, "/FontName /", 11);
CWE-125
null
null
1,751
void FoFiType1C::eexecWrite(Type1CEexecBuf *eb, const char *s) { Guchar *p; Guchar x; for (p = (Guchar *)s; *p; ++p) { x = *p ^ (eb->r1 >> 8); eb->r1 = (x + eb->r1) * 52845 + 22719; if (eb->ascii) { (*eb->outputFunc)(eb->outputStream, &hexChars[x >> 4], 1); (*eb->outputFunc)(eb->outputStr...
DoS
0
void FoFiType1C::eexecWrite(Type1CEexecBuf *eb, const char *s) { Guchar *p; Guchar x; for (p = (Guchar *)s; *p; ++p) { x = *p ^ (eb->r1 >> 8); eb->r1 = (x + eb->r1) * 52845 + 22719; if (eb->ascii) { (*eb->outputFunc)(eb->outputStream, &hexChars[x >> 4], 1); (*eb->outputFunc)(eb->outputStr...
@@ -898,6 +898,9 @@ void FoFiType1C::convertToType0(char *psName, int *codeMap, int nCodes, } } + if (fd >= nFDs) + continue; + // font dictionary (unencrypted section) (*outputFunc)(outputStream, "16 dict begin\n", 14); (*outputFunc)(outputStream, "/FontName /", 11);
CWE-125
null
null
1,752
void FoFiType1C::eexecWriteCharstring(Type1CEexecBuf *eb, Guchar *s, int n) { Guchar x; int i; for (i = 0; i < n; ++i) { x = s[i] ^ (eb->r1 >> 8); eb->r1 = (x + eb->r1) * 52845 + 22719; if (eb->ascii) { (*eb->outputFunc)(eb->outputStream, &hexChars[x >> 4], 1); (*eb->outputFunc)...
DoS
0
void FoFiType1C::eexecWriteCharstring(Type1CEexecBuf *eb, Guchar *s, int n) { Guchar x; int i; for (i = 0; i < n; ++i) { x = s[i] ^ (eb->r1 >> 8); eb->r1 = (x + eb->r1) * 52845 + 22719; if (eb->ascii) { (*eb->outputFunc)(eb->outputStream, &hexChars[x >> 4], 1); (*eb->outputFunc)...
@@ -898,6 +898,9 @@ void FoFiType1C::convertToType0(char *psName, int *codeMap, int nCodes, } } + if (fd >= nFDs) + continue; + // font dictionary (unencrypted section) (*outputFunc)(outputStream, "16 dict begin\n", 14); (*outputFunc)(outputStream, "/FontName /", 11);
CWE-125
null
null
1,753
int *FoFiType1C::getCIDToGIDMap(int *nCIDs) { int *map; int n, i; if (topDict.firstOp != 0x0c1e) { *nCIDs = 0; return NULL; } n = 0; for (i = 0; i < nGlyphs && i < charsetLength; ++i) { if (charset[i] > n) { n = charset[i]; } } ++n; map = (int *)gmallocn(n, sizeof(int)); mems...
DoS
0
int *FoFiType1C::getCIDToGIDMap(int *nCIDs) { int *map; int n, i; if (topDict.firstOp != 0x0c1e) { *nCIDs = 0; return NULL; } n = 0; for (i = 0; i < nGlyphs && i < charsetLength; ++i) { if (charset[i] > n) { n = charset[i]; } } ++n; map = (int *)gmallocn(n, sizeof(int)); mems...
@@ -898,6 +898,9 @@ void FoFiType1C::convertToType0(char *psName, int *codeMap, int nCodes, } } + if (fd >= nFDs) + continue; + // font dictionary (unencrypted section) (*outputFunc)(outputStream, "16 dict begin\n", 14); (*outputFunc)(outputStream, "/FontName /", 11);
CWE-125
null
null
1,754
int FoFiType1C::getDeltaFPArray(double *arr, int maxLen) { double x; int n, i; if ((n = nOps) > maxLen) { n = maxLen; } x = 0; for (i = 0; i < n; ++i) { x += ops[i].num; arr[i] = x; } return n; }
DoS
0
int FoFiType1C::getDeltaFPArray(double *arr, int maxLen) { double x; int n, i; if ((n = nOps) > maxLen) { n = maxLen; } x = 0; for (i = 0; i < n; ++i) { x += ops[i].num; arr[i] = x; } return n; }
@@ -898,6 +898,9 @@ void FoFiType1C::convertToType0(char *psName, int *codeMap, int nCodes, } } + if (fd >= nFDs) + continue; + // font dictionary (unencrypted section) (*outputFunc)(outputStream, "16 dict begin\n", 14); (*outputFunc)(outputStream, "/FontName /", 11);
CWE-125
null
null
1,755
int FoFiType1C::getDeltaIntArray(int *arr, int maxLen) { int x; int n, i; if ((n = nOps) > maxLen) { n = maxLen; } x = 0; for (i = 0; i < n; ++i) { x += (int)ops[i].num; arr[i] = x; } return n; }
DoS
0
int FoFiType1C::getDeltaIntArray(int *arr, int maxLen) { int x; int n, i; if ((n = nOps) > maxLen) { n = maxLen; } x = 0; for (i = 0; i < n; ++i) { x += (int)ops[i].num; arr[i] = x; } return n; }
@@ -898,6 +898,9 @@ void FoFiType1C::convertToType0(char *psName, int *codeMap, int nCodes, } } + if (fd >= nFDs) + continue; + // font dictionary (unencrypted section) (*outputFunc)(outputStream, "16 dict begin\n", 14); (*outputFunc)(outputStream, "/FontName /", 11);
CWE-125
null
null
1,756
char **FoFiType1C::getEncoding() { return encoding; }
DoS
0
char **FoFiType1C::getEncoding() { return encoding; }
@@ -898,6 +898,9 @@ void FoFiType1C::convertToType0(char *psName, int *codeMap, int nCodes, } } + if (fd >= nFDs) + continue; + // font dictionary (unencrypted section) (*outputFunc)(outputStream, "16 dict begin\n", 14); (*outputFunc)(outputStream, "/FontName /", 11);
CWE-125
null
null
1,757
void FoFiType1C::getFontMatrix(double *mat) { int i; if (topDict.firstOp == 0x0c1e && privateDicts[0].hasFontMatrix) { if (topDict.hasFontMatrix) { mat[0] = topDict.fontMatrix[0] * privateDicts[0].fontMatrix[0] + topDict.fontMatrix[1] * privateDicts[0].fontMatrix[2]; mat[1] = topDict.fontMa...
DoS
0
void FoFiType1C::getFontMatrix(double *mat) { int i; if (topDict.firstOp == 0x0c1e && privateDicts[0].hasFontMatrix) { if (topDict.hasFontMatrix) { mat[0] = topDict.fontMatrix[0] * privateDicts[0].fontMatrix[0] + topDict.fontMatrix[1] * privateDicts[0].fontMatrix[2]; mat[1] = topDict.fontMa...
@@ -898,6 +898,9 @@ void FoFiType1C::convertToType0(char *psName, int *codeMap, int nCodes, } } + if (fd >= nFDs) + continue; + // font dictionary (unencrypted section) (*outputFunc)(outputStream, "16 dict begin\n", 14); (*outputFunc)(outputStream, "/FontName /", 11);
CWE-125
null
null
1,758
GooString *FoFiType1C::getGlyphName(int gid) { char buf[256]; GBool ok; ok = gTrue; if (gid < 0 || gid >= charsetLength) return NULL; getString(charset[gid], buf, &ok); if (!ok) { return NULL; } return new GooString(buf); }
DoS
0
GooString *FoFiType1C::getGlyphName(int gid) { char buf[256]; GBool ok; ok = gTrue; if (gid < 0 || gid >= charsetLength) return NULL; getString(charset[gid], buf, &ok); if (!ok) { return NULL; } return new GooString(buf); }
@@ -898,6 +898,9 @@ void FoFiType1C::convertToType0(char *psName, int *codeMap, int nCodes, } } + if (fd >= nFDs) + continue; + // font dictionary (unencrypted section) (*outputFunc)(outputStream, "16 dict begin\n", 14); (*outputFunc)(outputStream, "/FontName /", 11);
CWE-125
null
null
1,759
void FoFiType1C::getIndex(int pos, Type1CIndex *idx, GBool *ok) { idx->pos = pos; idx->len = getU16BE(pos, ok); if (idx->len == 0) { idx->offSize = 0; idx->startPos = idx->endPos = pos + 2; } else { idx->offSize = getU8(pos + 2, ok); if (idx->offSize < 1 || idx->offSize > 4) { *ok = gFalse...
DoS
0
void FoFiType1C::getIndex(int pos, Type1CIndex *idx, GBool *ok) { idx->pos = pos; idx->len = getU16BE(pos, ok); if (idx->len == 0) { idx->offSize = 0; idx->startPos = idx->endPos = pos + 2; } else { idx->offSize = getU8(pos + 2, ok); if (idx->offSize < 1 || idx->offSize > 4) { *ok = gFalse...
@@ -898,6 +898,9 @@ void FoFiType1C::convertToType0(char *psName, int *codeMap, int nCodes, } } + if (fd >= nFDs) + continue; + // font dictionary (unencrypted section) (*outputFunc)(outputStream, "16 dict begin\n", 14); (*outputFunc)(outputStream, "/FontName /", 11);
CWE-125
null
null
1,760
void FoFiType1C::getIndexVal(Type1CIndex *idx, int i, Type1CIndexVal *val, GBool *ok) { int pos0, pos1; if (i < 0 || i >= idx->len) { *ok = gFalse; return; } pos0 = idx->startPos + getUVarBE(idx->pos + 3 + i * idx->offSize, idx->offSize, ok); pos1 = idx->startPos + getUVarBE(idx->pos +...
DoS
0
void FoFiType1C::getIndexVal(Type1CIndex *idx, int i, Type1CIndexVal *val, GBool *ok) { int pos0, pos1; if (i < 0 || i >= idx->len) { *ok = gFalse; return; } pos0 = idx->startPos + getUVarBE(idx->pos + 3 + i * idx->offSize, idx->offSize, ok); pos1 = idx->startPos + getUVarBE(idx->pos +...
@@ -898,6 +898,9 @@ void FoFiType1C::convertToType0(char *psName, int *codeMap, int nCodes, } } + if (fd >= nFDs) + continue; + // font dictionary (unencrypted section) (*outputFunc)(outputStream, "16 dict begin\n", 14); (*outputFunc)(outputStream, "/FontName /", 11);
CWE-125
null
null
1,761
int FoFiType1C::getOp(int pos, GBool charstring, GBool *ok) { static char nybChars[16] = "0123456789.ee -"; Type1COp op; char buf[65]; int b0, b1, nyb0, nyb1, x, i; b0 = getU8(pos++, ok); op.isNum = gTrue; op.isFP = gFalse; if (b0 == 28) { x = getU8(pos++, ok); x = (x << 8) | getU8(pos++, ok);...
DoS
0
int FoFiType1C::getOp(int pos, GBool charstring, GBool *ok) { static char nybChars[16] = "0123456789.ee -"; Type1COp op; char buf[65]; int b0, b1, nyb0, nyb1, x, i; b0 = getU8(pos++, ok); op.isNum = gTrue; op.isFP = gFalse; if (b0 == 28) { x = getU8(pos++, ok); x = (x << 8) | getU8(pos++, ok);...
@@ -898,6 +898,9 @@ void FoFiType1C::convertToType0(char *psName, int *codeMap, int nCodes, } } + if (fd >= nFDs) + continue; + // font dictionary (unencrypted section) (*outputFunc)(outputStream, "16 dict begin\n", 14); (*outputFunc)(outputStream, "/FontName /", 11);
CWE-125
null
null
1,762
char *FoFiType1C::getString(int sid, char *buf, GBool *ok) { Type1CIndexVal val; int n; if (sid < 0) { buf[0] = '\0'; } else if (sid < 391) { strcpy(buf, fofiType1CStdStrings[sid]); } else { sid -= 391; getIndexVal(&stringIdx, sid, &val, ok); if (*ok) { if ((n = val.len) > 255) { n...
DoS
0
char *FoFiType1C::getString(int sid, char *buf, GBool *ok) { Type1CIndexVal val; int n; if (sid < 0) { buf[0] = '\0'; } else if (sid < 391) { strcpy(buf, fofiType1CStdStrings[sid]); } else { sid -= 391; getIndexVal(&stringIdx, sid, &val, ok); if (*ok) { if ((n = val.len) > 255) { n...
@@ -898,6 +898,9 @@ void FoFiType1C::convertToType0(char *psName, int *codeMap, int nCodes, } } + if (fd >= nFDs) + continue; + // font dictionary (unencrypted section) (*outputFunc)(outputStream, "16 dict begin\n", 14); (*outputFunc)(outputStream, "/FontName /", 11);
CWE-125
null
null
1,763
FoFiType1C *FoFiType1C::load(char *fileName) { FoFiType1C *ff; char *fileA; int lenA; if (!(fileA = FoFiBase::readFile(fileName, &lenA))) { return NULL; } ff = new FoFiType1C(fileA, lenA, gTrue); if (!ff->parse()) { delete ff; return NULL; } return ff; }
DoS
0
FoFiType1C *FoFiType1C::load(char *fileName) { FoFiType1C *ff; char *fileA; int lenA; if (!(fileA = FoFiBase::readFile(fileName, &lenA))) { return NULL; } ff = new FoFiType1C(fileA, lenA, gTrue); if (!ff->parse()) { delete ff; return NULL; } return ff; }
@@ -898,6 +898,9 @@ void FoFiType1C::convertToType0(char *psName, int *codeMap, int nCodes, } } + if (fd >= nFDs) + continue; + // font dictionary (unencrypted section) (*outputFunc)(outputStream, "16 dict begin\n", 14); (*outputFunc)(outputStream, "/FontName /", 11);
CWE-125
null
null
1,764
FoFiType1C *FoFiType1C::make(char *fileA, int lenA) { FoFiType1C *ff; ff = new FoFiType1C(fileA, lenA, gFalse); if (!ff->parse()) { delete ff; return NULL; } return ff; }
DoS
0
FoFiType1C *FoFiType1C::make(char *fileA, int lenA) { FoFiType1C *ff; ff = new FoFiType1C(fileA, lenA, gFalse); if (!ff->parse()) { delete ff; return NULL; } return ff; }
@@ -898,6 +898,9 @@ void FoFiType1C::convertToType0(char *psName, int *codeMap, int nCodes, } } + if (fd >= nFDs) + continue; + // font dictionary (unencrypted section) (*outputFunc)(outputStream, "16 dict begin\n", 14); (*outputFunc)(outputStream, "/FontName /", 11);
CWE-125
null
null
1,765
GBool FoFiType1C::readCharset() { int charsetFormat, c, pos; int nLeft, i, j; if (topDict.charsetOffset == 0) { charset = fofiType1CISOAdobeCharset; charsetLength = sizeof(fofiType1CISOAdobeCharset) / sizeof(Gushort); } else if (topDict.charsetOffset == 1) { charset = fofiType1CExpertCharset; c...
DoS
0
GBool FoFiType1C::readCharset() { int charsetFormat, c, pos; int nLeft, i, j; if (topDict.charsetOffset == 0) { charset = fofiType1CISOAdobeCharset; charsetLength = sizeof(fofiType1CISOAdobeCharset) / sizeof(Gushort); } else if (topDict.charsetOffset == 1) { charset = fofiType1CExpertCharset; c...
@@ -898,6 +898,9 @@ void FoFiType1C::convertToType0(char *psName, int *codeMap, int nCodes, } } + if (fd >= nFDs) + continue; + // font dictionary (unencrypted section) (*outputFunc)(outputStream, "16 dict begin\n", 14); (*outputFunc)(outputStream, "/FontName /", 11);
CWE-125
null
null
1,766
void FoFiType1C::readFD(int offset, int length, Type1CPrivateDict *pDict) { int pos, pSize, pOffset; double fontMatrix[6] = {0}; GBool hasFontMatrix; hasFontMatrix = gFalse; fontMatrix[0] = fontMatrix[1] = fontMatrix[2] = 0; // make gcc happy fontMatrix[3] = fontMatrix[4] = fontMatrix[5] = 0; pSize = pOf...
DoS
0
void FoFiType1C::readFD(int offset, int length, Type1CPrivateDict *pDict) { int pos, pSize, pOffset; double fontMatrix[6] = {0}; GBool hasFontMatrix; hasFontMatrix = gFalse; fontMatrix[0] = fontMatrix[1] = fontMatrix[2] = 0; // make gcc happy fontMatrix[3] = fontMatrix[4] = fontMatrix[5] = 0; pSize = pOf...
@@ -898,6 +898,9 @@ void FoFiType1C::convertToType0(char *psName, int *codeMap, int nCodes, } } + if (fd >= nFDs) + continue; + // font dictionary (unencrypted section) (*outputFunc)(outputStream, "16 dict begin\n", 14); (*outputFunc)(outputStream, "/FontName /", 11);
CWE-125
null
null
1,767
void FoFiType1C::readFDSelect() { int fdSelectFmt, pos, nRanges, gid0, gid1, fd, i, j; fdSelect = (Guchar *)gmalloc(nGlyphs); if (topDict.fdSelectOffset == 0) { for (i = 0; i < nGlyphs; ++i) { fdSelect[i] = 0; } } else { pos = topDict.fdSelectOffset; fdSelectFmt = getU8(pos++, &parsedOk);...
DoS
0
void FoFiType1C::readFDSelect() { int fdSelectFmt, pos, nRanges, gid0, gid1, fd, i, j; fdSelect = (Guchar *)gmalloc(nGlyphs); if (topDict.fdSelectOffset == 0) { for (i = 0; i < nGlyphs; ++i) { fdSelect[i] = 0; } } else { pos = topDict.fdSelectOffset; fdSelectFmt = getU8(pos++, &parsedOk);...
@@ -898,6 +898,9 @@ void FoFiType1C::convertToType0(char *psName, int *codeMap, int nCodes, } } + if (fd >= nFDs) + continue; + // font dictionary (unencrypted section) (*outputFunc)(outputStream, "16 dict begin\n", 14); (*outputFunc)(outputStream, "/FontName /", 11);
CWE-125
null
null
1,768
void FoFiType1C::readPrivateDict(int offset, int length, Type1CPrivateDict *pDict) { int pos; pDict->hasFontMatrix = gFalse; pDict->nBlueValues = 0; pDict->nOtherBlues = 0; pDict->nFamilyBlues = 0; pDict->nFamilyOtherBlues = 0; pDict->blueScale = 0.039625; pDict->blueShift = 7; pDict->blueFuzz =...
DoS
0
void FoFiType1C::readPrivateDict(int offset, int length, Type1CPrivateDict *pDict) { int pos; pDict->hasFontMatrix = gFalse; pDict->nBlueValues = 0; pDict->nOtherBlues = 0; pDict->nFamilyBlues = 0; pDict->nFamilyOtherBlues = 0; pDict->blueScale = 0.039625; pDict->blueShift = 7; pDict->blueFuzz =...
@@ -898,6 +898,9 @@ void FoFiType1C::convertToType0(char *psName, int *codeMap, int nCodes, } } + if (fd >= nFDs) + continue; + // font dictionary (unencrypted section) (*outputFunc)(outputStream, "16 dict begin\n", 14); (*outputFunc)(outputStream, "/FontName /", 11);
CWE-125
null
null
1,769
void FoFiType1C::writePSString(char *s, FoFiOutputFunc outputFunc, void *outputStream) { char buf[80]; char *p; int i, c; i = 0; buf[i++] = '('; for (p = s; *p; ++p) { c = *p & 0xff; if (c == '(' || c == ')' || c == '\\') { buf[i++] = '\\'; buf[i++] = c; } else if (c < 0x2...
DoS
0
void FoFiType1C::writePSString(char *s, FoFiOutputFunc outputFunc, void *outputStream) { char buf[80]; char *p; int i, c; i = 0; buf[i++] = '('; for (p = s; *p; ++p) { c = *p & 0xff; if (c == '(' || c == ')' || c == '\\') { buf[i++] = '\\'; buf[i++] = c; } else if (c < 0x2...
@@ -898,6 +898,9 @@ void FoFiType1C::convertToType0(char *psName, int *codeMap, int nCodes, } } + if (fd >= nFDs) + continue; + // font dictionary (unencrypted section) (*outputFunc)(outputStream, "16 dict begin\n", 14); (*outputFunc)(outputStream, "/FontName /", 11);
CWE-125
null
null
1,770
FoFiType1C::~FoFiType1C() { int i; if (name) { delete name; } if (encoding && encoding != fofiType1StandardEncoding && encoding != fofiType1ExpertEncoding) { for (i = 0; i < 256; ++i) { gfree(encoding[i]); } gfree(encoding); } if (privateDicts) { gfree(privateDicts); ...
DoS
0
FoFiType1C::~FoFiType1C() { int i; if (name) { delete name; } if (encoding && encoding != fofiType1StandardEncoding && encoding != fofiType1ExpertEncoding) { for (i = 0; i < 256; ++i) { gfree(encoding[i]); } gfree(encoding); } if (privateDicts) { gfree(privateDicts); ...
@@ -898,6 +898,9 @@ void FoFiType1C::convertToType0(char *psName, int *codeMap, int nCodes, } } + if (fd >= nFDs) + continue; + // font dictionary (unencrypted section) (*outputFunc)(outputStream, "16 dict begin\n", 14); (*outputFunc)(outputStream, "/FontName /", 11);
CWE-125
null
null
1,771
static PHP_GINIT_FUNCTION(xml) { xml_globals->default_encoding = "UTF-8"; }
DoS Overflow Mem. Corr.
0
static PHP_GINIT_FUNCTION(xml) { xml_globals->default_encoding = "UTF-8"; }
@@ -427,7 +427,7 @@ static void xml_parser_dtor(zend_rsrc_list_entry *rsrc TSRMLS_DC) } if (parser->ltags) { int inx; - for (inx = 0; inx < parser->level; inx++) + for (inx = 0; ((inx < parser->level) && (inx < XML_MAXLEVEL)); inx++) ef...
CWE-119
null
null
1,772
PHP_MINFO_FUNCTION(xml) { php_info_print_table_start(); php_info_print_table_row(2, "XML Support", "active"); php_info_print_table_row(2, "XML Namespace Support", "active"); #if defined(LIBXML_DOTTED_VERSION) && defined(LIBXML_EXPAT_COMPAT) php_info_print_table_row(2, "libxml2 Version", LIBXML_DOTTED_VERSION); #els...
DoS Overflow Mem. Corr.
0
PHP_MINFO_FUNCTION(xml) { php_info_print_table_start(); php_info_print_table_row(2, "XML Support", "active"); php_info_print_table_row(2, "XML Namespace Support", "active"); #if defined(LIBXML_DOTTED_VERSION) && defined(LIBXML_EXPAT_COMPAT) php_info_print_table_row(2, "libxml2 Version", LIBXML_DOTTED_VERSION); #els...
@@ -427,7 +427,7 @@ static void xml_parser_dtor(zend_rsrc_list_entry *rsrc TSRMLS_DC) } if (parser->ltags) { int inx; - for (inx = 0; inx < parser->level; inx++) + for (inx = 0; ((inx < parser->level) && (inx < XML_MAXLEVEL)); inx++) ef...
CWE-119
null
null
1,773
PHP_MINIT_FUNCTION(xml) { le_xml_parser = zend_register_list_destructors_ex(xml_parser_dtor, NULL, "xml", module_number); REGISTER_LONG_CONSTANT("XML_ERROR_NONE", XML_ERROR_NONE, CONST_CS|CONST_PERSISTENT); REGISTER_LONG_CONSTANT("XML_ERROR_NO_MEMORY", XML_ERROR_NO_MEMORY, CONST_CS|CONST_PERSISTENT); REGISTER_LONG...
DoS Overflow Mem. Corr.
0
PHP_MINIT_FUNCTION(xml) { le_xml_parser = zend_register_list_destructors_ex(xml_parser_dtor, NULL, "xml", module_number); REGISTER_LONG_CONSTANT("XML_ERROR_NONE", XML_ERROR_NONE, CONST_CS|CONST_PERSISTENT); REGISTER_LONG_CONSTANT("XML_ERROR_NO_MEMORY", XML_ERROR_NO_MEMORY, CONST_CS|CONST_PERSISTENT); REGISTER_LONG...
@@ -427,7 +427,7 @@ static void xml_parser_dtor(zend_rsrc_list_entry *rsrc TSRMLS_DC) } if (parser->ltags) { int inx; - for (inx = 0; inx < parser->level; inx++) + for (inx = 0; ((inx < parser->level) && (inx < XML_MAXLEVEL)); inx++) ef...
CWE-119
null
null
1,774
static void _xml_add_to_info(xml_parser *parser,char *name) { zval **element, *values; if (! parser->info) { return; } if (zend_hash_find(Z_ARRVAL_P(parser->info),name,strlen(name) + 1,(void **) &element) == FAILURE) { MAKE_STD_ZVAL(values); array_init(values); zend_hash_update(Z_ARRVAL_P(parser->in...
DoS Overflow Mem. Corr.
0
static void _xml_add_to_info(xml_parser *parser,char *name) { zval **element, *values; if (! parser->info) { return; } if (zend_hash_find(Z_ARRVAL_P(parser->info),name,strlen(name) + 1,(void **) &element) == FAILURE) { MAKE_STD_ZVAL(values); array_init(values); zend_hash_update(Z_ARRVAL_P(parser->in...
@@ -427,7 +427,7 @@ static void xml_parser_dtor(zend_rsrc_list_entry *rsrc TSRMLS_DC) } if (parser->ltags) { int inx; - for (inx = 0; inx < parser->level; inx++) + for (inx = 0; ((inx < parser->level) && (inx < XML_MAXLEVEL)); inx++) ef...
CWE-119
null
null
1,775
static char *_xml_decode_tag(xml_parser *parser, const char *tag) { char *newstr; int out_len; newstr = xml_utf8_decode(tag, strlen(tag), &out_len, parser->target_encoding); if (parser->case_folding) { php_strtoupper(newstr, out_len); } return newstr; }
DoS Overflow Mem. Corr.
0
static char *_xml_decode_tag(xml_parser *parser, const char *tag) { char *newstr; int out_len; newstr = xml_utf8_decode(tag, strlen(tag), &out_len, parser->target_encoding); if (parser->case_folding) { php_strtoupper(newstr, out_len); } return newstr; }
@@ -427,7 +427,7 @@ static void xml_parser_dtor(zend_rsrc_list_entry *rsrc TSRMLS_DC) } if (parser->ltags) { int inx; - for (inx = 0; inx < parser->level; inx++) + for (inx = 0; ((inx < parser->level) && (inx < XML_MAXLEVEL)); inx++) ef...
CWE-119
null
null
1,776
static zval *_xml_resource_zval(long value) { zval *ret; TSRMLS_FETCH(); MAKE_STD_ZVAL(ret); Z_TYPE_P(ret) = IS_RESOURCE; Z_LVAL_P(ret) = value; zend_list_addref(value); return ret; }
DoS Overflow Mem. Corr.
0
static zval *_xml_resource_zval(long value) { zval *ret; TSRMLS_FETCH(); MAKE_STD_ZVAL(ret); Z_TYPE_P(ret) = IS_RESOURCE; Z_LVAL_P(ret) = value; zend_list_addref(value); return ret; }
@@ -427,7 +427,7 @@ static void xml_parser_dtor(zend_rsrc_list_entry *rsrc TSRMLS_DC) } if (parser->ltags) { int inx; - for (inx = 0; inx < parser->level; inx++) + for (inx = 0; ((inx < parser->level) && (inx < XML_MAXLEVEL)); inx++) ef...
CWE-119
null
null
1,777
channel_by_id(int id) { Channel *c; if (id < 0 || (u_int)id >= channels_alloc) { logit("channel_by_id: %d: bad id", id); return NULL; } c = channels[id]; if (c == NULL) { logit("channel_by_id: %d: bad id: channel free", id); return NULL; } return c; }
Bypass
0
channel_by_id(int id) { Channel *c; if (id < 0 || (u_int)id >= channels_alloc) { logit("channel_by_id: %d: bad id", id); return NULL; } c = channels[id]; if (c == NULL) { logit("channel_by_id: %d: bad id: channel free", id); return NULL; } return c; }
@@ -1,4 +1,4 @@ -/* $OpenBSD: channels.c,v 1.346 2015/06/30 05:25:07 djm Exp $ */ +/* $OpenBSD: channels.c,v 1.347 2015/07/01 02:26:31 djm Exp $ */ /* * Author: Tatu Ylonen <ylo@cs.hut.fi> * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland @@ -161,6 +161,9 @@ static char *x11_saved_proto = NULL; sta...
CWE-264
null
null
1,778
channel_cancel_cleanup(int id) { Channel *c = channel_by_id(id); if (c == NULL) { logit("channel_cancel_cleanup: %d: bad id", id); return; } c->detach_user = NULL; c->detach_close = 0; }
Bypass
0
channel_cancel_cleanup(int id) { Channel *c = channel_by_id(id); if (c == NULL) { logit("channel_cancel_cleanup: %d: bad id", id); return; } c->detach_user = NULL; c->detach_close = 0; }
@@ -1,4 +1,4 @@ -/* $OpenBSD: channels.c,v 1.346 2015/06/30 05:25:07 djm Exp $ */ +/* $OpenBSD: channels.c,v 1.347 2015/07/01 02:26:31 djm Exp $ */ /* * Author: Tatu Ylonen <ylo@cs.hut.fi> * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland @@ -161,6 +161,9 @@ static char *x11_saved_proto = NULL; sta...
CWE-264
null
null
1,779
channel_close_all(void) { u_int i; for (i = 0; i < channels_alloc; i++) if (channels[i] != NULL) channel_close_fds(channels[i]); }
Bypass
0
channel_close_all(void) { u_int i; for (i = 0; i < channels_alloc; i++) if (channels[i] != NULL) channel_close_fds(channels[i]); }
@@ -1,4 +1,4 @@ -/* $OpenBSD: channels.c,v 1.346 2015/06/30 05:25:07 djm Exp $ */ +/* $OpenBSD: channels.c,v 1.347 2015/07/01 02:26:31 djm Exp $ */ /* * Author: Tatu Ylonen <ylo@cs.hut.fi> * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland @@ -161,6 +161,9 @@ static char *x11_saved_proto = NULL; sta...
CWE-264
null
null
1,780
channel_close_fd(int *fdp) { int ret = 0, fd = *fdp; if (fd != -1) { ret = close(fd); *fdp = -1; if (fd == channel_max_fd) channel_max_fd = channel_find_maxfd(); } return ret; }
Bypass
0
channel_close_fd(int *fdp) { int ret = 0, fd = *fdp; if (fd != -1) { ret = close(fd); *fdp = -1; if (fd == channel_max_fd) channel_max_fd = channel_find_maxfd(); } return ret; }
@@ -1,4 +1,4 @@ -/* $OpenBSD: channels.c,v 1.346 2015/06/30 05:25:07 djm Exp $ */ +/* $OpenBSD: channels.c,v 1.347 2015/07/01 02:26:31 djm Exp $ */ /* * Author: Tatu Ylonen <ylo@cs.hut.fi> * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland @@ -161,6 +161,9 @@ static char *x11_saved_proto = NULL; sta...
CWE-264
null
null
1,781
channel_close_fds(Channel *c) { channel_close_fd(&c->sock); channel_close_fd(&c->rfd); channel_close_fd(&c->wfd); channel_close_fd(&c->efd); }
Bypass
0
channel_close_fds(Channel *c) { channel_close_fd(&c->sock); channel_close_fd(&c->rfd); channel_close_fd(&c->wfd); channel_close_fd(&c->efd); }
@@ -1,4 +1,4 @@ -/* $OpenBSD: channels.c,v 1.346 2015/06/30 05:25:07 djm Exp $ */ +/* $OpenBSD: channels.c,v 1.347 2015/07/01 02:26:31 djm Exp $ */ /* * Author: Tatu Ylonen <ylo@cs.hut.fi> * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland @@ -161,6 +161,9 @@ static char *x11_saved_proto = NULL; sta...
CWE-264
null
null
1,782
channel_find_maxfd(void) { u_int i; int max = 0; Channel *c; for (i = 0; i < channels_alloc; i++) { c = channels[i]; if (c != NULL) { max = MAX(max, c->rfd); max = MAX(max, c->wfd); max = MAX(max, c->efd); } } return max; }
Bypass
0
channel_find_maxfd(void) { u_int i; int max = 0; Channel *c; for (i = 0; i < channels_alloc; i++) { c = channels[i]; if (c != NULL) { max = MAX(max, c->rfd); max = MAX(max, c->wfd); max = MAX(max, c->efd); } } return max; }
@@ -1,4 +1,4 @@ -/* $OpenBSD: channels.c,v 1.346 2015/06/30 05:25:07 djm Exp $ */ +/* $OpenBSD: channels.c,v 1.347 2015/07/01 02:26:31 djm Exp $ */ /* * Author: Tatu Ylonen <ylo@cs.hut.fi> * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland @@ -161,6 +161,9 @@ static char *x11_saved_proto = NULL; sta...
CWE-264
null
null
1,783
channel_find_open(void) { u_int i; Channel *c; for (i = 0; i < channels_alloc; i++) { c = channels[i]; if (c == NULL || c->remote_id < 0) continue; switch (c->type) { case SSH_CHANNEL_CLOSED: case SSH_CHANNEL_DYNAMIC: case SSH_CHANNEL_X11_LISTENER: case SSH_CHANNEL_PORT_LISTENER: case SSH_CHANNEL...
Bypass
0
channel_find_open(void) { u_int i; Channel *c; for (i = 0; i < channels_alloc; i++) { c = channels[i]; if (c == NULL || c->remote_id < 0) continue; switch (c->type) { case SSH_CHANNEL_CLOSED: case SSH_CHANNEL_DYNAMIC: case SSH_CHANNEL_X11_LISTENER: case SSH_CHANNEL_PORT_LISTENER: case SSH_CHANNEL...
@@ -1,4 +1,4 @@ -/* $OpenBSD: channels.c,v 1.346 2015/06/30 05:25:07 djm Exp $ */ +/* $OpenBSD: channels.c,v 1.347 2015/07/01 02:26:31 djm Exp $ */ /* * Author: Tatu Ylonen <ylo@cs.hut.fi> * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland @@ -161,6 +161,9 @@ static char *x11_saved_proto = NULL; sta...
CWE-264
null
null
1,784
channel_free(Channel *c) { char *s; u_int i, n; struct channel_confirm *cc; for (n = 0, i = 0; i < channels_alloc; i++) if (channels[i]) n++; debug("channel %d: free: %s, nchannels %u", c->self, c->remote_name ? c->remote_name : "???", n); s = channel_open_message(); debug3("channel %d: status: %s", ...
Bypass
0
channel_free(Channel *c) { char *s; u_int i, n; struct channel_confirm *cc; for (n = 0, i = 0; i < channels_alloc; i++) if (channels[i]) n++; debug("channel %d: free: %s, nchannels %u", c->self, c->remote_name ? c->remote_name : "???", n); s = channel_open_message(); debug3("channel %d: status: %s", ...
@@ -1,4 +1,4 @@ -/* $OpenBSD: channels.c,v 1.346 2015/06/30 05:25:07 djm Exp $ */ +/* $OpenBSD: channels.c,v 1.347 2015/07/01 02:26:31 djm Exp $ */ /* * Author: Tatu Ylonen <ylo@cs.hut.fi> * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland @@ -161,6 +161,9 @@ static char *x11_saved_proto = NULL; sta...
CWE-264
null
null
1,785
channel_free_all(void) { u_int i; for (i = 0; i < channels_alloc; i++) if (channels[i] != NULL) channel_free(channels[i]); }
Bypass
0
channel_free_all(void) { u_int i; for (i = 0; i < channels_alloc; i++) if (channels[i] != NULL) channel_free(channels[i]); }
@@ -1,4 +1,4 @@ -/* $OpenBSD: channels.c,v 1.346 2015/06/30 05:25:07 djm Exp $ */ +/* $OpenBSD: channels.c,v 1.347 2015/07/01 02:26:31 djm Exp $ */ /* * Author: Tatu Ylonen <ylo@cs.hut.fi> * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland @@ -161,6 +161,9 @@ static char *x11_saved_proto = NULL; sta...
CWE-264
null
null
1,786
channel_lookup(int id) { Channel *c; if ((c = channel_by_id(id)) == NULL) return (NULL); switch (c->type) { case SSH_CHANNEL_X11_OPEN: case SSH_CHANNEL_LARVAL: case SSH_CHANNEL_CONNECTING: case SSH_CHANNEL_DYNAMIC: case SSH_CHANNEL_OPENING: case SSH_CHANNEL_OPEN: case SSH_CHANNEL_INPUT_DRAINING: case SSH...
Bypass
0
channel_lookup(int id) { Channel *c; if ((c = channel_by_id(id)) == NULL) return (NULL); switch (c->type) { case SSH_CHANNEL_X11_OPEN: case SSH_CHANNEL_LARVAL: case SSH_CHANNEL_CONNECTING: case SSH_CHANNEL_DYNAMIC: case SSH_CHANNEL_OPENING: case SSH_CHANNEL_OPEN: case SSH_CHANNEL_INPUT_DRAINING: case SSH...
@@ -1,4 +1,4 @@ -/* $OpenBSD: channels.c,v 1.346 2015/06/30 05:25:07 djm Exp $ */ +/* $OpenBSD: channels.c,v 1.347 2015/07/01 02:26:31 djm Exp $ */ /* * Author: Tatu Ylonen <ylo@cs.hut.fi> * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland @@ -161,6 +161,9 @@ static char *x11_saved_proto = NULL; sta...
CWE-264
null
null
1,787
channel_open_message(void) { Buffer buffer; Channel *c; char buf[1024], *cp; u_int i; buffer_init(&buffer); snprintf(buf, sizeof buf, "The following connections are open:\r\n"); buffer_append(&buffer, buf, strlen(buf)); for (i = 0; i < channels_alloc; i++) { c = channels[i]; if (c == NULL) continue; s...
Bypass
0
channel_open_message(void) { Buffer buffer; Channel *c; char buf[1024], *cp; u_int i; buffer_init(&buffer); snprintf(buf, sizeof buf, "The following connections are open:\r\n"); buffer_append(&buffer, buf, strlen(buf)); for (i = 0; i < channels_alloc; i++) { c = channels[i]; if (c == NULL) continue; s...
@@ -1,4 +1,4 @@ -/* $OpenBSD: channels.c,v 1.346 2015/06/30 05:25:07 djm Exp $ */ +/* $OpenBSD: channels.c,v 1.347 2015/07/01 02:26:31 djm Exp $ */ /* * Author: Tatu Ylonen <ylo@cs.hut.fi> * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland @@ -161,6 +161,9 @@ static char *x11_saved_proto = NULL; sta...
CWE-264
null
null
1,788
channel_pre_connecting(Channel *c, fd_set *readset, fd_set *writeset) { debug3("channel %d: waiting for connection", c->self); FD_SET(c->sock, writeset); }
Bypass
0
channel_pre_connecting(Channel *c, fd_set *readset, fd_set *writeset) { debug3("channel %d: waiting for connection", c->self); FD_SET(c->sock, writeset); }
@@ -1,4 +1,4 @@ -/* $OpenBSD: channels.c,v 1.346 2015/06/30 05:25:07 djm Exp $ */ +/* $OpenBSD: channels.c,v 1.347 2015/07/01 02:26:31 djm Exp $ */ /* * Author: Tatu Ylonen <ylo@cs.hut.fi> * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland @@ -161,6 +161,9 @@ static char *x11_saved_proto = NULL; sta...
CWE-264
null
null
1,789
channel_pre_input_draining(Channel *c, fd_set *readset, fd_set *writeset) { if (buffer_len(&c->input) == 0) { packet_start(SSH_MSG_CHANNEL_CLOSE); packet_put_int(c->remote_id); packet_send(); c->type = SSH_CHANNEL_CLOSED; debug2("channel %d: closing after input drain.", c->self); } }
Bypass
0
channel_pre_input_draining(Channel *c, fd_set *readset, fd_set *writeset) { if (buffer_len(&c->input) == 0) { packet_start(SSH_MSG_CHANNEL_CLOSE); packet_put_int(c->remote_id); packet_send(); c->type = SSH_CHANNEL_CLOSED; debug2("channel %d: closing after input drain.", c->self); } }
@@ -1,4 +1,4 @@ -/* $OpenBSD: channels.c,v 1.346 2015/06/30 05:25:07 djm Exp $ */ +/* $OpenBSD: channels.c,v 1.347 2015/07/01 02:26:31 djm Exp $ */ /* * Author: Tatu Ylonen <ylo@cs.hut.fi> * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland @@ -161,6 +161,9 @@ static char *x11_saved_proto = NULL; sta...
CWE-264
null
null
1,790
channel_pre_open_13(Channel *c, fd_set *readset, fd_set *writeset) { if (buffer_len(&c->input) < packet_get_maxsize()) FD_SET(c->sock, readset); if (buffer_len(&c->output) > 0) FD_SET(c->sock, writeset); }
Bypass
0
channel_pre_open_13(Channel *c, fd_set *readset, fd_set *writeset) { if (buffer_len(&c->input) < packet_get_maxsize()) FD_SET(c->sock, readset); if (buffer_len(&c->output) > 0) FD_SET(c->sock, writeset); }
@@ -1,4 +1,4 @@ -/* $OpenBSD: channels.c,v 1.346 2015/06/30 05:25:07 djm Exp $ */ +/* $OpenBSD: channels.c,v 1.347 2015/07/01 02:26:31 djm Exp $ */ /* * Author: Tatu Ylonen <ylo@cs.hut.fi> * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland @@ -161,6 +161,9 @@ static char *x11_saved_proto = NULL; sta...
CWE-264
null
null
1,791
channel_pre_output_draining(Channel *c, fd_set *readset, fd_set *writeset) { if (buffer_len(&c->output) == 0) chan_mark_dead(c); else FD_SET(c->sock, writeset); }
Bypass
0
channel_pre_output_draining(Channel *c, fd_set *readset, fd_set *writeset) { if (buffer_len(&c->output) == 0) chan_mark_dead(c); else FD_SET(c->sock, writeset); }
@@ -1,4 +1,4 @@ -/* $OpenBSD: channels.c,v 1.346 2015/06/30 05:25:07 djm Exp $ */ +/* $OpenBSD: channels.c,v 1.347 2015/07/01 02:26:31 djm Exp $ */ /* * Author: Tatu Ylonen <ylo@cs.hut.fi> * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland @@ -161,6 +161,9 @@ static char *x11_saved_proto = NULL; sta...
CWE-264
null
null
1,792
channel_register_fds(Channel *c, int rfd, int wfd, int efd, int extusage, int nonblock, int is_tty) { /* Update the maximum file descriptor value. */ channel_max_fd = MAX(channel_max_fd, rfd); channel_max_fd = MAX(channel_max_fd, wfd); channel_max_fd = MAX(channel_max_fd, efd); if (rfd != -1) fcntl(rfd, F_S...
Bypass
0
channel_register_fds(Channel *c, int rfd, int wfd, int efd, int extusage, int nonblock, int is_tty) { /* Update the maximum file descriptor value. */ channel_max_fd = MAX(channel_max_fd, rfd); channel_max_fd = MAX(channel_max_fd, wfd); channel_max_fd = MAX(channel_max_fd, efd); if (rfd != -1) fcntl(rfd, F_S...
@@ -1,4 +1,4 @@ -/* $OpenBSD: channels.c,v 1.346 2015/06/30 05:25:07 djm Exp $ */ +/* $OpenBSD: channels.c,v 1.347 2015/07/01 02:26:31 djm Exp $ */ /* * Author: Tatu Ylonen <ylo@cs.hut.fi> * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland @@ -161,6 +161,9 @@ static char *x11_saved_proto = NULL; sta...
CWE-264
null
null
1,793
channel_register_filter(int id, channel_infilter_fn *ifn, channel_outfilter_fn *ofn, channel_filter_cleanup_fn *cfn, void *ctx) { Channel *c = channel_lookup(id); if (c == NULL) { logit("channel_register_filter: %d: bad id", id); return; } c->input_filter = ifn; c->output_filter = ofn; c->filter_ctx = ct...
Bypass
0
channel_register_filter(int id, channel_infilter_fn *ifn, channel_outfilter_fn *ofn, channel_filter_cleanup_fn *cfn, void *ctx) { Channel *c = channel_lookup(id); if (c == NULL) { logit("channel_register_filter: %d: bad id", id); return; } c->input_filter = ifn; c->output_filter = ofn; c->filter_ctx = ct...
@@ -1,4 +1,4 @@ -/* $OpenBSD: channels.c,v 1.346 2015/06/30 05:25:07 djm Exp $ */ +/* $OpenBSD: channels.c,v 1.347 2015/07/01 02:26:31 djm Exp $ */ /* * Author: Tatu Ylonen <ylo@cs.hut.fi> * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland @@ -161,6 +161,9 @@ static char *x11_saved_proto = NULL; sta...
CWE-264
null
null
1,794
channel_register_status_confirm(int id, channel_confirm_cb *cb, channel_confirm_abandon_cb *abandon_cb, void *ctx) { struct channel_confirm *cc; Channel *c; if ((c = channel_lookup(id)) == NULL) fatal("channel_register_expect: %d: bad id", id); cc = xcalloc(1, sizeof(*cc)); cc->cb = cb; cc->abandon_cb = a...
Bypass
0
channel_register_status_confirm(int id, channel_confirm_cb *cb, channel_confirm_abandon_cb *abandon_cb, void *ctx) { struct channel_confirm *cc; Channel *c; if ((c = channel_lookup(id)) == NULL) fatal("channel_register_expect: %d: bad id", id); cc = xcalloc(1, sizeof(*cc)); cc->cb = cb; cc->abandon_cb = a...
@@ -1,4 +1,4 @@ -/* $OpenBSD: channels.c,v 1.346 2015/06/30 05:25:07 djm Exp $ */ +/* $OpenBSD: channels.c,v 1.347 2015/07/01 02:26:31 djm Exp $ */ /* * Author: Tatu Ylonen <ylo@cs.hut.fi> * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland @@ -161,6 +161,9 @@ static char *x11_saved_proto = NULL; sta...
CWE-264
null
null
1,795
channel_request_start(int id, char *service, int wantconfirm) { Channel *c = channel_lookup(id); if (c == NULL) { logit("channel_request_start: %d: unknown channel id", id); return; } debug2("channel %d: request %s confirm %d", id, service, wantconfirm); packet_start(SSH2_MSG_CHANNEL_REQUEST); packet_put_int...
Bypass
0
channel_request_start(int id, char *service, int wantconfirm) { Channel *c = channel_lookup(id); if (c == NULL) { logit("channel_request_start: %d: unknown channel id", id); return; } debug2("channel %d: request %s confirm %d", id, service, wantconfirm); packet_start(SSH2_MSG_CHANNEL_REQUEST); packet_put_int...
@@ -1,4 +1,4 @@ -/* $OpenBSD: channels.c,v 1.346 2015/06/30 05:25:07 djm Exp $ */ +/* $OpenBSD: channels.c,v 1.347 2015/07/01 02:26:31 djm Exp $ */ /* * Author: Tatu Ylonen <ylo@cs.hut.fi> * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland @@ -161,6 +161,9 @@ static char *x11_saved_proto = NULL; sta...
CWE-264
null
null
1,796
channel_still_open(void) { u_int i; Channel *c; for (i = 0; i < channels_alloc; i++) { c = channels[i]; if (c == NULL) continue; switch (c->type) { case SSH_CHANNEL_X11_LISTENER: case SSH_CHANNEL_PORT_LISTENER: case SSH_CHANNEL_RPORT_LISTENER: case SSH_CHANNEL_MUX_LISTENER: case SSH_CHANNEL_CLOSE...
Bypass
0
channel_still_open(void) { u_int i; Channel *c; for (i = 0; i < channels_alloc; i++) { c = channels[i]; if (c == NULL) continue; switch (c->type) { case SSH_CHANNEL_X11_LISTENER: case SSH_CHANNEL_PORT_LISTENER: case SSH_CHANNEL_RPORT_LISTENER: case SSH_CHANNEL_MUX_LISTENER: case SSH_CHANNEL_CLOSE...
@@ -1,4 +1,4 @@ -/* $OpenBSD: channels.c,v 1.346 2015/06/30 05:25:07 djm Exp $ */ +/* $OpenBSD: channels.c,v 1.347 2015/07/01 02:26:31 djm Exp $ */ /* * Author: Tatu Ylonen <ylo@cs.hut.fi> * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland @@ -161,6 +161,9 @@ static char *x11_saved_proto = NULL; sta...
CWE-264
null
null
1,797
client_x11_display_valid(const char *display) { size_t i, dlen; dlen = strlen(display); for (i = 0; i < dlen; i++) { if (!isalnum((u_char)display[i]) && strchr(SSH_X11_VALID_DISPLAY_CHARS, display[i]) == NULL) { debug("Invalid character '%c' in DISPLAY", display[i]); return 0; } } return 1; }
Bypass
0
client_x11_display_valid(const char *display) { size_t i, dlen; dlen = strlen(display); for (i = 0; i < dlen; i++) { if (!isalnum((u_char)display[i]) && strchr(SSH_X11_VALID_DISPLAY_CHARS, display[i]) == NULL) { debug("Invalid character '%c' in DISPLAY", display[i]); return 0; } } return 1; }
@@ -1,4 +1,4 @@ -/* $OpenBSD: clientloop.c,v 1.273 2015/05/04 06:10:48 djm Exp $ */ +/* $OpenBSD: clientloop.c,v 1.274 2015/07/01 02:26:31 djm Exp $ */ /* * Author: Tatu Ylonen <ylo@cs.hut.fi> * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland @@ -163,7 +163,7 @@ static int connection_in; /* Connecti...
CWE-264
null
null
1,798
get_current_time(void) { struct timeval tv; gettimeofday(&tv, NULL); return (double) tv.tv_sec + (double) tv.tv_usec / 1000000.0; }
Bypass
0
get_current_time(void) { struct timeval tv; gettimeofday(&tv, NULL); return (double) tv.tv_sec + (double) tv.tv_usec / 1000000.0; }
@@ -1,4 +1,4 @@ -/* $OpenBSD: clientloop.c,v 1.273 2015/05/04 06:10:48 djm Exp $ */ +/* $OpenBSD: clientloop.c,v 1.274 2015/07/01 02:26:31 djm Exp $ */ /* * Author: Tatu Ylonen <ylo@cs.hut.fi> * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland @@ -163,7 +163,7 @@ static int connection_in; /* Connecti...
CWE-264
null
null
1,799
leave_non_blocking(void) { if (in_non_blocking_mode) { unset_nonblock(fileno(stdin)); in_non_blocking_mode = 0; } }
Bypass
0
leave_non_blocking(void) { if (in_non_blocking_mode) { unset_nonblock(fileno(stdin)); in_non_blocking_mode = 0; } }
@@ -1,4 +1,4 @@ -/* $OpenBSD: clientloop.c,v 1.273 2015/05/04 06:10:48 djm Exp $ */ +/* $OpenBSD: clientloop.c,v 1.274 2015/07/01 02:26:31 djm Exp $ */ /* * Author: Tatu Ylonen <ylo@cs.hut.fi> * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland @@ -163,7 +163,7 @@ static int connection_in; /* Connecti...
CWE-264
null
null