philipp / rpms / dhcp

Forked from rpms/dhcp 4 years ago
Clone

Blame SOURCES/dhcp-4.2.5-reference_count_overflow.patch

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