From: Shawn Routhier Date: Thu, 25 Aug 2016 17:54:39 +0000 (-0700) Subject: [v4_1_esv] Clean up some memory references X-Git-Tag: v4_1_esv_r14b1~4 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=403d29f0189c88373b6980342ed710e5a1d75e28;p=thirdparty%2Fdhcp.git [v4_1_esv] Clean up some memory references Squashed commit of the following: commit c3e88212ff666701b5aca3cbc96b557fa37aa682 Author: Shawn Routhier Date: Wed Aug 24 11:33:31 2016 -0700 [rt42984] Clean up some memory references Conflicts: RELNOTES --- diff --git a/RELNOTES b/RELNOTES index d66547cb9..e906101dc 100644 --- a/RELNOTES +++ b/RELNOTES @@ -110,6 +110,9 @@ by Eric Young (eay@cryptsoft.com). interfaces will only accept and forward BOOTP requests. [ISC-Bugs #41547] +- Clean up some memory references in the vendor-class construct. + [ISC-Bugs #42984] + Changes since 4.1-ESV-R13b1 - None diff --git a/server/confpars.c b/server/confpars.c index 894764e25..56811612b 100644 --- a/server/confpars.c +++ b/server/confpars.c @@ -2131,7 +2131,9 @@ int parse_class_declaration (cp, cfile, group, type) data.data = &data.buffer -> data [0]; data.terminated = 1; - tname = type ? "implicit-vendor-class" : "implicit-user-class"; + tname = (type == CLASS_TYPE_VENDOR) ? + "implicit-vendor-class" : "implicit-user-class"; + } else if (type == CLASS_TYPE_CLASS) { tname = val; } else { @@ -2142,7 +2144,7 @@ int parse_class_declaration (cp, cfile, group, type) name = dmalloc (strlen (tname) + 1, MDL); if (!name) log_fatal ("No memory for class name %s.", tname); - strcpy (name, val); + strcpy (name, tname); } else name = (char *)0;