don't strcmp() a NULL longName
authorewt <devnull@localhost>
Thu, 30 Jul 1998 14:53:29 +0000 (14:53 +0000)
committerewt <devnull@localhost>
Thu, 30 Jul 1998 14:53:29 +0000 (14:53 +0000)
CVS patchset: 2212
CVS date: 1998/07/30 14:53:29

popt/popt.c

index 4bfd26c..886ac72 100644 (file)
@@ -154,7 +154,7 @@ static int handleAlias(poptContext con, char * longName, char shortName,
                       char * nextCharArg) {
     int i;
 
-    if (con->os->currAlias && con->os->currAlias->longName &&
+    if (con->os->currAlias && con->os->currAlias->longName && longName &&
        !strcmp(con->os->currAlias->longName, longName)) 
        return 0;
     if (con->os->currAlias && shortName == con->os->currAlias->shortName)