Closed Bug 975056 Opened 9 years ago Closed 9 years ago

[capi] fix check for NULL ptr lack in nss_ckcapi_CreatePrivateKey()

Categories

(NSS :: Libraries, defect, P2)

x86_64
Windows 7
defect

Tracking

(Not tracked)

RESOLVED FIXED
3.16.1

People

(Reporter: maksqwe1, Assigned: elio.maldonado.batiz)

Details

Attachments

(2 files)

Attached patch null_ptr.patchSplinter Review
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:27.0) Gecko/20100101 Firefox/27.0 (Beta/Release)
Build ID: 20140212131424

Steps to reproduce:

.\security\nss\lib\ckfw\capi\cobject.c -- 2160

  providerName = ckcapi_getDefaultProvider(pError);
  if ((char *)NULL == providerName ) { // << ========
    return (ckcapiInternalObject *)NULL;
  }
  containerName = ckcapi_getContainer(pError, &keyID);
  if ((char *)NULL == providerName ) { // << ========
OS: All → Windows 7
Hardware: All → x86_64
Attachment #8379179 - Flags: review?(emaldona)
Comment on attachment 8379179 [details] [diff] [review]
null_ptr.patch

Review of attachment 8379179 [details] [diff] [review]:
-----------------------------------------------------------------

Thank you Maks for the patch. r+ in general. You must have done it on the mozilla central source tree judging for the security path so it doesn't apply cleanly on the NSS tree. I'll attach a modified version of your patch that's easier to apply.
Attachment #8379179 - Flags: review?(emaldona) → review+
Status: UNCONFIRMED → NEW
Ever confirmed: true
Attachment #8392962 - Flags: review?(rrelyea)
Assignee: nobody → emaldona
Comment on attachment 8392962 [details] [diff] [review]
Maks Naumov's patch modified for the NSS source tree

r+ rrelyea
Attachment #8392962 - Flags: review?(rrelyea) → review+
Patch checked in: http://hg.mozilla.org/projects/nss/rev/a0115aed4a14
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Priority: -- → P2
Target Milestone: --- → 3.16.1
You need to log in before you can comment on or make changes to this bug.