Skip to content

Commit 7a9264c

Browse files
ni4ronaldtse
authored andcommitted
Fix CID #1610086: unchecked return
1 parent 5636656 commit 7a9264c

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/rnp/fficli.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2022,8 +2022,7 @@ cli_rnp_t::keys_matching(std::vector<rnp_key_handle_t> & keys,
20222022
ERR_MSG("No userid or default key for operation");
20232023
return false;
20242024
}
2025-
keys_matching(keys, defkey(), flags & ~CLI_SEARCH_DEFAULT);
2026-
if (keys.empty()) {
2025+
if (!keys_matching(keys, defkey(), flags & ~CLI_SEARCH_DEFAULT) || keys.empty()) {
20272026
ERR_MSG("Default key not found");
20282027
}
20292028
}

0 commit comments

Comments
 (0)