Closed
Bug 1223316
Opened 9 years ago
Closed 9 years ago
[CID 1242519] Position of arguments to nssCKFWSession_SetPIN don't match
Categories
(NSS :: Libraries, defect)
NSS
Libraries
Tracking
(firefox45 affected)
RESOLVED
FIXED
3.22
Tracking | Status | |
---|---|---|
firefox45 | --- | affected |
People
(Reporter: franziskus, Assigned: franziskus)
References
(Blocks 1 open bug)
Details
(Keywords: coverity)
Attachments
(1 file)
1.23 KB,
patch
|
mt
:
review+
|
Details | Diff | Splinter Review |
In wrap.c we call > nssCKFWSession_SetPIN(fwSession, oldArg, newArg); in NSSCKFWC_SetPIN. But nssCKFWSession_SetPIN is defined as > nssCKFWSession_SetPIN(NSSCKFWSession *fwSession, NSSItem *newPin, NSSItem *oldPin) This looks wrong to Coverity (and me).
Comment 1•9 years ago
|
||
It looks like they're reversed again when calling the SetPIN method; the type is: CK_RV (PR_CALLBACK *SetPIN)( // (first 6 args removed for clarity) NSSItem *oldPin, NSSItem *newPin ); But the call in nssCKFWSession_SetPIN is: error = fwSession->mdSession->SetPIN(/* ... */, newPin, oldPin);
Assignee | ||
Comment 2•9 years ago
|
||
right, so it works, but the variable names make no sense :) I think we should rename the arguments in nssCKFWSession_SetPIN then to (NSSCKFWSession *fwSession, NSSItem *oldPin, NSSItem *newPin).
Assignee | ||
Comment 3•9 years ago
|
||
This is not actually a bug, but we should use proper variable names here to not confuse people (and coverity).
Assignee: nobody → franziskuskiefer
Attachment #8685855 -
Flags: review?(martin.thomson)
Comment 4•9 years ago
|
||
Comment on attachment 8685855 [details] [diff] [review] renaming arguments Review of attachment 8685855 [details] [diff] [review]: ----------------------------------------------------------------- I checked the functions either side of this and the old/new arguments are the other way around. This seems to be correct.
Attachment #8685855 -
Flags: review?(martin.thomson) → review+
Comment 5•9 years ago
|
||
https://hg.mozilla.org/projects/nss/rev/4c2e358644e1
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → 3.22
You need to log in
before you can comment on or make changes to this bug.
Description
•