Open Bug 310499 Opened 19 years ago Updated 2 years ago

crmftest does not check for NULL in it's argument passing

Categories

(NSS :: Libraries, defect, P3)

Tracking

(Not tracked)

People

(Reporter: rrelyea, Unassigned)

Details

> +	case 'P':
> >+	    password = PORT_Strdup(optstate->value);
> >+	    if (password == NULL) {
> >+	        printf ("-P  failed\n");
> >+	        return 606;
> >+	    }
> >+	    PArg = PR_TRUE;
> >+	    break;

This will crash if optstate->value is NULL.  
Even though we pass "P:" to the parsing function, that function
does not require that the argument be present, so optstate->value
can be NULL.  All the cases in this function that attempt to 
strdup the argument have this same problem.
Assignee: wtchang → nobody
QA Contact: jason.m.reid → libraries
Priority: -- → P3
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.