From 13cb6a6477344ab7cd79da158ab27f6f30b50cc4 Mon Sep 17 00:00:00 2001 From: Colin Ian King Date: Thu, 3 Apr 2014 18:36:55 +0100 Subject: [PATCH] microhttpd-util: set ourlevel to LOG_DEBUG when outside of log_level_map range If level is outside the log_level_map array ourlevel is not assigned and log_meta is logging with a garbage value on the stack. Assign loglevel to LOG_MAP and not level. Signed-off-by: Colin Ian King --- src/journal/microhttpd-util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/journal/microhttpd-util.c b/src/journal/microhttpd-util.c index f693e0f..9a8d5c6 100644 --- a/src/journal/microhttpd-util.c +++ b/src/journal/microhttpd-util.c @@ -129,7 +129,7 @@ void log_func_gnutls(int level, const char *message) { if (0 <= level && level < (int) ELEMENTSOF(log_level_map)) ourlevel = log_level_map[level]; else - level = LOG_DEBUG; + ourlevel = LOG_DEBUG; log_meta(ourlevel, NULL, 0, NULL, "gnutls: %s", message); } -- 1.9.1