ssahani / rpms / dhcp

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