Skip to content

Commit

Permalink
fix some warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
TJ-91 committed Sep 20, 2024
1 parent 47fee37 commit 34377ba
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/librepgp/stream-packet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1134,7 +1134,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 != (unsigned)(fp_and_key_ver_len - 1))) {
RNP_LOG("size mismatch (fingerprint size and fp+key version length field)");
return RNP_ERROR_BAD_FORMAT;
}
Expand Down Expand Up @@ -1245,7 +1245,7 @@ pgp_pk_sesskey_t::parse_material(pgp_encrypted_material_t &material)
if ((version == PGP_PKSK_V3) && !do_encrypt_pkesk_v3_alg_id(alg)) {
if (!pkt.get(bt)) {
RNP_LOG("failed to get salg");
return RNP_ERROR_BAD_FORMAT;
return false;
}
enc_sesskey_len -= 1;
salg = (pgp_symm_alg_t) bt;
Expand Down Expand Up @@ -1286,7 +1286,7 @@ pgp_pk_sesskey_t::parse_material(pgp_encrypted_material_t &material)
if ((version == PGP_PKSK_V3) && !do_encrypt_pkesk_v3_alg_id(alg)) {
if (!pkt.get(bt)) {
RNP_LOG("failed to get salg");
return RNP_ERROR_BAD_FORMAT;
return false;
}
salg = (pgp_symm_alg_t) bt;
wrapped_key_len--;
Expand Down

0 comments on commit 34377ba

Please sign in to comment.