Skip to content

Commit

Permalink
Merge branch 'ax_port_read-overflow'
Browse files Browse the repository at this point in the history
  • Loading branch information
timhawes committed May 2, 2020
2 parents c7c4d95 + ea8e476 commit cd3d827
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/tcp_axtls.c
Original file line number Diff line number Diff line change
Expand Up @@ -587,7 +587,7 @@ int ax_port_read(int fd, uint8_t *data, int len) {
return 0;
}

read_buf =(uint8_t*)calloc(fd_data->tcp_pbuf->len + 1, sizeof(uint8_t));
read_buf =(uint8_t*)calloc(len, sizeof(uint8_t));
pread_buf = read_buf;
if (pread_buf != NULL){
recv_len = pbuf_copy_partial(fd_data->tcp_pbuf, read_buf, len, fd_data->pbuf_offset);
Expand Down

0 comments on commit cd3d827

Please sign in to comment.