Fix for 265504 - cmsutil dumps core with invalid option set. r=wtc

git-svn-id: svn://10.0.0.236/branches/NSS_3_9_BRANCH@164221 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
julien.pierre.bugs%sun.com
2004-10-22 22:39:47 +00:00
parent 23324aca14
commit 1d8741ddd5

View File

@@ -34,7 +34,7 @@
/*
* cmsutil -- A command to work with CMS data
*
* $Id: cmsutil.c,v 1.48 2003-12-12 23:55:06 nelsonb%netscape.com Exp $
* $Id: cmsutil.c,v 1.48.4.1 2004-10-22 22:38:52 julien.pierre.bugs%sun.com Exp $
*/
#include "nspr.h"
@@ -1287,6 +1287,10 @@ main(int argc, char **argv)
}
break;
case 'i':
if (!optstate->value) {
fprintf(stderr, "-i option requires filename argument\n");
exit(1);
}
inFile = PR_Open(optstate->value, PR_RDONLY, 00660);
if (inFile == NULL) {
fprintf(stderr, "%s: unable to open \"%s\" for reading\n",