same to #14
ad
may be NULL, but it is not checked.
|
uint8_t* ad = (uint8_t*)malloc(mac_len); |
when ad
is NULL, the content of origin
will be copied outside enclave
|
memcpy(&ad[4], origin.c_str(), origin.length()); |
oName
will be leaked.
same problem:
|
uint8_t* ad = (uint8_t*)malloc(mac_len); |
|
memcpy(&ad[4], origin.c_str(), origin.length()); |
|
data = (char*) malloc(sizeof(char) * w * h * 4); |
|
rgb_to_rgba(data, rgb_array, w*h*sizeof(char)); |
ii
may be NULL.
|
ii = (inquiry_info*)malloc(max_rsp * sizeof(inquiry_info)); |
|
num_rsp = hci_inquiry(dev_id, len, max_rsp, NULL, &ii, flags); |