2
0
mirror of https://gitlab.isc.org/isc-projects/dhcp synced 2025-08-30 13:57:50 +00:00

[master] Fixed an unchecked strdup in confpars.c

Merged in 40823.
This commit is contained in:
Thomas Markwalder
2015-10-12 07:10:24 -04:00
parent e82906fc71
commit e8e6768a62
2 changed files with 11 additions and 3 deletions

View File

@@ -70,10 +70,12 @@ by Eric Young (eay@cryptsoft.com).
and its ATF unit tests when failover is disabled. and its ATF unit tests when failover is disabled.
[ISC-Bugs #40372] [ISC-Bugs #40372]
- Fixed several potential null references. Thanks to Bill Parker - Fixed several issues static analysis issues such as potential null
(wp02855 at gmail dot com) who identified these issues and supplied references, unchecked strdup returns. Thanks to Bill Parker (wp02855 at
patches to address them. gmail dot com) who identified these issues and supplied patches to
address them.
[ISC-Bugs #40754] [ISC-Bugs #40754]
[ISC-Bugs #40823]
- The linux packet filter code now correctly treats only least significant - The linux packet filter code now correctly treats only least significant
12 bits an inbound packet's TCI value as the VLAN id (per IEEE 802.1Q). 12 bits an inbound packet's TCI value as the VLAN id (per IEEE 802.1Q).

View File

@@ -2687,7 +2687,13 @@ void parse_subnet_declaration (cfile, share)
if (host_addr (subnet -> net, subnet -> netmask)) { if (host_addr (subnet -> net, subnet -> netmask)) {
char *maskstr; char *maskstr;
/* dup it, since piaddr is re-entrant */
maskstr = strdup (piaddr (subnet -> netmask)); maskstr = strdup (piaddr (subnet -> netmask));
if (maskstr == NULL) {
log_fatal("Allocation of subnet maskstr failed: %s",
piaddr (subnet -> net));
}
parse_warn (cfile, parse_warn (cfile,
"subnet %s netmask %s: bad subnet number/mask combination.", "subnet %s netmask %s: bad subnet number/mask combination.",
piaddr (subnet -> net), maskstr); piaddr (subnet -> net), maskstr);