From 97742499009a1937504b9558a781affcefd81dd2 Mon Sep 17 00:00:00 2001 From: Gerardo O Date: Wed, 24 Nov 2021 17:36:39 -0600 Subject: [PATCH] Fixed buffer overflow caused by an excessive number of invalid requests with multiple logs. --- src/gstorage.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gstorage.c b/src/gstorage.c index 19e78b6099..3cc44e9544 100644 --- a/src/gstorage.c +++ b/src/gstorage.c @@ -551,7 +551,7 @@ count_invalid (GLog * glog, const char *line) { LOG_INVALID (("%s", line)); } - if (glog->items->errstr && glog->invalid < MAX_LOG_ERRORS) { + if (glog->items->errstr && glog->log_erridx < MAX_LOG_ERRORS) { glog->errors[glog->log_erridx++] = xstrdup (glog->items->errstr); } }