summaryrefslogtreecommitdiff
path: root/plugin
diff options
context:
space:
mode:
Diffstat (limited to 'plugin')
-rw-r--r--plugin/file_key_management/parser.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugin/file_key_management/parser.cc b/plugin/file_key_management/parser.cc
index 28cd981df79..628412bc171 100644
--- a/plugin/file_key_management/parser.cc
+++ b/plugin/file_key_management/parser.cc
@@ -220,7 +220,7 @@ bool Parser::parse_file(Dynamic_array<keyentry> *keys, const char *secret)
keys->sort(sort_keys);
my_free(buffer);
- if (keys->at(0).id != 1)
+ if (keys->elements() == 0 || keys->at(0).id != 1)
{
report_error("System key id 1 is missing", 0);
return 1;