Closed
Bug 528741
Opened 15 years ago
Closed 15 years ago
pkix_hash throws a null-argument exception on empty strings
Categories
(NSS :: Libraries, defect, P1)
Tracking
(Not tracked)
RESOLVED
FIXED
3.12.6
People
(Reporter: wtc, Assigned: wtc)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
(deleted),
patch
|
alvolkov.bgs
:
review+
|
Details | Diff | Splinter Review |
In libpkix, an empty string is represented by a NULL buffer pointer and a 0 buffer length. When libpkix hashes an empty string object, it throws a null-argument exception because of a PKIX_NULLCHECK_TWO macro in pkix_hash that null-checks the 'bytes' buffer pointer even when 'length' is 0. The fix is to null-check the 'bytes' buffer pointer only when 'length' is nonzero.
Attachment #412415 -
Flags: review?(alexei.volkov.bugs)
Assignee | ||
Comment 1•15 years ago
|
||
Comment on attachment 412415 [details] [diff] [review] Proposed patch Nelson, could you review this simple patch? Is Alexei out of the office? Thanks.
Attachment #412415 -
Flags: superreview?(nelson)
Assignee | ||
Comment 3•15 years ago
|
||
I checked in the patch on the NSS trunk (NSS 3.12.6). Checking in pkix_tools.c; /cvsroot/mozilla/security/nss/lib/libpkix/pkix/util/pkix_tools.c,v <-- pkix_tools.c new revision: 1.19; previous revision: 1.18 done
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Comment 4•15 years ago
|
||
Comment on attachment 412415 [details] [diff] [review] Proposed patch thx, Wan-teh, for fixing it.
Attachment #412415 -
Flags: review?(alexei.volkov.bugs) → review+
Updated•15 years ago
|
Attachment #412415 -
Flags: superreview?(nelson)
Updated•15 years ago
|
Priority: -- → P1
Version: unspecified → 3.12
You need to log in
before you can comment on or make changes to this bug.
Description
•