Skip to content

Commit 8f19188

Browse files
committed
Detect duplicate keys
1 parent 6cd8a3b commit 8f19188

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/generic/svcb.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -598,7 +598,7 @@ static int32_t parse_mandatory(
598598
while (octets < rdata->octets) {
599599
memcpy(&smaller_key, octets, sizeof(smaller_key));
600600
smaller_key = be16toh(smaller_key);
601-
if (key < smaller_key)
601+
if (key <= smaller_key)
602602
break;
603603
octets += 2;
604604
}
@@ -692,7 +692,7 @@ static int32_t parse_mandatory_lax(
692692
while (octets < rdata->octets) {
693693
memcpy(&smaller_key, octets, sizeof(smaller_key));
694694
smaller_key = be16toh(smaller_key);
695-
if (key < smaller_key)
695+
if (key <= smaller_key)
696696
break;
697697
octets += 2;
698698
}

0 commit comments

Comments
 (0)