Closed Bug 557150 Opened 14 years ago Closed 14 years ago

signtool.c frees wrong variable in ProcessOneOpt case GENKEY_OPT

Categories

(NSS :: Tools, defect, P2)

3.12.4
defect

Tracking

(Not tracked)

RESOLVED FIXED
3.12.7

People

(Reporter: rbellamy, Assigned: rbellamy)

Details

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US) AppleWebKit/532.5 (KHTML, like Gecko) Chrome/4.1.249.1045 Safari/532.5
Build Identifier: NSS_3_12_4_RTM and HEAD

When executing ProcessOneOpt, code frees zipfile during "case GENKEY_OPT:".

Patch fixes this (see additional information, since there's nowhere to attach a patch file).

Reproducible: Always

Steps to Reproduce:
1. View lines 736 & 737 of signtool.c



? dist
Index: security/nss/cmd/signtool/signtool.c
===================================================================
RCS file: /cvsroot/mozilla/security/nss/cmd/signtool/signtool.c,v
retrieving revision 1.15
diff -U 3 -r1.15 signtool.c
--- security/nss/cmd/signtool/signtool.c	18 Sep 2008 00:30:07 -0000	1.15
+++ security/nss/cmd/signtool/signtool.c	4 Apr 2010 22:35:51 -0000
@@ -733,8 +733,8 @@
 	    PR_fprintf(errorFD, errStrings[DUPLICATE_OPTION_ERR],
 	         				"generate (-G)");
 	    warningCount++;
-	    PR_Free(zipfile); 
-	    zipfile = NULL;
+	    PR_Free(genkey);
+	    genkey = NULL;
 	}
 	if (!arg) {
 	    PR_fprintf(errorFD, errStrings[OPTION_NEEDS_ARG_ERR],
r+ for that patch.
Assignee: nobody → rbellamy
Status: UNCONFIRMED → NEW
Ever confirmed: true
Priority: -- → P2
Target Milestone: --- → 3.12.7
Version: unspecified → 3.12.4
Bug 557150: signtool.c frees wrong variable in ProcessOneOpt case GENKEY_OPT  
Patch contributed by G. Richard Bellamy <rbellamy@fritztechnologies.com>
r=nelson

Checking in signtool.c; new revision: 1.16; previous revision: 1.15

Thanks for the contribution, Richard.
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Summary: signtool.c frees zipfile instead of genkey during ProcessOneOpt of GENKEY_OPT → signtool.c frees wrong variable in ProcessOneOpt case GENKEY_OPT
You need to log in before you can comment on or make changes to this bug.