Flawfinder version 2.0.10, (C) 2001-2019 David A. Wheeler. Number of rules (primarily dangerous function names) in C/C++ ruleset: 223 Examining data/pmars-0.9.2/src/alldisp.c Examining data/pmars-0.9.2/src/asm.h Examining data/pmars-0.9.2/src/config.h Examining data/pmars-0.9.2/src/curdisp.c Examining data/pmars-0.9.2/src/disasm.c Examining data/pmars-0.9.2/src/eval.c Examining data/pmars-0.9.2/src/global.c Examining data/pmars-0.9.2/src/global.h Examining data/pmars-0.9.2/src/grxdisp.c Examining data/pmars-0.9.2/src/lnxdisp.h Examining data/pmars-0.9.2/src/pmarsicn.h Examining data/pmars-0.9.2/src/pos.c Examining data/pmars-0.9.2/src/sim.c Examining data/pmars-0.9.2/src/sim.h Examining data/pmars-0.9.2/src/str_eng.c Examining data/pmars-0.9.2/src/token.c Examining data/pmars-0.9.2/src/uidisp.c Examining data/pmars-0.9.2/src/xgraphio.c Examining data/pmars-0.9.2/src/xwindisp.h Examining data/pmars-0.9.2/src/asm.c Examining data/pmars-0.9.2/src/cdb.c Examining data/pmars-0.9.2/src/clparse.c Examining data/pmars-0.9.2/src/gtdisp.c Examining data/pmars-0.9.2/src/lnxdisp.c Examining data/pmars-0.9.2/src/pmars.c Examining data/pmars-0.9.2/src/xwindisp.c FINAL RESULTS: data/pmars-0.9.2/src/eval.c:396:3: [5] (buffer) gets: Does not check for buffer overflows (CWE-120, CWE-20). Use fgets() instead. gets(expr); data/pmars-0.9.2/src/asm.c:79:25: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. #define LOGICERROR do { fprintf(STDOUT, logicErr, __FILE__, __LINE__); \ data/pmars-0.9.2/src/asm.c:528:3: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(outs, afterPass, pass); data/pmars-0.9.2/src/asm.c:534:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(outs, "(%5d) %s\n", aline->linesrc->loc, aline->vline); data/pmars-0.9.2/src/asm.c:705:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(abuf, illegalAppendErr); data/pmars-0.9.2/src/asm.c:709:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(abuf, bufferOverflowErr); data/pmars-0.9.2/src/asm.c:712:5: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(abuf, illegalConcatErr, arg); data/pmars-0.9.2/src/asm.c:715:5: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(abuf, tooManyLabelsErr, arg); data/pmars-0.9.2/src/asm.c:718:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(abuf, unopenedFORErr); data/pmars-0.9.2/src/asm.c:721:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(abuf, unclosedROFErr); data/pmars-0.9.2/src/asm.c:725:5: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(abuf, bad88FormatErr, arg); data/pmars-0.9.2/src/asm.c:728:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(abuf, noInstErr); data/pmars-0.9.2/src/asm.c:732:5: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(abuf, discardLabelErr, arg); data/pmars-0.9.2/src/asm.c:736:5: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(abuf, tokenErr, arg); data/pmars-0.9.2/src/asm.c:739:5: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(abuf, undefinedSymErr, arg); data/pmars-0.9.2/src/asm.c:742:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(abuf, expectNumberErr); data/pmars-0.9.2/src/asm.c:745:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(abuf, syntaxErr); data/pmars-0.9.2/src/asm.c:748:5: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(abuf, tooManyInstrErr, arg); data/pmars-0.9.2/src/asm.c:751:5: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(abuf, missingErr, arg); data/pmars-0.9.2/src/asm.c:754:5: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(abuf, recursiveErr, arg); data/pmars-0.9.2/src/asm.c:757:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(abuf, badExprErr); data/pmars-0.9.2/src/asm.c:760:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(abuf, divZeroErr); data/pmars-0.9.2/src/asm.c:763:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(abuf, overflowErr); data/pmars-0.9.2/src/asm.c:767:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(abuf, missingAssertErr); data/pmars-0.9.2/src/asm.c:771:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(abuf, badOffsetErr); data/pmars-0.9.2/src/asm.c:775:5: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(abuf, concatErr, arg); data/pmars-0.9.2/src/asm.c:778:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(abuf, ignoreENDErr); data/pmars-0.9.2/src/asm.c:782:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(abuf, invalidAssertErr); data/pmars-0.9.2/src/asm.c:786:5: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(abuf, tooMuchStuffErr, MAXINSTR); data/pmars-0.9.2/src/asm.c:789:5: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(abuf, extraTokenErr, arg); data/pmars-0.9.2/src/asm.c:793:5: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(abuf, improperPlaceErr, arg); data/pmars-0.9.2/src/asm.c:796:5: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(abuf, invalid88Err, arg); data/pmars-0.9.2/src/asm.c:799:5: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(abuf, incompleteOpErr, arg); data/pmars-0.9.2/src/asm.c:802:5: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(abuf, redefinitionErr, arg); data/pmars-0.9.2/src/asm.c:806:5: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(abuf, undefinedLabelErr, arg); data/pmars-0.9.2/src/asm.c:810:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(abuf, assertionFailErr); data/pmars-0.9.2/src/asm.c:813:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(abuf, arg); data/pmars-0.9.2/src/asm.c:816:5: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(abuf, fileOpenErr, arg); data/pmars-0.9.2/src/asm.c:819:5: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(abuf, fileReadErr, arg); data/pmars-0.9.2/src/asm.c:849:7: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(outs, "%s", errorlevel == WARNING ? warning : error); data/pmars-0.9.2/src/asm.c:864:9: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(outs, inLine, aline->linesrc->loc, aline->linesrc->src); data/pmars-0.9.2/src/asm.c:866:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(outs, " %s\n", abuf); data/pmars-0.9.2/src/asm.c:880:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(outs, "%s:\n", data/pmars-0.9.2/src/asm.c:895:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(outs, " %s\n", abuf); data/pmars-0.9.2/src/asm.c:909:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(outs, "%s", tooManyMsgErr); data/pmars-0.9.2/src/asm.c:925:3: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(errmsg, abuf); data/pmars-0.9.2/src/asm.c:1304:9: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(B_expr, A_expr); data/pmars-0.9.2/src/asm.c:1334:11: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(token, "%s [#$@<] [$@<]", opname[opcode]); data/pmars-0.9.2/src/asm.c:1344:11: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(token, "%s [$@<] [#$@<]", opname[opcode]); data/pmars-0.9.2/src/asm.c:1568:5: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(outs, currentFORMsg, dest); data/pmars-0.9.2/src/asm.c:1749:11: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(outs, currentAssertMsg, dest); data/pmars-0.9.2/src/asm.c:1771:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(buf, token); data/pmars-0.9.2/src/asm.c:2127:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(DIAfilename, temp); data/pmars-0.9.2/src/asm.c:2316:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(outs, "\nSource: filename '%s'\n", warrior[curWarrior].fileName); data/pmars-0.9.2/src/asm.c:2318:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(outs, "\nSource: standard input (%s by %s)\n", data/pmars-0.9.2/src/asm.c:2324:7: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(outs, errNumMsg, errnum); data/pmars-0.9.2/src/asm.c:2328:7: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(outs, warNumMsg, warnum); data/pmars-0.9.2/src/asm.c:2333:9: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(outs, duplicateMsg, errkeep[ierr].loc, errkeep[ierr].num); data/pmars-0.9.2/src/asm.c:2337:7: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(outs, "%s", "\n"); data/pmars-0.9.2/src/cdb.c:578:7: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(outs, "%s\n", argStr); data/pmars-0.9.2/src/cdb.c:617:7: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(outs, "#define %s_H %d\n", argStr, hash_str(argStr, VERBLEN)); data/pmars-0.9.2/src/cdb.c:830:7: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. system(argStr); data/pmars-0.9.2/src/cdb.c:842:7: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(pressAnyKeyToContinue); data/pmars-0.9.2/src/cdb.c:849:7: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(pressAnyKeyToContinue); data/pmars-0.9.2/src/cdb.c:973:7: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(outs, unknownCommand, cmdStr); data/pmars-0.9.2/src/cdb.c:1071:9: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(holding + 1, inputStr + nextCmd); data/pmars-0.9.2/src/cdb.c:1083:7: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(inputStr + curCmd, nextMacro); data/pmars-0.9.2/src/cdb.c:1085:7: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(inputStr + curCmd, holding); data/pmars-0.9.2/src/cdb.c:1166:7: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(inputStr, lastCmdStr); data/pmars-0.9.2/src/cdb.c:1169:7: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(lastCmdStr, inputStr); data/pmars-0.9.2/src/cdb.c:1446:3: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(outs, badArgument, argStr); data/pmars-0.9.2/src/cdb.c:1481:5: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(in, with); data/pmars-0.9.2/src/cdb.c:1482:5: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(in, out2); data/pmars-0.9.2/src/cdb.c:1484:3: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(out, in); data/pmars-0.9.2/src/cdb.c:1517:5: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(buf[bi1], inpStr); data/pmars-0.9.2/src/cdb.c:1519:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(buf[bi1], inpStr); data/pmars-0.9.2/src/cdb.c:1878:3: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(outs, roundOfCycle, round, rounds, data/pmars-0.9.2/src/cdb.c:1882:3: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(outs, currentlyExecutingWarrior, W - warrior, W->name); data/pmars-0.9.2/src/cdb.c:1884:3: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(outs, processesActive, W->tasks); data/pmars-0.9.2/src/cdb.c:1935:5: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(outs, otherWarrior, W2->name); data/pmars-0.9.2/src/cdb.c:1937:5: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(outs, processesActive, W2->tasks); data/pmars-0.9.2/src/cdb.c:1990:9: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(outs, warriorAtAddressHasActiveProcesses, TW - warrior, data/pmars-0.9.2/src/cdb.c:1995:5: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(outs, ofWarriorsAreAlive, warriorsLeft, warriors); data/pmars-0.9.2/src/cdb.c:2174:5: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(outs, cannotOpenMacroFile, fnStr); data/pmars-0.9.2/src/cdb.c:2234:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buffer1 + j + 1, " echo Macro %s is too long (>= %d chars)~reset", data/pmars-0.9.2/src/cdb.c:2266:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(macroTab[tabIdx], buffer1); data/pmars-0.9.2/src/cdb.c:2359:5: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(outs, unknownMacro, macro); data/pmars-0.9.2/src/cdb.c:2382:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(outp, "%-4d->%05d %s\n", loc, qloc, cellview(memory + qloc, buf, 0)); data/pmars-0.9.2/src/cdb.c:2397:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(outp, "#%-2d: %05d %s\n", loc, wloc, cellview(memory + wloc, buf, 0)); data/pmars-0.9.2/src/cdb.c:2487:7: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(outs, nameByAuthorScores, warrior[idxV[i]].name, warrior[idxV[i]].authorName, data/pmars-0.9.2/src/cdb.c:2501:7: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(outs, resultsWLT, warrior[idxV[0]].score[0], data/pmars-0.9.2/src/cdb.c:2507:7: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(outp, nameByAuthorScores, warrior[idxV[i]].name, warrior[idxV[i]].authorName, data/pmars-0.9.2/src/cdb.c:2518:7: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(outp, resultsWLT, warrior[idxV[0]].score[0], data/pmars-0.9.2/src/cdb.c:2523:7: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(outs, nameByAuthorScores, warrior[idxV[i]].name, warrior[idxV[i]].authorName, data/pmars-0.9.2/src/cdb.c:2537:7: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(outs, resultsWLT, warrior[idxV[0]].score[0], data/pmars-0.9.2/src/cdb.c:2561:7: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(outs, nameByAuthorScores, warrior[idxV[i]].name, warrior[idxV[i]].authorName, data/pmars-0.9.2/src/cdb.c:2576:7: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(outs, resultsWLT, warrior[idxV[0]].score[0], data/pmars-0.9.2/src/cdb.c:2582:7: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(outp, nameByAuthorScores, warrior[idxV[i]].name, warrior[idxV[i]].authorName, data/pmars-0.9.2/src/cdb.c:2593:7: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(outp, resultsWLT, warrior[idxV[0]].score[0], data/pmars-0.9.2/src/cdb.c:2599:5: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(outp, nameByAuthorScores, warrior[idxV[i]].name, warrior[idxV[i]].authorName, data/pmars-0.9.2/src/cdb.c:2610:5: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(outp, resultsWLT, warrior[idxV[0]].score[0], data/pmars-0.9.2/src/clparse.c:176:5: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(outs, credits_screen1, PMARSVER / 100, (PMARSVER % 100) / 10, data/pmars-0.9.2/src/clparse.c:185:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(outs, " -%c %s %-30s", data/pmars-0.9.2/src/clparse.c:197:7: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(outs, " -%-8s $ %-24s", xOptions[i], optXOpt[i]); data/pmars-0.9.2/src/clparse.c:219:7: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(inputs, *argv); data/pmars-0.9.2/src/clparse.c:227:5: [4] (buffer) fscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. fscanf(filep, "%s", inputs); data/pmars-0.9.2/src/clparse.c:239:7: [4] (buffer) fscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. fscanf(filep, "%s", inputs); data/pmars-0.9.2/src/clparse.c:307:17: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(inputs, standardInput); data/pmars-0.9.2/src/clparse.c:336:19: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(*(char **) clip->storage, inputs); data/pmars-0.9.2/src/clparse.c:384:13: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(warrior[warriors++].fileName, inputs); data/pmars-0.9.2/src/clparse.c:406:5: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(outs, errorIsLocatedIn, inputs); data/pmars-0.9.2/src/clparse.c:410:5: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(outs, unknownOption, inputs); data/pmars-0.9.2/src/clparse.c:416:7: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(outs, badArgumentForXSwitch, xOptions[clip->def]); data/pmars-0.9.2/src/clparse.c:419:7: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(outs, badArgumentForSwitch, clip->word); data/pmars-0.9.2/src/clparse.c:423:5: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(outs, optionMustBeInTheRange, clip->word); data/pmars-0.9.2/src/clparse.c:429:5: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(outs, tooManyParameters, inputs); data/pmars-0.9.2/src/clparse.c:433:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(outs, "%s", outOfMemory); data/pmars-0.9.2/src/clparse.c:437:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(outs, "%s", cannotOpenParameterFile); data/pmars-0.9.2/src/curdisp.c:286:5: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(statusLine, preStatusLine, warrior[0].tasks, cycle); data/pmars-0.9.2/src/curdisp.c:289:5: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(statusLine, preStatusLine, warrior[0].tasks, warrior[1].tasks, data/pmars-0.9.2/src/curdisp.c:294:5: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(statusLine, preStatusLine, warriorsLeft, cycle / warriorsLeft, data/pmars-0.9.2/src/disasm.c:62:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(outp, "%3s%c%-2s %c%6d, %c%6d %4s", data/pmars-0.9.2/src/disasm.c:92:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(outp, "%05d %s\n", loc, cellview(memory + loc, buf, HIDE)); data/pmars-0.9.2/src/lnxdisp.c:1108:5: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, modeNotAvail, xsize, ysize); data/pmars-0.9.2/src/lnxdisp.c:1134:5: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, noMouse, strerror(errno)); data/pmars-0.9.2/src/lnxdisp.c:1140:5: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, cantSetMode, xsize, ysize); data/pmars-0.9.2/src/pmars.c:129:11: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(stub386); data/pmars-0.9.2/src/pmars.c:189:7: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(STDOUT, info01, warrior[i].name, warrior[i].instLen, data/pmars-0.9.2/src/sim.c:1190:4: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(outs, warriorTerminated, W - warrior, W->name); data/pmars-0.9.2/src/sim.c:1328:2: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(outs, warriorTerminatedEndOfRound, W - warrior, W->name, round); data/pmars-0.9.2/src/sim.c:1330:2: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(outs, endOfRound, round); data/pmars-0.9.2/src/xwindisp.c:493:7: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, colorNotFound, colorNames[i]); data/pmars-0.9.2/src/xwindisp.c:500:2: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, privateMap, colorNames[i]); data/pmars-0.9.2/src/xwindisp.c:1570:5: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, cantConnect, XDisplayName(displayName)); data/pmars-0.9.2/src/xwindisp.c:1583:5: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, cantOpenFont, fontName); data/pmars-0.9.2/src/xwindisp.c:1628:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(winName, "pMARS %d.%d (%s) X11 version", PMARSVER / 10, data/pmars-0.9.2/src/asm.c:202:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char buf[MAXALLCHAR], buf2[MAXALLCHAR]; data/pmars-0.9.2/src/asm.c:203:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char token[MAXALLCHAR], outs[MAXALLCHAR]; data/pmars-0.9.2/src/asm.c:328:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(token, "%lu", (unsigned long) value); data/pmars-0.9.2/src/asm.c:505:7: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(outs, "%5d\n\n", aref->value); data/pmars-0.9.2/src/asm.c:510:7: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(outs, "%5d\n\n", aref->value); data/pmars-0.9.2/src/asm.c:698:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char abuf[MAXALLCHAR]; data/pmars-0.9.2/src/asm.c:1008:11: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(tmp, "%d", (int) atbl->value - line); data/pmars-0.9.2/src/asm.c:1078:11: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(tmp, "%d", (int) atbl->value - line); data/pmars-0.9.2/src/asm.c:1137:11: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(tmp, "%d", (int) atbl->value - line); data/pmars-0.9.2/src/asm.c:1194:11: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(tmp, "%d", (int) atbl->value - line); data/pmars-0.9.2/src/asm.c:1251:13: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(tmp, "%d", (int) atbl->value - line); data/pmars-0.9.2/src/asm.c:1253:13: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(tmp, "%d", (int) atbl->value); data/pmars-0.9.2/src/asm.c:1447:7: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buf, "%d", (int) line - instrLim); data/pmars-0.9.2/src/asm.c:1794:9: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buf, "%d", line); data/pmars-0.9.2/src/asm.c:1866:11: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buf, "%02u", (unsigned int) tbl->value); data/pmars-0.9.2/src/asm.c:1883:13: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buf, "%02u", (unsigned int) tbl->value); data/pmars-0.9.2/src/asm.c:1885:13: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buf, "%d", tbl->value); /* absolute value */ data/pmars-0.9.2/src/asm.c:1887:13: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buf, "%d", tbl->value - line); /* relative value */ data/pmars-0.9.2/src/asm.c:2078:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char DIAfilename[256], *temp; data/pmars-0.9.2/src/asm.c:2130:7: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(DIAfilename, ".DIA"); data/pmars-0.9.2/src/asm.c:2132:7: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(temp, ".DIA"); data/pmars-0.9.2/src/asm.c:2134:12: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). dias = fopen(DIAfilename, "w"); data/pmars-0.9.2/src/asm.c:2149:35: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((*fName == '\0') || (infp = fopen(fName, "r")) != NULL) { data/pmars-0.9.2/src/cdb.c:327:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char outs[MAXSTR + 1], buffer1[MAXSTR + 1], buffer2[MAXSTR + 1]; data/pmars-0.9.2/src/cdb.c:362:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *cmdStr, *fnStr, verbStr[MAXCMD + 1], argStr[MAXARG + 1]; data/pmars-0.9.2/src/cdb.c:432:11: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(outs, "%ld\n", start); data/pmars-0.9.2/src/cdb.c:434:11: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(outs, "%ld,%ld\n", start, stop); data/pmars-0.9.2/src/cdb.c:951:24: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((logfile = fopen(argStr, "a")) == NULL) data/pmars-0.9.2/src/cdb.c:1039:10: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char holding[MAXCMDSTR + 1], inputStr[MAXCMDSTR + 1], lastCmdStr[MAXCMDSTR + 1]; data/pmars-0.9.2/src/cdb.c:1152:9: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(inputStr, "con\n"); /* leave cdb */ data/pmars-0.9.2/src/cdb.c:1475:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char out2[MAXARG + 1]; data/pmars-0.9.2/src/cdb.c:1506:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[2][MAXARG + 1], outs2[MAXARG + 1], *pos; data/pmars-0.9.2/src/cdb.c:1521:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(outs, "%d", curAddr); data/pmars-0.9.2/src/cdb.c:1525:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(outs, "%d", (targetID == QUEUE && !QW->tasks ? data/pmars-0.9.2/src/cdb.c:1534:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(outs, "%d", targetID == PSP ? QW->pSpaceIndex : memory[targetSelect(curAddr)].A_value); data/pmars-0.9.2/src/cdb.c:1538:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(outs, "%d", targetID == PSP ? QW->pSpaceIndex : memory[targetSelect(curAddr)].B_value); data/pmars-0.9.2/src/cdb.c:1542:7: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(outs, "%d", (targetID == QUEUE || targetID == PSP ? data/pmars-0.9.2/src/cdb.c:1545:7: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(outs2, "PC%d", i + 1); data/pmars-0.9.2/src/cdb.c:1550:7: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(outs, "%d", (targetID == QUEUE || targetID == PSP ? data/pmars-0.9.2/src/cdb.c:1553:7: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(outs2, "PC%d", warriors); data/pmars-0.9.2/src/cdb.c:1558:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(outs, "%d", (targetID == QUEUE || targetID == PSP ? data/pmars-0.9.2/src/cdb.c:1563:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(outs, "%d", (cycle + (warriorsLeft ? warriorsLeft : 1) - 1) / data/pmars-0.9.2/src/cdb.c:1567:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(outs, "%d", round); data/pmars-0.9.2/src/cdb.c:1573:7: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(outs, "%d", bgiTextLines - 1); data/pmars-0.9.2/src/cdb.c:1575:7: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(outs, "%d", screenY - 2); data/pmars-0.9.2/src/cdb.c:1578:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(outs, "%d", bgiTextLines - 1); data/pmars-0.9.2/src/cdb.c:1581:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(outs, "%d", LINES); data/pmars-0.9.2/src/cdb.c:1584:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(outs, "%d", screenY - 2); data/pmars-0.9.2/src/cdb.c:1587:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(outs, "%d", mac_text_lines()); data/pmars-0.9.2/src/cdb.c:1590:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(outs, "%d", svgaTextLines); data/pmars-0.9.2/src/cdb.c:1593:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(outs, "%d", xWinTextLines); data/pmars-0.9.2/src/cdb.c:1595:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(outs, "%d", TEXTLINES); data/pmars-0.9.2/src/cdb.c:1899:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(outs, "%d ", *thisProc); data/pmars-0.9.2/src/cdb.c:1909:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(outs, "[%d]-> ", progCnt); data/pmars-0.9.2/src/cdb.c:1912:7: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(outs, "%d ", *thisProc); data/pmars-0.9.2/src/cdb.c:1926:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(outs, "P-space[%d]: <%d> ", W->pSpaceIndex, W->lastResult); data/pmars-0.9.2/src/cdb.c:1929:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(outs, "%d ", *(pSpace[W->pSpaceIndex] + count)); data/pmars-0.9.2/src/cdb.c:1951:7: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(outs, "%d ", *thisProc); data/pmars-0.9.2/src/cdb.c:1961:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(outs, "[%d]-> ", *thisProc); data/pmars-0.9.2/src/cdb.c:1970:7: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(outs, "%d ", *thisProc); data/pmars-0.9.2/src/cdb.c:1977:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(outs, "P-space[%d]: <%d> ", W2->pSpaceIndex, W2->lastResult); data/pmars-0.9.2/src/cdb.c:1980:7: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(outs, "%d ", *(pSpace[W2->pSpaceIndex] + count)); data/pmars-0.9.2/src/cdb.c:2016:7: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(outs, "%-4d->%05d ", start, queue(start)); data/pmars-0.9.2/src/cdb.c:2018:7: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(outs, "#%-2d: %05d ", start, data/pmars-0.9.2/src/cdb.c:2021:7: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(outs, "[%4d]=", start); data/pmars-0.9.2/src/cdb.c:2023:7: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(outs, "%05d ", start); data/pmars-0.9.2/src/cdb.c:2155:5: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(++fnStr, "pmars.mac"); data/pmars-0.9.2/src/cdb.c:2173:21: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). } else if ((mfp = fopen(fnStr, "r")) == NULL) { data/pmars-0.9.2/src/cdb.c:2253:32: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. ((macroTab[tabIdx] = (char *) realloc(macroTab[tabIdx], macroLen + 1)) == NULL)) data/pmars-0.9.2/src/cdb.c:2379:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[MAXSTR]; data/pmars-0.9.2/src/cdb.c:2394:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[MAXSTR]; data/pmars-0.9.2/src/cdb.c:2408:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(outp, "[%4d]=%-5d\n", loc, loc ? *(pSpace[QW->pSpaceIndex] + loc) : data/pmars-0.9.2/src/cdb.c:2471:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char outs[80]; data/pmars-0.9.2/src/cdb.c:2493:11: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(outs, " %d", warrior[idxV[i]].score[j]); data/pmars-0.9.2/src/cdb.c:2496:9: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(outs, " %d\n", deaths(idxV[i])); data/pmars-0.9.2/src/cdb.c:2529:11: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(outs, " %d", warrior[idxV[i]].score[j]); data/pmars-0.9.2/src/cdb.c:2532:9: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(outs, " %d\n", deaths(idxV[i])); data/pmars-0.9.2/src/cdb.c:2567:11: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(outs, " %d", warrior[idxV[i]].score[j]); data/pmars-0.9.2/src/cdb.c:2571:9: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(outs, " %d\n", deaths(idxV[i])); data/pmars-0.9.2/src/clparse.c:118:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char outs[MAXALLCHAR]; data/pmars-0.9.2/src/clparse.c:263:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char inputs[CLP_MAXSTRLEN]; data/pmars-0.9.2/src/clparse.c:294:34: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((newFile = fopen(inputs, "r")) == NULL) { data/pmars-0.9.2/src/clparse.c:343:29: [2] (integer) atol: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). clip->def = atol(inputs); data/pmars-0.9.2/src/clparse.c:371:20: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). many = atoi(inputs);/* how many warriors from stdin */ data/pmars-0.9.2/src/clparse.c:425:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(outs, "%ld - %ld\n", (clip->min), (clip->max)); data/pmars-0.9.2/src/curdisp.c:82:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char statusLine[120], preStatusLine[120]; data/pmars-0.9.2/src/curdisp.c:250:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(preStatusLine, "%0.20s [0]: %%-5d Cycle: %%-6d", warrior[0].name); data/pmars-0.9.2/src/curdisp.c:254:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(preStatusLine, "%10.10s [0]: %%-5d %10.10s [1]: %%-5d Cycle: %%-6d R: %%d/%d (%%d %%d %%d)", data/pmars-0.9.2/src/curdisp.c:259:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(preStatusLine, "%%d of %d warriors alive Cycle: %%-6d R: %%d/%d", data/pmars-0.9.2/src/curdisp.c:461:11: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(str, " "); data/pmars-0.9.2/src/disasm.c:91:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[MAXALLCHAR]; data/pmars-0.9.2/src/disasm.c:104:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[MAXALLCHAR]; data/pmars-0.9.2/src/eval.c:253:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[BIGNUM]; data/pmars-0.9.2/src/eval.c:391:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char expr[80]; data/pmars-0.9.2/src/global.c:32:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char errmsg[MAXALLCHAR]; data/pmars-0.9.2/src/global.h:301:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. extern char errmsg[MAXALLCHAR]; data/pmars-0.9.2/src/grxdisp.c:226:13: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(result, " m mousel\n"); data/pmars-0.9.2/src/grxdisp.c:228:13: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(result, " m mousem\n"); data/pmars-0.9.2/src/grxdisp.c:230:13: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(result, " m mouser\n"); data/pmars-0.9.2/src/grxdisp.c:255:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char s[7]; data/pmars-0.9.2/src/grxdisp.c:270:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(s, "%d ", i); data/pmars-0.9.2/src/gtdisp.c:104:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy((void *) ((0xB800) << 4), scrptr, 4000); data/pmars-0.9.2/src/gtdisp.c:111:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(scrptr, (void *) ((0xB800) << 4), 4000); data/pmars-0.9.2/src/lnxdisp.c:109:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char str[2] = " "; /* needed for some output */ data/pmars-0.9.2/src/lnxdisp.c:396:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char s[7]; data/pmars-0.9.2/src/lnxdisp.c:418:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(s, "%d ", i); data/pmars-0.9.2/src/lnxdisp.c:473:10: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char data[100]; /* saved screen image */ data/pmars-0.9.2/src/lnxdisp.c:620:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[20]; data/pmars-0.9.2/src/lnxdisp.c:651:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[10]; data/pmars-0.9.2/src/lnxdisp.c:714:4: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(result, " m mousel\n"); data/pmars-0.9.2/src/lnxdisp.c:716:4: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(result, " m mousem\n"); data/pmars-0.9.2/src/lnxdisp.c:718:4: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(result, " m mouser\n"); data/pmars-0.9.2/src/lnxdisp.c:737:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buf, " m ctrl-%c\n", key + 96); data/pmars-0.9.2/src/lnxdisp.c:741:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buf, " m alt-%c\n", key + 'a' - ALT_A); data/pmars-0.9.2/src/lnxdisp.c:746:5: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(buf, " m ins\n"); data/pmars-0.9.2/src/lnxdisp.c:749:5: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(buf, " m del\n"); data/pmars-0.9.2/src/lnxdisp.c:752:5: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(buf, " m up\n"); data/pmars-0.9.2/src/lnxdisp.c:755:5: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(buf, " m down\n"); data/pmars-0.9.2/src/lnxdisp.c:758:5: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(buf, " m left\n"); data/pmars-0.9.2/src/lnxdisp.c:761:5: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(buf, " m right\n"); data/pmars-0.9.2/src/lnxdisp.c:764:5: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(buf, " m pgup\n"); data/pmars-0.9.2/src/lnxdisp.c:767:5: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(buf, " m pgdn\n"); data/pmars-0.9.2/src/lnxdisp.c:770:5: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(buf, " m home\n"); data/pmars-0.9.2/src/lnxdisp.c:773:5: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(buf, " m end\n"); data/pmars-0.9.2/src/lnxdisp.c:776:5: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(buf, " m f1\n"); data/pmars-0.9.2/src/lnxdisp.c:779:5: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(buf, " m f2\n"); data/pmars-0.9.2/src/lnxdisp.c:782:5: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(buf, " m f3\n"); data/pmars-0.9.2/src/lnxdisp.c:785:5: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(buf, " m f4\n"); data/pmars-0.9.2/src/lnxdisp.c:788:5: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(buf, " m f5\n"); data/pmars-0.9.2/src/lnxdisp.c:791:5: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(buf, " m f6\n"); data/pmars-0.9.2/src/lnxdisp.c:794:5: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(buf, " m f7\n"); data/pmars-0.9.2/src/lnxdisp.c:797:5: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(buf, " m f8\n"); data/pmars-0.9.2/src/lnxdisp.c:800:5: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(buf, " m f9\n"); data/pmars-0.9.2/src/lnxdisp.c:803:5: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(buf, " m f10\n"); data/pmars-0.9.2/src/lnxdisp.c:806:5: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(buf, " m f11\n"); data/pmars-0.9.2/src/lnxdisp.c:809:5: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(buf, " m f12\n"); data/pmars-0.9.2/src/pmars.c:310:21: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((console_fd = open("/dev/console", O_RDONLY)) == -1) { data/pmars-0.9.2/src/sim.c:237:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char outs[60]; /* for cdb() entering message */ data/pmars-0.9.2/src/uidisp.c:196:5: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(buf, " m ins\n"); data/pmars-0.9.2/src/uidisp.c:199:5: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(buf, " m del\n"); data/pmars-0.9.2/src/uidisp.c:202:5: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(buf, " m up\n"); data/pmars-0.9.2/src/uidisp.c:205:5: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(buf, " m down\n"); data/pmars-0.9.2/src/uidisp.c:208:5: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(buf, " m left\n"); data/pmars-0.9.2/src/uidisp.c:211:5: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(buf, " m right\n"); data/pmars-0.9.2/src/uidisp.c:214:5: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(buf, " m pgup\n"); data/pmars-0.9.2/src/uidisp.c:217:5: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(buf, " m pgdn\n"); data/pmars-0.9.2/src/uidisp.c:220:5: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(buf, " m home\n"); data/pmars-0.9.2/src/uidisp.c:223:5: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(buf, " m end\n"); data/pmars-0.9.2/src/uidisp.c:227:7: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buf, " m f%d\n", code - 58); data/pmars-0.9.2/src/uidisp.c:229:7: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buf, " m alt-%c\n", altCode[code - 16]); data/pmars-0.9.2/src/uidisp.c:231:7: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buf, " m xkey(%d)\n", code); data/pmars-0.9.2/src/uidisp.c:243:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buf, " m key-%c\n", ucode - 128); data/pmars-0.9.2/src/uidisp.c:254:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buf, " m ctrl-%c\n", ccode + 96); data/pmars-0.9.2/src/xgraphio.c:43:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char outstr[MAXLENGTH]; data/pmars-0.9.2/src/xgraphio.c:54:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char str[2] = " "; data/pmars-0.9.2/src/xwindisp.c:65:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char *xColorNames[MAXXCOLOR] = { data/pmars-0.9.2/src/xwindisp.c:73:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char *xGrayScaleNames[MAXXCOLOR] = { data/pmars-0.9.2/src/xwindisp.c:81:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char *xBWColorNames[MAXXCOLOR] = { data/pmars-0.9.2/src/xwindisp.c:119:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char str[2] = " "; /* needed for some output */ data/pmars-0.9.2/src/xwindisp.c:637:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char s[7]; data/pmars-0.9.2/src/xwindisp.c:656:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(s, "%d ", i); data/pmars-0.9.2/src/xwindisp.c:709:19: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static unsigned char buffer[20]; data/pmars-0.9.2/src/xwindisp.c:768:9: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(result, " m mousel\n"); data/pmars-0.9.2/src/xwindisp.c:771:9: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(result, " m mouser\n"); data/pmars-0.9.2/src/xwindisp.c:774:9: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(result, " m mousem\n"); data/pmars-0.9.2/src/xwindisp.c:806:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buf, " m ctrl-%c\n", (char) key); data/pmars-0.9.2/src/xwindisp.c:810:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buf, " m alt-%c\n", (char) key); data/pmars-0.9.2/src/xwindisp.c:815:5: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(buf, " m ctrl-i\n"); data/pmars-0.9.2/src/xwindisp.c:818:5: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(buf, " m ins\n"); data/pmars-0.9.2/src/xwindisp.c:821:5: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(buf, " m del\n"); data/pmars-0.9.2/src/xwindisp.c:824:5: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(buf, " m up\n"); data/pmars-0.9.2/src/xwindisp.c:827:5: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(buf, " m down\n"); data/pmars-0.9.2/src/xwindisp.c:830:5: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(buf, " m left\n"); data/pmars-0.9.2/src/xwindisp.c:833:5: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(buf, " m right\n"); data/pmars-0.9.2/src/xwindisp.c:837:5: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(buf, " m pgup\n"); data/pmars-0.9.2/src/xwindisp.c:842:5: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(buf, " m pgup\n"); data/pmars-0.9.2/src/xwindisp.c:848:5: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(buf, " m pgdn\n"); data/pmars-0.9.2/src/xwindisp.c:853:5: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(buf, " m pgdn\n"); data/pmars-0.9.2/src/xwindisp.c:858:5: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(buf, " m home\n"); data/pmars-0.9.2/src/xwindisp.c:861:5: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(buf, " m end\n"); data/pmars-0.9.2/src/xwindisp.c:864:5: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(buf, " m f1\n"); data/pmars-0.9.2/src/xwindisp.c:867:5: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(buf, " m f2\n"); data/pmars-0.9.2/src/xwindisp.c:870:5: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(buf, " m f3\n"); data/pmars-0.9.2/src/xwindisp.c:873:5: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(buf, " m f4\n"); data/pmars-0.9.2/src/xwindisp.c:876:5: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(buf, " m f5\n"); data/pmars-0.9.2/src/xwindisp.c:879:5: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(buf, " m f6\n"); data/pmars-0.9.2/src/xwindisp.c:882:5: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(buf, " m f7\n"); data/pmars-0.9.2/src/xwindisp.c:885:5: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(buf, " m f8\n"); data/pmars-0.9.2/src/xwindisp.c:888:5: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(buf, " m f9\n"); data/pmars-0.9.2/src/xwindisp.c:891:5: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(buf, " m f10\n"); data/pmars-0.9.2/src/xwindisp.c:894:5: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(buf, " m f11\n"); data/pmars-0.9.2/src/xwindisp.c:897:5: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(buf, " m f12\n"); data/pmars-0.9.2/src/xwindisp.c:1518:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char winName[100]; data/pmars-0.9.2/src/asm.c:50:22: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). #define concat(a,b) (strlen(a)+strlen(b)<MAXALLCHAR?pstrcat((a),(b)):NULL) data/pmars-0.9.2/src/asm.c:50:32: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). #define concat(a,b) (strlen(a)+strlen(b)<MAXALLCHAR?pstrcat((a),(b)):NULL) data/pmars-0.9.2/src/asm.c:1306:9: [1] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant character. strcpy(A_expr, "0"); data/pmars-0.9.2/src/asm.c:1314:9: [1] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant character. strcpy(B_expr, "0"); data/pmars-0.9.2/src/asm.c:1459:15: [1] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant character. strcpy(A_expr, "0"); data/pmars-0.9.2/src/asm.c:1461:15: [1] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant character. strcpy(B_expr, "0"); data/pmars-0.9.2/src/cdb.c:1067:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(inputStr + nextCmd) + nextCmd + strlen(nextMacro) data/pmars-0.9.2/src/cdb.c:1067:48: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(inputStr + nextCmd) + nextCmd + strlen(nextMacro) data/pmars-0.9.2/src/cdb.c:1075:30: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ((tmpEnd = curCmd + strlen(nextMacro)) > macroEnd) { data/pmars-0.9.2/src/cdb.c:1158:24: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (inputStr[i = strlen(inputStr) - 1] == '\\') { data/pmars-0.9.2/src/cdb.c:1479:22: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). substitute(pos + strlen(repl), repl, with, out2); data/pmars-0.9.2/src/cdb.c:1648:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(argStr, inpStr, MAXARG); data/pmars-0.9.2/src/cdb.c:1651:12: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). for (i = strlen(argStr) - 1; i >= 0 && isspace(*(argStr + i)); --i) data/pmars-0.9.2/src/cdb.c:2232:23: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ((macroLen = strlen(outs)) == MAXSTR) { data/pmars-0.9.2/src/clparse.c:230:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). i = strlen(inputs); data/pmars-0.9.2/src/clparse.c:244:10: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). return strlen(inputs); data/pmars-0.9.2/src/clparse.c:335:30: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). malloc((strlen(inputs) + 1) * sizeof(char))) != NULL) { data/pmars-0.9.2/src/clparse.c:365:16: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). many = strlen(inputs) - 1; data/pmars-0.9.2/src/clparse.c:383:30: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). (char *) malloc((strlen(inputs) + 1) * sizeof(char))) != NULL) { data/pmars-0.9.2/src/grxdisp.c:42:41: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). #define outtextxy(x,y,s) GrDrawString(s,strlen(s),x,y,&groption) data/pmars-0.9.2/src/lnxdisp.c:627:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if ((x = read(console_fd, buffer, 20)) == -1) { data/pmars-0.9.2/src/lnxdisp.c:672:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(console_fd, buf, 1) == -1) { data/pmars-0.9.2/src/lnxdisp.c:976:5: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(loopDelay); data/pmars-0.9.2/src/xwindisp.c:1149:60: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). XDrawString(display, xwindow, colorGC, x, y_baseline, s, strlen(s)); data/pmars-0.9.2/src/xwindisp.c:1151:63: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). XDrawString(display, bsPixmap, colorGC, x, y_baseline, s, strlen(s)); data/pmars-0.9.2/src/xwindisp.c:1243:5: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(loopDelay); ANALYSIS SUMMARY: Hits = 355 Lines analyzed = 15200 in approximately 0.39 seconds (38546 lines/second) Physical Source Lines of Code (SLOC) = 12197 Hits@level = [0] 63 [1] 26 [2] 193 [3] 0 [4] 135 [5] 1 Hits@level+ = [0+] 418 [1+] 355 [2+] 329 [3+] 136 [4+] 136 [5+] 1 Hits/KSLOC@level+ = [0+] 34.2707 [1+] 29.1055 [2+] 26.9738 [3+] 11.1503 [4+] 11.1503 [5+] 0.0819874 Dot directories skipped = 1 (--followdotdir overrides) Minimum risk level = 1 Not every hit is necessarily a security vulnerability. There may be other security vulnerabilities; review your code! See 'Secure Programming HOWTO' (https://dwheeler.com/secure-programs) for more information.