Skip to content

Commit

Permalink
Fix signedness comparison warning.
Browse files Browse the repository at this point in the history
  • Loading branch information
ni4 committed Jan 29, 2025
1 parent ce42e61 commit 9af62ce
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/librepgp/stream-packet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1149,7 +1149,7 @@ pgp_pk_sesskey_t::parse(pgp_source_t &src)
return RNP_ERROR_BAD_FORMAT;
}
fp.length = fp_len;
if (fp.length && (fp.length != fp_and_key_ver_len - 1)) {
if (fp.length && (fp.length + 1 != fp_and_key_ver_len)) {
RNP_LOG("size mismatch (fingerprint size and fp+key version length field)");
return RNP_ERROR_BAD_FORMAT;
}
Expand Down

0 comments on commit 9af62ce

Please sign in to comment.