cl->nastype may now be NULL
authoraland <aland>
Sat, 23 Apr 2005 00:51:16 +0000 (00:51 +0000)
committeraland <aland>
Sat, 23 Apr 2005 00:51:16 +0000 (00:51 +0000)
src/main/session.c

index 0b3908e..a2ca4d6 100644 (file)
@@ -150,7 +150,7 @@ int rad_check_ts(uint32_t nasaddr, unsigned int portnum, const char *user,
        /*
         *  No nastype, or nas type 'other', trust radutmp.
         */
-       if ((cl->nastype[0] == '\0') ||
+       if (!cl->nastype || (cl->nastype[0] == '\0') ||
            (strcmp(cl->nastype, "other") == 0)) {
                DEBUG2("checkrad: No NAS type, or type \"other\" not checking");
                return 1;