dhcp/SOURCES/dhcp-CVE-2022-2929.patch
2023-05-17 01:17:42 +00:00

26 lines
690 B
Diff

diff --git a/common/options.c b/common/options.c
index addc65a..3e6383a 100644
--- a/common/options.c
+++ b/common/options.c
@@ -435,16 +435,16 @@ int fqdn_universe_decode (struct option_state *options,
while (s < &bp -> data[0] + length + 2) {
len = *s;
if (len > 63) {
- log_info ("fancy bits in fqdn option");
- return 0;
+ log_info ("label length exceeds 63 in fqdn option");
+ goto bad;
}
if (len == 0) {
terminated = 1;
break;
}
if (s + len > &bp -> data [0] + length + 3) {
- log_info ("fqdn tag longer than buffer");
- return 0;
+ log_info ("fqdn label longer than buffer");
+ goto bad;
}
if (first_len == 0) {