Skip to content

Commit

Permalink
deps: fix sign-compare warning in ncrypto
Browse files Browse the repository at this point in the history
PR-URL: #54624
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
  • Loading branch information
zcbenz authored and aduh95 committed Sep 12, 2024
1 parent fdb6511 commit 6a32645
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion deps/ncrypto/ncrypto.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1194,7 +1194,7 @@ DataPointer DHPointer::computeSecret(const BignumPointer& peer) const {

// The size of the computed key can be smaller than the size of the DH key.
// We want to make sure that the key is correctly padded.
if (size < dp.size()) {
if (static_cast<size_t>(size) < dp.size()) {
const size_t padding = dp.size() - size;
uint8_t* data = static_cast<uint8_t*>(dp.get());
memmove(data + padding, data, size);
Expand Down

0 comments on commit 6a32645

Please sign in to comment.