Closed
Bug 436428
Opened 16 years ago
Closed 16 years ago
remove unneeded assert from sec_PKCS7EncryptLength
Categories
(NSS :: Libraries, defect, P2)
NSS
Libraries
Tracking
(Not tracked)
RESOLVED
FIXED
3.12.1
People
(Reporter: Dolske, Assigned: Dolske)
References
Details
Attachments
(1 file)
823 bytes,
patch
|
nelson
:
review+
|
Details | Diff | Splinter Review |
http://mxr.mozilla.org/seamonkey/source/security/nss/lib/pkcs7/p7local.c#588 This function has the following snippet of code: 582 /* 583 * If we just did our very last block, "remove" the padding by 584 * adjusting the output length. 585 */ 586 if (final && (padsize != 0)) { 587 unsigned int padlen = *(output + ofraglen - 1); 588 PORT_Assert (padlen > 0 && padlen <= padsize); 589 if (padlen == 0 || padlen > padsize) { 590 PORT_SetError (SEC_ERROR_BAD_DATA); 591 return SECFailure; 592 } 593 output_len -= padlen; 594 } Nothing wrong here, except that I've got a unit test that ends up hitting the assert when trying to decrypt some data with the wrong password... The final padding block is thus garbage (as one would expect). The unfortunate effect is that when running tests against a debug build, the assert is fatal (process crashes). The fix would be to just remove like 588, as the line below it checks the same thing and returns an error.
Comment 1•16 years ago
|
||
yes, I agree. Now, if someone were to submit a patch that I can review... :)
Assignee | ||
Comment 2•16 years ago
|
||
Comment 3•16 years ago
|
||
Comment on attachment 323017 [details] [diff] [review] Patch v.1 Thanks. r=me Checking in p7local.c; new revision: 1.13; previous revision: 1.12
Attachment #323017 -
Flags: review?(nelson) → review+
Updated•16 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Priority: -- → P2
Resolution: --- → FIXED
Target Milestone: --- → 3.12.1
Version: unspecified → trunk
You need to log in
before you can comment on or make changes to this bug.
Description
•