[PATCH ulogd2 v2 v2 01/34] ulogd: fix parse-error check

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



If `config_parse_file` returns `-ERRTOOLONG`, `config_errce` may
be NULL.  However, the calling function was checking whether
`config_errce->key` was NULL instead.

Signed-off-by: Jeremy Sowden <jeremy@xxxxxxxxxx>
---
 src/ulogd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/ulogd.c b/src/ulogd.c
index b02f2602a895..8ea9793ec0fb 100644
--- a/src/ulogd.c
+++ b/src/ulogd.c
@@ -1134,7 +1134,7 @@ static int parse_conffile(const char *section, struct config_keyset *ce)
 				"section \"%s\" not found\n", section);
 			break;
 		case -ERRTOOLONG:
-			if (config_errce->key)
+			if (config_errce)
 				ulogd_log(ULOGD_ERROR,
 					  "string value too long for key \"%s\"\n",
 					  config_errce->key);
-- 
2.35.1




[Index of Archives]     [Netfitler Users]     [Berkeley Packet Filter]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux