[Snort-devel] spp_portscan.c (1.7beta4)

Phil Wood cpw at ...86...
Tue Nov 21 10:46:29 EST 2000


You need to initialize logFileName so strncat will work.

            logFileName = chrootdir == NULL ?
                (char *) malloc(strlen(toks[3]) + 1) :
                (char *) malloc(strlen(toks[3]) + strlen(chrootdir) + 1);
+           *logFileName = 0;
            if (chrootdir)
                strncpy(logFileName, chrootdir, strlen(chrootdir) + 1);
            strncat(logFileName, toks[3], strlen(toks[3]) + 1);
        }




More information about the Snort-devel mailing list