Skip to content

Commit 8a61ba3

Browse files
committed
Revert "Fix for CVE-2018-13441 null pointer dereference (#553)"
This reverts commit c399086.
1 parent 91787e2 commit 8a61ba3

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

Changelog

-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ Nagios Core 4 Change Log
77
* Fix for duplicate comments on reload (#549) (Bryan Heden)
88
* Fix for check_interval/retry_interval bug (Scott Wilkerson)
99
* Fix passive checks sending recovery email when host was previously up (Scott Wilkerson)
10-
* Fix for CVE-2018-13441 null pointer dereference (Trevor McDonald)
1110

1211
4.4.1 - 2018-06-25
1312
------------------

base/query-handler.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ static int qh_echo(int sd, char *buf, unsigned int len)
2626
{
2727
int result = 0;
2828

29-
if (buf == NULL || !strcmp(buf, "help")) {
29+
if (!strcmp(buf, "help")) {
3030

3131
nsock_printf_nul(sd,
3232
"Query handler that simply echoes back what you send it.");
@@ -371,7 +371,7 @@ static int qh_help(int sd, char *buf, unsigned int len)
371371
{
372372
struct query_handler *qh = NULL;
373373

374-
if (buf == NULL || !strcmp(buf, "help")) {
374+
if (!*buf || !strcmp(buf, "help")) {
375375
nsock_printf_nul(sd,
376376
" help <name> show help for handler <name>\n"
377377
" help list list registered handlers\n");
@@ -405,7 +405,7 @@ static int qh_core(int sd, char *buf, unsigned int len)
405405
{
406406
char *space;
407407

408-
if (buf == NULL || !strcmp(buf, "help")) {
408+
if (*buf == 0 || !strcmp(buf, "help")) {
409409

410410
nsock_printf_nul(sd,
411411
"Query handler for manipulating nagios core.\n"

0 commit comments

Comments
 (0)