Commit f90f3082 authored by Libor Peltan's avatar Libor Peltan Committed by Daniel Salzman

dnssec: fix binary comparison if the size is zero

parent 7ebffc70
......@@ -125,8 +125,8 @@ int dnssec_binary_cmp(const dnssec_binary_t *one, const dnssec_binary_t *two)
return 0;
}
uint8_t *data_one = one ? one->data : NULL;
uint8_t *data_two = two ? two->data : NULL;
uint8_t *data_one = one && one->size > 0 ? one->data : NULL;
uint8_t *data_two = two && two->size > 0 ? two->data : NULL;
if (data_one == data_two) {
return 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment