philipp / rpms / dhcp

Forked from rpms/dhcp 4 years ago
Clone

Blame SOURCES/dhcp-4.2.5-reference_count_overflow.patch

a85ba1
diff --git a/common/options.c b/common/options.c
a85ba1
index 83e0384..a58c5fc 100644
a85ba1
--- a/common/options.c
a85ba1
+++ b/common/options.c
a85ba1
@@ -189,6 +189,8 @@ int parse_option_buffer (options, buffer, length, universe)
a85ba1
 
a85ba1
 		/* If the length is outrageous, the options are bad. */
a85ba1
 		if (offset + len > length) {
a85ba1
+			/* Avoid reference count overflow */
a85ba1
+			option_dereference(&option, MDL);
a85ba1
 			reason = "option length exceeds option buffer length";
a85ba1
 		      bogus:
a85ba1
 			log_error("parse_option_buffer: malformed option "