Closed Bug 354423 Opened 18 years ago Closed 18 years ago

modutil -changepw command crashes in debug builds

Categories

(NSS :: Tools, defect, P2)

3.11.2
defect

Tracking

(Not tracked)

RESOLVED FIXED
3.11.5

People

(Reporter: nelson, Assigned: nelson)

Details

Attachments

(1 file)

The reason for the crash is this: 746 if(newpw) { 747 memset(newpw, 0, strlen(newpw)); 748 PORT_Free(newpw); 749 } 750 if(newpw2) { 751 memset(newpw2, 0, strlen(newpw)); ^^ should be newpw2 752 PORT_Free(newpw2); 753 } The patch is to insert the digit "2" in line 751. Can I get a review on that patch here?
Here's a second observation that I might as well attach to this same bug When NSS_STRICT_SHUTDOWN is set to 1, the command modutil.exe -dbdir FIPS -changepw "NSS FIPS 140-2 Certificate DB" crashes in NSS_Shutdown due to a reference leak. This is a separate problem from the above corrupt heap issue, but we might as well kill two modutil bugs with one stone. Bob, will you look at that?
Attached patch patch v1Splinter Review
Alexei, please review.
Attachment #244520 - Flags: review?(alexei.volkov.bugs)
Attachment #244520 - Flags: review?(alexei.volkov.bugs) → review+
I have filed a separate bug for the problem described in comment 1. That bug is now bug 359331
Comment on attachment 244520 [details] [diff] [review] patch v1 Bob, please SR
Attachment #244520 - Flags: superreview?(rrelyea)
Comment on attachment 244520 [details] [diff] [review] patch v1 r+, though wouldn't PORT_ZFree be more appropriate?
Attachment #244520 - Flags: superreview?(rrelyea) → superreview+
Checked in > Bug 354423. Get the right string length. R=alexei.volkov,rrelyea Checking in pk11.c; new revision: 1.21.28.2; previous revision: 1.21.28.1 Checking in pk11.c; new revision: 1.24; previous revision: 1.23
Status: NEW → RESOLVED
Closed: 18 years ago
Priority: -- → P2
Resolution: --- → FIXED
Target Milestone: 3.11.4 → 3.11.5
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: