Closed Bug 1407560 Opened 7 years ago Closed 7 years ago

[CID 1419486] signed/unsigned conversion error in pk11 signature test

Categories

(NSS :: Test, enhancement)

enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: mt, Assigned: mt)

Details

Attachments

(1 file)

*** CID 1419486:  Integer handling issues  (NEGATIVE_RETURNS)
/gtests/pk11_gtest/pk11_signature_test.h: 77 in nss_test::Pk11SignatureTest::SignHashedData(std::unique_ptr<SECKEYPrivateKeyStr, ScopedMaybeDelete<SECKEYPrivateKeyStr>> &, const nss_test::DataBuffer &, nss_test::DataBuffer *)()
>>>     CID 1419486:  Integer handling issues  (NEGATIVE_RETURNS)
>>>     "static_cast<size_t>(PK11_SignatureLen(privKey->get()))" is passed to a parameter that cannot be negative.
77         sig->Allocate(static_cast<size_t>(PK11_SignatureLen(privKey.get())));
Comment on attachment 8917292 [details]
Bug 1407560 - Tweak integer handling for CID 1419486, r=ttaubert

Tim Taubert [:ttaubert] has approved the revision.

https://phabricator.services.mozilla.com/D110#2495
Attachment #8917292 - Flags: review+
https://hg.mozilla.org/projects/nss/rev/0b6c9cf9486f32842dce2c3cdf4e1d8981335619
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → 3.34
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: