mirror of
https://gitlab.isc.org/isc-projects/dhcp
synced 2025-08-31 06:15:55 +00:00
Add a check for a null pointer before calling the regexec function.
Without out this check we could, under some circumstances, pass a null pointer to the regexec function causing it to segfault. [ISC-Bugs #26704].
This commit is contained in:
8
RELNOTES
8
RELNOTES
@@ -39,6 +39,14 @@ The system has only been tested on Linux, FreeBSD, and Solaris, and may not
|
|||||||
work on other platforms. Please report any problems and suggested fixes to
|
work on other platforms. Please report any problems and suggested fixes to
|
||||||
<dhcp-users@isc.org>.
|
<dhcp-users@isc.org>.
|
||||||
|
|
||||||
|
Changes since 4.2.3
|
||||||
|
|
||||||
|
! Add a check for a null pointer before calling the regexec function.
|
||||||
|
Without out this check we could, under some circumstances, pass
|
||||||
|
a null pointer to the regexec function causing it to segfault.
|
||||||
|
[ISC-Bugs #26704].
|
||||||
|
CVE:
|
||||||
|
|
||||||
Changes since 4.2.2
|
Changes since 4.2.2
|
||||||
|
|
||||||
- Fix the code that checks for an existing DDNS transaction to cancel
|
- Fix the code that checks for an existing DDNS transaction to cancel
|
||||||
|
@@ -1120,6 +1120,7 @@ int evaluate_boolean_expression (result, packet, lease, client_state,
|
|||||||
*result = 0;
|
*result = 0;
|
||||||
memset(&re, 0, sizeof(re));
|
memset(&re, 0, sizeof(re));
|
||||||
if (bleft && bright &&
|
if (bleft && bright &&
|
||||||
|
(left.data != NULL) &&
|
||||||
(regcomp(&re, (char *)right.data, regflags) == 0) &&
|
(regcomp(&re, (char *)right.data, regflags) == 0) &&
|
||||||
(regexec(&re, (char *)left.data, (size_t)0, NULL, 0) == 0))
|
(regexec(&re, (char *)left.data, (size_t)0, NULL, 0) == 0))
|
||||||
*result = 1;
|
*result = 1;
|
||||||
|
Reference in New Issue
Block a user