summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Synacek <jsynacek@redhat.com>2019-07-31 09:13:41 +0200
committerThe Plumber <50238977+systemd-rhel-bot@users.noreply.github.com>2019-08-07 14:20:46 +0200
commitebe93460ef5ae3744c4b627361f4dc5815cffc13 (patch)
treee1664dc1a0e61b77276d95a4c269a0a996bea0a6
parenta0c135f7771dbe3a6cd3da2aaa106900be0f4470 (diff)
downloadsystemd-ebe93460ef5ae3744c4b627361f4dc5815cffc13.tar.gz
analyze-security: fix potential division by zerov239-18v239-17
Upstream PR: https://github.com/systemd/systemd/pull/13238 Resolves: #1734400
-rw-r--r--src/analyze/analyze-security.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/analyze/analyze-security.c b/src/analyze/analyze-security.c
index 541fc0d97a..eec040d5c3 100644
--- a/src/analyze/analyze-security.c
+++ b/src/analyze/analyze-security.c
@@ -1494,6 +1494,8 @@ static int assess(const struct security_info *info, Table *overview_table, Analy
}
}
+ assert(weight_sum > 0);
+
if (details_table) {
size_t row;