Null terminate binary data reading.

pull/1480/head
Roger Light 6 years ago
parent ad5c2e11d9
commit a65aef9232

@ -1023,7 +1023,7 @@ const mosquitto_property *mosquitto_property_read_binary(const mosquitto_propert
if(value){
*len = p->value.bin.len;
*value = malloc(*len);
*value = calloc(1, *len + 1);
if(!(*value)) return NULL;
memcpy(*value, p->value.bin.v, *len);

Loading…
Cancel
Save