Closed Bug 507371 Opened 12 years ago Closed 11 years ago

useless null check of hashBuf in ssl3_ComputeECDHKeyHash

Categories

(NSS :: Libraries, defect, P5)

defect

Tracking

(Not tracked)

RESOLVED FIXED
3.12.7

People

(Reporter: timeless, Assigned: timeless)

References

()

Details

(Keywords: coverity)

Attachments

(1 file)

247 ssl3_ComputeECDHKeyHash(SECItem ec_params, SECItem server_ecpoint,

265         hashBuf = buf;

267         hashBuf = PORT_Alloc(bufLen);
268         if (!hashBuf) {
269             return SECFailure;

273     memcpy(hashBuf, client_rand, SSL3_RANDOM_LENGTH); 
291     if (hashBuf != buf && hashBuf != NULL)
Severity: enhancement → trivial
Priority: -- → P5
Attached patch patchSplinter Review
Assignee: nobody → timeless
Status: NEW → ASSIGNED
Attachment #391586 - Flags: review?(nelson)
Comment on attachment 391586 [details] [diff] [review]
patch

I have no objection to this change because the test being removed is redundant.  PORT_Free will also check it.
Attachment #391586 - Flags: review?(nelson) → review+
Checking in lib/ssl/ssl3ecc.c; new revision: 1.24; previous revision: 1.23
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → 3.12.7
Version: unspecified → trunk
You need to log in before you can comment on or make changes to this bug.