Closed
Bug 189545
Opened 22 years ago
Closed 22 years ago
pk11_Finalize may fail if 'count' is larger than 256
Categories
(NSS :: Libraries, defect)
Tracking
(Not tracked)
RESOLVED
DUPLICATE
of bug 189345
People
(Reporter: wtc, Assigned: wtc)
Details
Attachments
(1 file, 1 obsolete file)
992 bytes,
patch
|
Details | Diff | Splinter Review |
In lib/pk11wrap/pk11skey.c, function pk11_Finalize, there is a stack buffer 'char stackBuf[256]' that is passed to the various C_XxxFinal functions. But we simply fail if the 'count' returned by the first C_XxxFinal call (with a NULL buffer) is larger than 256. We should allocate a buffer if 'count' is > 256.
Assignee | ||
Comment 1•22 years ago
|
||
I am relying on the fact that passing a NULL to PORT_Free is a no-op. If you don't like that, I can change it to: if (buffer != NULL && buffer != stackBuf) { PORT_Free(buffer); }
Assignee | ||
Comment 2•22 years ago
|
||
Sorry, the previous patch contains some other changes that don't pertain to this bug.
Attachment #111881 -
Attachment is obsolete: true
Assignee | ||
Comment 3•22 years ago
|
||
I decided to just fix this problem as part of bug 189345. *** This bug has been marked as a duplicate of 189345 ***
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•