Skip to content

Commit

Permalink
fix out of bounds array access
Browse files Browse the repository at this point in the history
  • Loading branch information
joelreymont committed May 15, 2011
1 parent 523c35f commit 0fe7417
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/poll.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ CAMLprim value caml_zmq_poll_of_pollitem_array(value pollitem_array) {
caml_zmq_raise_if(items == NULL);
int i;
for(i = 0; i < n; i++) {
current_elem = Field(pollitem_array, n);
current_elem = Field(pollitem_array, i);
items[i].socket = CAML_ZMQ_Socket_val(Field(current_elem, 0));
items[i].events = CAML_ZMQ_Mask_val(Field(current_elem, 1));
}
Expand Down

0 comments on commit 0fe7417

Please sign in to comment.