parent
f7d79d83df
commit
04d59146e3
@ -0,0 +1,32 @@
|
|||||||
|
diff --git a/common/options.c b/common/options.c
|
||||||
|
index a53484e..40238f7 100644
|
||||||
|
--- a/common/options.c
|
||||||
|
+++ b/common/options.c
|
||||||
|
@@ -4499,6 +4499,8 @@ add_option(struct option_state *options,
|
||||||
|
if (!option_cache_allocate(&oc, MDL)) {
|
||||||
|
log_error("No memory for option cache adding %s (option %d).",
|
||||||
|
option->name, option_num);
|
||||||
|
+ /* Get rid of reference created during hash lookup. */
|
||||||
|
+ option_dereference(&option, MDL);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -4510,6 +4512,8 @@ add_option(struct option_state *options,
|
||||||
|
MDL)) {
|
||||||
|
log_error("No memory for constant data adding %s (option %d).",
|
||||||
|
option->name, option_num);
|
||||||
|
+ /* Get rid of reference created during hash lookup. */
|
||||||
|
+ option_dereference(&option, MDL);
|
||||||
|
option_cache_dereference(&oc, MDL);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
@@ -4518,6 +4522,9 @@ add_option(struct option_state *options,
|
||||||
|
save_option(&dhcp_universe, options, oc);
|
||||||
|
option_cache_dereference(&oc, MDL);
|
||||||
|
|
||||||
|
+ /* Get rid of reference created during hash lookup. */
|
||||||
|
+ option_dereference(&option, MDL);
|
||||||
|
+
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,25 @@
|
|||||||
|
diff --git a/common/options.c b/common/options.c
|
||||||
|
index 40238f7..11b1961 100644
|
||||||
|
--- a/common/options.c
|
||||||
|
+++ b/common/options.c
|
||||||
|
@@ -454,16 +454,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) {
|
@ -0,0 +1,3 @@
|
|||||||
|
#Type Name ID GECOS Home directory Shell
|
||||||
|
g dhcpd 177
|
||||||
|
u dhcpd 177 "DHCP server" / /sbin/nologin
|
Loading…
Reference in new issue