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/nqc-3.1.r6/compiler/AcquireStmt.cpp Examining data/nqc-3.1.r6/compiler/AcquireStmt.h Examining data/nqc-3.1.r6/compiler/AddrOfExpr.cpp Examining data/nqc-3.1.r6/compiler/AddrOfExpr.h Examining data/nqc-3.1.r6/compiler/ArrayExpr.cpp Examining data/nqc-3.1.r6/compiler/ArrayExpr.h Examining data/nqc-3.1.r6/compiler/AsmStmt.cpp Examining data/nqc-3.1.r6/compiler/AsmStmt.h Examining data/nqc-3.1.r6/compiler/AssignMathStmt.cpp Examining data/nqc-3.1.r6/compiler/AssignMathStmt.h Examining data/nqc-3.1.r6/compiler/AssignStmt.cpp Examining data/nqc-3.1.r6/compiler/AssignStmt.h Examining data/nqc-3.1.r6/compiler/AtomExpr.cpp Examining data/nqc-3.1.r6/compiler/AtomExpr.h Examining data/nqc-3.1.r6/compiler/AutoFree.cpp Examining data/nqc-3.1.r6/compiler/AutoFree.h Examining data/nqc-3.1.r6/compiler/BinaryExpr.cpp Examining data/nqc-3.1.r6/compiler/BinaryExpr.h Examining data/nqc-3.1.r6/compiler/BlockStmt.cpp Examining data/nqc-3.1.r6/compiler/BlockStmt.h Examining data/nqc-3.1.r6/compiler/Buffer.cpp Examining data/nqc-3.1.r6/compiler/Buffer.h Examining data/nqc-3.1.r6/compiler/Bytecode.cpp Examining data/nqc-3.1.r6/compiler/Bytecode.h Examining data/nqc-3.1.r6/compiler/CallStmt.cpp Examining data/nqc-3.1.r6/compiler/CallStmt.h Examining data/nqc-3.1.r6/compiler/CaseStmt.cpp Examining data/nqc-3.1.r6/compiler/CaseStmt.h Examining data/nqc-3.1.r6/compiler/CatchStmt.cpp Examining data/nqc-3.1.r6/compiler/CatchStmt.h Examining data/nqc-3.1.r6/compiler/Compiler.cpp Examining data/nqc-3.1.r6/compiler/Compiler.h Examining data/nqc-3.1.r6/compiler/Conditional.cpp Examining data/nqc-3.1.r6/compiler/Conditional.h Examining data/nqc-3.1.r6/compiler/CondParser.cpp Examining data/nqc-3.1.r6/compiler/CondParser.h Examining data/nqc-3.1.r6/compiler/DeclareStmt.cpp Examining data/nqc-3.1.r6/compiler/DeclareStmt.h Examining data/nqc-3.1.r6/compiler/DerefExpr.cpp Examining data/nqc-3.1.r6/compiler/DerefExpr.h Examining data/nqc-3.1.r6/compiler/DoStmt.cpp Examining data/nqc-3.1.r6/compiler/DoStmt.h Examining data/nqc-3.1.r6/compiler/Error.h Examining data/nqc-3.1.r6/compiler/EventSrcExpr.cpp Examining data/nqc-3.1.r6/compiler/EventSrcExpr.h Examining data/nqc-3.1.r6/compiler/Expansion.cpp Examining data/nqc-3.1.r6/compiler/Expansion.h Examining data/nqc-3.1.r6/compiler/Expr.cpp Examining data/nqc-3.1.r6/compiler/Expr.h Examining data/nqc-3.1.r6/compiler/ExprStmt.cpp Examining data/nqc-3.1.r6/compiler/ExprStmt.h Examining data/nqc-3.1.r6/compiler/ForStmt.cpp Examining data/nqc-3.1.r6/compiler/ForStmt.h Examining data/nqc-3.1.r6/compiler/Fragment.cpp Examining data/nqc-3.1.r6/compiler/Fragment.h Examining data/nqc-3.1.r6/compiler/FunctionDef.cpp Examining data/nqc-3.1.r6/compiler/FunctionDef.h Examining data/nqc-3.1.r6/compiler/GosubParamStmt.cpp Examining data/nqc-3.1.r6/compiler/GosubParamStmt.h Examining data/nqc-3.1.r6/compiler/GosubStmt.cpp Examining data/nqc-3.1.r6/compiler/GosubStmt.h Examining data/nqc-3.1.r6/compiler/GotoStmt.cpp Examining data/nqc-3.1.r6/compiler/GotoStmt.h Examining data/nqc-3.1.r6/compiler/IfStmt.cpp Examining data/nqc-3.1.r6/compiler/IfStmt.h Examining data/nqc-3.1.r6/compiler/IncDecExpr.cpp Examining data/nqc-3.1.r6/compiler/IncDecExpr.h Examining data/nqc-3.1.r6/compiler/IndirectExpr.cpp Examining data/nqc-3.1.r6/compiler/IndirectExpr.h Examining data/nqc-3.1.r6/compiler/InlineStmt.cpp Examining data/nqc-3.1.r6/compiler/InlineStmt.h Examining data/nqc-3.1.r6/compiler/JumpStmt.cpp Examining data/nqc-3.1.r6/compiler/JumpStmt.h Examining data/nqc-3.1.r6/compiler/LabelStmt.cpp Examining data/nqc-3.1.r6/compiler/LabelStmt.h Examining data/nqc-3.1.r6/compiler/lexer.cpp Examining data/nqc-3.1.r6/compiler/LexLocation.h Examining data/nqc-3.1.r6/compiler/LocationNode.h Examining data/nqc-3.1.r6/compiler/LogicalExpr.cpp Examining data/nqc-3.1.r6/compiler/LogicalExpr.h Examining data/nqc-3.1.r6/compiler/Macro.cpp Examining data/nqc-3.1.r6/compiler/Macro.h Examining data/nqc-3.1.r6/compiler/Mapping.cpp Examining data/nqc-3.1.r6/compiler/Mapping.h Examining data/nqc-3.1.r6/compiler/ModExpr.cpp Examining data/nqc-3.1.r6/compiler/ModExpr.h Examining data/nqc-3.1.r6/compiler/MonitorStmt.cpp Examining data/nqc-3.1.r6/compiler/MonitorStmt.h Examining data/nqc-3.1.r6/compiler/NegateExpr.cpp Examining data/nqc-3.1.r6/compiler/NegateExpr.h Examining data/nqc-3.1.r6/compiler/NodeExpr.cpp Examining data/nqc-3.1.r6/compiler/NodeExpr.h Examining data/nqc-3.1.r6/compiler/parse.cpp Examining data/nqc-3.1.r6/compiler/parse.tab.h Examining data/nqc-3.1.r6/compiler/parser.h Examining data/nqc-3.1.r6/compiler/parse_util.cpp Examining data/nqc-3.1.r6/compiler/parse_util.h Examining data/nqc-3.1.r6/compiler/PreProc.cpp Examining data/nqc-3.1.r6/compiler/PreProc.h Examining data/nqc-3.1.r6/compiler/Program.cpp Examining data/nqc-3.1.r6/compiler/Program.h Examining data/nqc-3.1.r6/compiler/rcx1_nqh.h Examining data/nqc-3.1.r6/compiler/rcx2_nqh.h Examining data/nqc-3.1.r6/compiler/RelExpr.cpp Examining data/nqc-3.1.r6/compiler/RelExpr.h Examining data/nqc-3.1.r6/compiler/RepeatStmt.cpp Examining data/nqc-3.1.r6/compiler/RepeatStmt.h Examining data/nqc-3.1.r6/compiler/Resource.cpp Examining data/nqc-3.1.r6/compiler/Resource.h Examining data/nqc-3.1.r6/compiler/Scope.cpp Examining data/nqc-3.1.r6/compiler/Scope.h Examining data/nqc-3.1.r6/compiler/ScopeStmt.cpp Examining data/nqc-3.1.r6/compiler/ScopeStmt.h Examining data/nqc-3.1.r6/compiler/SensorExpr.cpp Examining data/nqc-3.1.r6/compiler/SensorExpr.h Examining data/nqc-3.1.r6/compiler/ShiftExpr.cpp Examining data/nqc-3.1.r6/compiler/ShiftExpr.h Examining data/nqc-3.1.r6/compiler/Stmt.cpp Examining data/nqc-3.1.r6/compiler/Stmt.h Examining data/nqc-3.1.r6/compiler/SwitchStmt.cpp Examining data/nqc-3.1.r6/compiler/SwitchStmt.h Examining data/nqc-3.1.r6/compiler/Symbol.cpp Examining data/nqc-3.1.r6/compiler/Symbol.h Examining data/nqc-3.1.r6/compiler/TaskIdExpr.cpp Examining data/nqc-3.1.r6/compiler/TaskIdExpr.h Examining data/nqc-3.1.r6/compiler/TaskStmt.cpp Examining data/nqc-3.1.r6/compiler/TaskStmt.h Examining data/nqc-3.1.r6/compiler/TernaryExpr.cpp Examining data/nqc-3.1.r6/compiler/TernaryExpr.h Examining data/nqc-3.1.r6/compiler/Token.h Examining data/nqc-3.1.r6/compiler/TypeExpr.cpp Examining data/nqc-3.1.r6/compiler/TypeExpr.h Examining data/nqc-3.1.r6/compiler/UnaryExpr.cpp Examining data/nqc-3.1.r6/compiler/UnaryExpr.h Examining data/nqc-3.1.r6/compiler/ValueExpr.cpp Examining data/nqc-3.1.r6/compiler/ValueExpr.h Examining data/nqc-3.1.r6/compiler/VarAllocator.cpp Examining data/nqc-3.1.r6/compiler/VarAllocator.h Examining data/nqc-3.1.r6/compiler/Variable.h Examining data/nqc-3.1.r6/compiler/VarTranslator.cpp Examining data/nqc-3.1.r6/compiler/VarTranslator.h Examining data/nqc-3.1.r6/compiler/version.h Examining data/nqc-3.1.r6/compiler/WhileStmt.cpp Examining data/nqc-3.1.r6/compiler/WhileStmt.h Examining data/nqc-3.1.r6/compiler/Error.cpp Examining data/nqc-3.1.r6/default/lexer.cpp Examining data/nqc-3.1.r6/default/parse.cpp Examining data/nqc-3.1.r6/default/parse.tab.h Examining data/nqc-3.1.r6/default/rcx1_nqh.h Examining data/nqc-3.1.r6/default/rcx2_nqh.h Examining data/nqc-3.1.r6/mkdata/mkdata.cpp Examining data/nqc-3.1.r6/nqc/CmdLine.cpp Examining data/nqc-3.1.r6/nqc/CmdLine.h Examining data/nqc-3.1.r6/nqc/debug_env.c Examining data/nqc-3.1.r6/nqc/debug_prefix.h Examining data/nqc-3.1.r6/nqc/DirList.cpp Examining data/nqc-3.1.r6/nqc/DirList.h Examining data/nqc-3.1.r6/nqc/SRecord.cpp Examining data/nqc-3.1.r6/nqc/SRecord.h Examining data/nqc-3.1.r6/nqc/nqc.cpp Examining data/nqc-3.1.r6/platform/LEGOUSBTowerioctl.h Examining data/nqc-3.1.r6/platform/PDebug.cpp Examining data/nqc-3.1.r6/platform/PDebug.h Examining data/nqc-3.1.r6/platform/PHashTable.cpp Examining data/nqc-3.1.r6/platform/PHashTable.h Examining data/nqc-3.1.r6/platform/PListS.cpp Examining data/nqc-3.1.r6/platform/PListS.h Examining data/nqc-3.1.r6/platform/PSerial.h Examining data/nqc-3.1.r6/platform/PSerial_mac.cpp Examining data/nqc-3.1.r6/platform/PSerial_none.cpp Examining data/nqc-3.1.r6/platform/PSerial_win.cpp Examining data/nqc-3.1.r6/platform/PStream.cpp Examining data/nqc-3.1.r6/platform/PStream.h Examining data/nqc-3.1.r6/platform/PTypes.h Examining data/nqc-3.1.r6/platform/TowerApi.h Examining data/nqc-3.1.r6/platform/PSerial_unix.cpp Examining data/nqc-3.1.r6/rcxlib/rcxifile.h Examining data/nqc-3.1.r6/rcxlib/rcxnub.h Examining data/nqc-3.1.r6/rcxlib/rcxnub_linuxusb.h Examining data/nqc-3.1.r6/rcxlib/rcxnub_odd.h Examining data/nqc-3.1.r6/rcxlib/RCX_Cmd.cpp Examining data/nqc-3.1.r6/rcxlib/RCX_Cmd.h Examining data/nqc-3.1.r6/rcxlib/RCX_Constants.h Examining data/nqc-3.1.r6/rcxlib/RCX_Disasm.h Examining data/nqc-3.1.r6/rcxlib/RCX_GhostTransport.cpp Examining data/nqc-3.1.r6/rcxlib/RCX_GhostTransport.h Examining data/nqc-3.1.r6/rcxlib/RCX_Image.cpp Examining data/nqc-3.1.r6/rcxlib/RCX_Image.h Examining data/nqc-3.1.r6/rcxlib/RCX_Link.cpp Examining data/nqc-3.1.r6/rcxlib/RCX_Link.h Examining data/nqc-3.1.r6/rcxlib/RCX_Log.cpp Examining data/nqc-3.1.r6/rcxlib/RCX_Log.h Examining data/nqc-3.1.r6/rcxlib/RCX_Pipe.cpp Examining data/nqc-3.1.r6/rcxlib/RCX_Pipe.h Examining data/nqc-3.1.r6/rcxlib/RCX_PipeTransport.cpp Examining data/nqc-3.1.r6/rcxlib/RCX_PipeTransport.h Examining data/nqc-3.1.r6/rcxlib/RCX_Result.h Examining data/nqc-3.1.r6/rcxlib/RCX_SerialPipe.cpp Examining data/nqc-3.1.r6/rcxlib/RCX_SerialPipe.h Examining data/nqc-3.1.r6/rcxlib/RCX_SourceTag.h Examining data/nqc-3.1.r6/rcxlib/RCX_SpyboticsLinker.cpp Examining data/nqc-3.1.r6/rcxlib/RCX_SpyboticsLinker.h Examining data/nqc-3.1.r6/rcxlib/RCX_Target.cpp Examining data/nqc-3.1.r6/rcxlib/RCX_Target.h Examining data/nqc-3.1.r6/rcxlib/RCX_Transport.cpp Examining data/nqc-3.1.r6/rcxlib/RCX_Transport.h Examining data/nqc-3.1.r6/rcxlib/RCX_USBTowerPipe_fbsd.cpp Examining data/nqc-3.1.r6/rcxlib/RCX_USBTowerPipe_none.cpp Examining data/nqc-3.1.r6/rcxlib/RCX_USBTowerPipe_osx.cpp Examining data/nqc-3.1.r6/rcxlib/RCX_USBTowerPipe_win.cpp Examining data/nqc-3.1.r6/rcxlib/USBTowerWin.cpp Examining data/nqc-3.1.r6/rcxlib/USBTowerWin.h Examining data/nqc-3.1.r6/rcxlib/legousbtower.h Examining data/nqc-3.1.r6/rcxlib/RCX_USBTowerPipe_linux.cpp Examining data/nqc-3.1.r6/rcxlib/RCX_Disasm.cpp Examining data/nqc-3.1.r6/rcxspy/rcxspy.cpp FINAL RESULTS: data/nqc-3.1.r6/compiler/Buffer.cpp:32:12: [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). using std::strcpy; data/nqc-3.1.r6/compiler/Buffer.cpp:129:2: [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(fName, name); data/nqc-3.1.r6/compiler/Compiler.cpp:35:12: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. using std::sprintf; data/nqc-3.1.r6/compiler/Error.cpp:29:12: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. using std::sprintf; data/nqc-3.1.r6/compiler/Error.cpp:145:3: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(str, sErrorText[fCode], fData); data/nqc-3.1.r6/compiler/Fragment.cpp:188:12: [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. using std::printf; data/nqc-3.1.r6/compiler/Stmt.cpp:134:12: [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. using std::printf; data/nqc-3.1.r6/compiler/Symbol.cpp:28:12: [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. using std::printf; data/nqc-3.1.r6/compiler/Symbol.cpp:38:2: [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(fKey, name); data/nqc-3.1.r6/compiler/VarAllocator.cpp:68:12: [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. using std::printf; data/nqc-3.1.r6/compiler/parse.cpp:1902:25: [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(msg, count == 0 ? ", expecting `" : " or `"); data/nqc-3.1.r6/compiler/parse.cpp:1903:25: [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(msg, yytname[x]); data/nqc-3.1.r6/default/parse.cpp:1887:4: [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(msg, count == 0 ? ", expecting `" : " or `"); data/nqc-3.1.r6/default/parse.cpp:1888:4: [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(msg, yytname[x]); data/nqc-3.1.r6/nqc/CmdLine.cpp:47:2: [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(s, a); data/nqc-3.1.r6/nqc/DirList.cpp:30:12: [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). using std::strcat; data/nqc-3.1.r6/nqc/DirList.cpp:35:12: [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). using std::strcpy; data/nqc-3.1.r6/nqc/DirList.cpp:61:2: [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(pathname, filename); data/nqc-3.1.r6/nqc/DirList.cpp:67: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(pathname, e->GetPath()); data/nqc-3.1.r6/nqc/DirList.cpp:68:3: [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(pathname, filename); data/nqc-3.1.r6/nqc/DirList.cpp:84:2: [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(fPath, path); data/nqc-3.1.r6/nqc/nqc.cpp:50:12: [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. using std::printf; data/nqc-3.1.r6/nqc/nqc.cpp:907:2: [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(filename + n, newExt); data/nqc-3.1.r6/platform/PDebug.cpp:32:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buffer, "PASSERT() failed line #%d in file %s", line, get_leafname(file)); data/nqc-3.1.r6/platform/PDebug.cpp:40:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buffer, "PREQUIRE %s failed line #%d in file %s", label, line, get_leafname(file)); data/nqc-3.1.r6/platform/PDebug.cpp:49:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buffer, "PREQUIRENOT %s failed line #%d in file %s, value = %d", data/nqc-3.1.r6/platform/PSerial_mac.cpp:102: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(outName, split+1); data/nqc-3.1.r6/platform/PSerial_mac.cpp:107: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(outName+1, name); data/nqc-3.1.r6/platform/PSerial_mac.cpp:110: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(inName+1, name); data/nqc-3.1.r6/rcxlib/RCX_Cmd.cpp:26:12: [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. using std::printf; data/nqc-3.1.r6/rcxlib/RCX_Disasm.cpp:30:12: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. using std::sprintf; data/nqc-3.1.r6/rcxlib/RCX_Disasm.cpp:35:12: [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. using std::printf; data/nqc-3.1.r6/rcxlib/RCX_Disasm.cpp:785:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(line, ";%s\n\t%s\t%d\n", name.c_str(), typeName, ChunkNum); data/nqc-3.1.r6/rcxlib/RCX_Disasm.cpp:798:7: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(line, "%s:\n", tmp.c_str()); data/nqc-3.1.r6/rcxlib/RCX_Disasm.cpp:811:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(line, "\t%s\n", typeName); data/nqc-3.1.r6/rcxlib/RCX_Disasm.cpp:936:17: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(line, "\t%s ", text); data/nqc-3.1.r6/rcxlib/RCX_Disasm.cpp:944:21: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(line, "%s:\n\t%s ", tmp.c_str(), text); data/nqc-3.1.r6/rcxlib/RCX_Disasm.cpp:947:21: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(line, "\t%s ", text); data/nqc-3.1.r6/rcxlib/RCX_Disasm.cpp:951:6: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(line, "%03d %-42s ", pc, text); data/nqc-3.1.r6/rcxlib/RCX_Disasm.cpp:1002:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(text, "%s %s %s", GetTypeName(code[0]), LOOKUP((code[1] >> 6) & 3, findRelNames), buf); data/nqc-3.1.r6/rcxlib/RCX_Disasm.cpp:1017:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(text, "%s, %s", buf, LOOKUP((code[0] >> 6) & 3, outputModeName)); data/nqc-3.1.r6/rcxlib/RCX_Disasm.cpp:1026:27: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(text, "%s, %s", buf, LOOKUP((code[0] >> 6) & 3, outputDirName)); data/nqc-3.1.r6/rcxlib/RCX_Disasm.cpp:1033:6: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(text, "%s", LOOKUP(code[0], inputTypeNames)); data/nqc-3.1.r6/rcxlib/RCX_Disasm.cpp:1039:6: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(text, "%s", LOOKUP((code[0] >> 5) & 7, inputModeNames)); data/nqc-3.1.r6/rcxlib/RCX_Disasm.cpp:1051:33: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(text, "%s", tmp.c_str()); data/nqc-3.1.r6/rcxlib/RCX_Disasm.cpp:1066:33: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(text, "%s", tmp.c_str()); data/nqc-3.1.r6/rcxlib/RCX_Disasm.cpp:1081:33: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(text, "%s", tmp.c_str()); data/nqc-3.1.r6/rcxlib/RCX_Disasm.cpp:1096:33: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(text, "%s", tmp.c_str()); data/nqc-3.1.r6/rcxlib/RCX_Disasm.cpp:1159:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(text, "%s%04d", buf, value); data/nqc-3.1.r6/rcxlib/RCX_Disasm.cpp:1221:13: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(text,"%s\t", inst->fName); data/nqc-3.1.r6/rcxlib/RCX_Disasm.cpp:1223:13: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(text,"%-8s ", inst->fName); data/nqc-3.1.r6/rcxlib/RCX_Disasm.cpp:1235:4: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(text, "%s%s", argPrinted ? ", " : "", argText); data/nqc-3.1.r6/rcxlib/RCX_Disasm.cpp:1342:31: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(text, "%s(%d)", GetTypeName(type), data); data/nqc-3.1.r6/rcxlib/RCX_Disasm.cpp:1348:31: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(text, "%s(%d)", GetTypeName(type), data); data/nqc-3.1.r6/rcxlib/RCX_Disasm.cpp:1351:29: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(text, "%s(%d)", GetTypeName(type) , data); data/nqc-3.1.r6/rcxlib/RCX_Disasm.cpp:1412:11: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(text, "%s, %d, %s", v1Text, (code[0]>>6) & 3, v2Text); data/nqc-3.1.r6/rcxlib/RCX_Disasm.cpp:1414:11: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(text, "%s %s %s", v1Text, LOOKUP((code[0]>>6) & 3, relNames), v2Text); data/nqc-3.1.r6/rcxlib/RCX_GhostTransport.cpp:27:12: [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. using std::printf; data/nqc-3.1.r6/rcxlib/RCX_Image.cpp:30:12: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. using std::sprintf; data/nqc-3.1.r6/rcxlib/RCX_Image.cpp:108:17: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(line, "%s Var %d = %s\n", genLASM ? ";" : "***", fVars[i].fIndex, fVars[i].fName.c_str()); data/nqc-3.1.r6/rcxlib/RCX_Image.cpp:119:17: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(line, "\n%s %s %d", genLASM ? ";" : "***", typeName, f.fNumber); data/nqc-3.1.r6/rcxlib/RCX_Image.cpp:122:17: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(line, " = %s, size: %d bytes\n", f.fName.c_str(), f.fLength); data/nqc-3.1.r6/rcxlib/RCX_Image.cpp:135:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(line, "\n%sTotal size: %d bytes\n", genLASM ? ";" : "", GetSize()); data/nqc-3.1.r6/rcxlib/RCX_Image.cpp:466: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(newString, s); data/nqc-3.1.r6/rcxlib/RCX_Image.cpp:519:11: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(line, ";%s\n", name.c_str()); data/nqc-3.1.r6/rcxlib/RCX_Link.cpp:40:12: [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. using std::printf; data/nqc-3.1.r6/rcxlib/RCX_Log.cpp:28:12: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. using std::sprintf; data/nqc-3.1.r6/rcxlib/RCX_PipeTransport.cpp:29:12: [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. using std::printf; data/nqc-3.1.r6/rcxlib/RCX_Transport.cpp:25:12: [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. using std::printf; data/nqc-3.1.r6/rcxlib/RCX_USBTowerPipe_fbsd.cpp:303:2: [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(dn, devname); data/nqc-3.1.r6/rcxlib/RCX_USBTowerPipe_fbsd.cpp:323:2: [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(dn, devname); data/nqc-3.1.r6/nqc/debug_env.c:52:7: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. char* getenv(const char *name) data/nqc-3.1.r6/nqc/nqc.cpp:228:21: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. gMyCompiler.AddDir(getenv(kOldIncludePathEnv)); data/nqc-3.1.r6/nqc/nqc.cpp:229:21: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. gMyCompiler.AddDir(getenv(kNewIncludePathEnv)); data/nqc-3.1.r6/nqc/nqc.cpp:259:13: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. args.Parse(getenv(kOptionsEnv)); data/nqc-3.1.r6/rcxlib/RCX_Link.cpp:41:12: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. using std::getenv; data/nqc-3.1.r6/rcxlib/RCX_Link.cpp:84:28: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if (!portName) portName = getenv(kSerialPortEnv); data/nqc-3.1.r6/rcxlib/USBTowerWin.cpp:77:18: [3] (misc) LoadLibrary: Ensure that the full path to the library is specified, or current directory may be used (CWE-829, CWE-20). Use registry entry or GetWindowsDirectory to find library path, if you aren't already. HINSTANCE hi = LoadLibrary("towerapi.dll"); data/nqc-3.1.r6/compiler/Buffer.cpp:27: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). using std::fopen; data/nqc-3.1.r6/compiler/Buffer.cpp:28:12: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. using std::memcpy; data/nqc-3.1.r6/compiler/Buffer.cpp:57:13: [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). FILE *fp = fopen(pathname, "rb"); data/nqc-3.1.r6/compiler/Buffer.cpp:105:5: [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(newBuf, fData, fLength); data/nqc-3.1.r6/compiler/Buffer.cpp:120:2: [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(fData, data, length); data/nqc-3.1.r6/compiler/Bytecode.cpp:26:12: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. using std::memcpy; data/nqc-3.1.r6/compiler/Bytecode.cpp:60:2: [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(&fData[n], data, (size_t) count); data/nqc-3.1.r6/compiler/Compiler.cpp:94:2: [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 versionCode[5]; data/nqc-3.1.r6/compiler/Compiler.cpp:95:2: [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(versionCode, "%d", MAJOR_VERSION * 100 + MINOR_VERSION); data/nqc-3.1.r6/compiler/CondParser.cpp:28:12: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. using std::memcpy; data/nqc-3.1.r6/compiler/CondParser.cpp:256: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(newStack, fStack, sizeof(long) * fMaxDepth); data/nqc-3.1.r6/compiler/Error.cpp:143: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(str, "internal error #%d", fCode); data/nqc-3.1.r6/compiler/Expansion.cpp:27:12: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. using std::memcpy; data/nqc-3.1.r6/compiler/Expansion.cpp:93:2: [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(tokens, t, count * sizeof(Token)); data/nqc-3.1.r6/compiler/Macro.cpp:22:12: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. using std::memcpy; data/nqc-3.1.r6/compiler/Macro.cpp:34: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(fTokens, tokens, sizeof(Token) * count); data/nqc-3.1.r6/compiler/lexer.cpp:2299:2: [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(buf, sCurrentInputFile->fDataPtr, n); data/nqc-3.1.r6/compiler/parse.cpp:1893:15: [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(msg, "parse error"); data/nqc-3.1.r6/default/lexer.cpp:2299:2: [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(buf, sCurrentInputFile->fDataPtr, n); data/nqc-3.1.r6/default/parse.cpp:1878:8: [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(msg, "parse error"); data/nqc-3.1.r6/mkdata/mkdata.cpp:5: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). using std::fopen; data/nqc-3.1.r6/mkdata/mkdata.cpp:41:8: [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). src = fopen(argv[1], "r"); data/nqc-3.1.r6/mkdata/mkdata.cpp:53:8: [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). dst = fopen(argv[2], "w"); data/nqc-3.1.r6/nqc/CmdLine.h:27:12: [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). using std::atoi; data/nqc-3.1.r6/nqc/CmdLine.h:43:28: [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). int NextInt() { return atoi(Next()); } data/nqc-3.1.r6/nqc/SRecord.cpp:27:12: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. using std::memcpy; data/nqc-3.1.r6/nqc/SRecord.cpp:54:14: [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. unsigned char data[SREC_DATA_SIZE]; data/nqc-3.1.r6/nqc/SRecord.cpp:77:15: [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 signed char ctab[256] = { data/nqc-3.1.r6/nqc/SRecord.cpp:176:5: [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[256]; data/nqc-3.1.r6/nqc/SRecord.cpp:234:13: [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(&image[imageIndex], &srec.data, srec.count); data/nqc-3.1.r6/nqc/SRecord.cpp:267:2: [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 line[kMaxLine]; data/nqc-3.1.r6/nqc/nqc.cpp:49: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). using std::fopen; data/nqc-3.1.r6/nqc/nqc.cpp:348:71: [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). gLink.SetRCXFirmwareChunkSize(atoi(a+2)); data/nqc-3.1.r6/nqc/nqc.cpp:352:67: [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). gLink.SetDownloadWaitTime(atoi(a+2)); data/nqc-3.1.r6/nqc/nqc.cpp:538:11: [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). int t = atoi(timeSpec); data/nqc-3.1.r6/nqc/nqc.cpp:635:8: [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). fp = fopen(filename, "w"); data/nqc-3.1.r6/nqc/nqc.cpp:692:15: [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). FILE *fp = fopen(sourceFile, "rb"); data/nqc-3.1.r6/nqc/nqc.cpp:758: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 line[256]; data/nqc-3.1.r6/nqc/nqc.cpp:802:7: [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). fp = fopen(filename, "rb"); data/nqc-3.1.r6/nqc/nqc.cpp:906:2: [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(filename, source, n); data/nqc-3.1.r6/nqc/nqc.cpp:965:7: [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). fp = fopen(filename, "w"); data/nqc-3.1.r6/nqc/nqc.cpp:1004: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(name, text, (size_t)length); data/nqc-3.1.r6/nqc/nqc.cpp:1210:2: [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 msg[Error::kMaxErrorMsg]; data/nqc-3.1.r6/nqc/nqc.cpp:1252:9: [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 pathname[DirList::kMaxPathname]; data/nqc-3.1.r6/platform/PDebug.cpp:31:2: [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[512]; data/nqc-3.1.r6/platform/PDebug.cpp:39:2: [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[512]; data/nqc-3.1.r6/platform/PDebug.cpp:48:2: [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[512]; data/nqc-3.1.r6/platform/PSerial_mac.cpp:90:2: [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 inName[256]; data/nqc-3.1.r6/platform/PSerial_mac.cpp:91:2: [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 outName[256]; data/nqc-3.1.r6/platform/PSerial_mac.cpp:99: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(inName, name, split-name); data/nqc-3.1.r6/platform/PSerial_mac.cpp:108:3: [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(outName, "Out"); data/nqc-3.1.r6/platform/PSerial_mac.cpp:111:3: [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(inName, "In"); data/nqc-3.1.r6/platform/PSerial_unix.cpp:109:9: [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(buf, name, n); data/nqc-3.1.r6/platform/PSerial_unix.cpp:118:20: [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). ok = ((fTerm = open(name, O_RDWR)) >= 0); data/nqc-3.1.r6/platform/TowerApi.h:163:4: [2] (buffer) TCHAR: 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. TCHAR szfriendlyname[SZBUF_FRIENDLYNAME]; data/nqc-3.1.r6/platform/TowerApi.h:164:4: [2] (buffer) TCHAR: 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. TCHAR szdevpath[SZBUF_DEVICEPATH]; data/nqc-3.1.r6/platform/TowerApi.h:173:5: [2] (buffer) TCHAR: 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. TCHAR szfriendlyname[SZBUF_FRIENDLYNAME]; data/nqc-3.1.r6/platform/TowerApi.h:181:5: [2] (buffer) TCHAR: 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. TCHAR szdriverver[SZBUF_DRIVERVER]; data/nqc-3.1.r6/platform/TowerApi.h:182:5: [2] (buffer) TCHAR: 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. TCHAR szdrivername[SZBUF_DRIVERNAME]; data/nqc-3.1.r6/platform/TowerApi.h:183:5: [2] (buffer) TCHAR: 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. TCHAR szprovidername[SZBUF_PROVIDERNAME]; data/nqc-3.1.r6/platform/TowerApi.h:194:4: [2] (buffer) TCHAR: 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. TCHAR szdevicekeyname[SZBUF_DRIVERNAME]; data/nqc-3.1.r6/platform/TowerApi.h:195:4: [2] (buffer) TCHAR: 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. TCHAR szdevicedesc[SZBUF_FRIENDLYNAME]; data/nqc-3.1.r6/rcxlib/RCX_Cmd.cpp:27:12: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. using std::memcpy; data/nqc-3.1.r6/rcxlib/RCX_Cmd.cpp:69:2: [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(dst, GetBody(), (ULong)fLength); data/nqc-3.1.r6/rcxlib/RCX_Cmd.cpp:77:2: [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(GetBody(), data, (size_t)length); data/nqc-3.1.r6/rcxlib/RCX_Disasm.cpp:775: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 line[256]; data/nqc-3.1.r6/rcxlib/RCX_Disasm.cpp:776: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 typeName[10]; data/nqc-3.1.r6/rcxlib/RCX_Disasm.cpp:779:28: [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. case kRCX_TaskChunk : strcpy(typeName, "task"); break; data/nqc-3.1.r6/rcxlib/RCX_Disasm.cpp:780:28: [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. case kRCX_SubChunk : strcpy(typeName, "sub"); break; data/nqc-3.1.r6/rcxlib/RCX_Disasm.cpp:781:28: [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. case kRCX_SoundChunk : strcpy(typeName, "sound"); break; data/nqc-3.1.r6/rcxlib/RCX_Disasm.cpp:782:32: [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. case kRCX_AnimationChunk : strcpy(typeName, "mood"); break; data/nqc-3.1.r6/rcxlib/RCX_Disasm.cpp:791: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 line[256]; data/nqc-3.1.r6/rcxlib/RCX_Disasm.cpp:802: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 typeName[10]; data/nqc-3.1.r6/rcxlib/RCX_Disasm.cpp:805:28: [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. case kRCX_TaskChunk : strcpy(typeName, "endt"); break; data/nqc-3.1.r6/rcxlib/RCX_Disasm.cpp:807:28: [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. case kRCX_SoundChunk : strcpy(typeName, "ends"); break; data/nqc-3.1.r6/rcxlib/RCX_Disasm.cpp:808:32: [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. case kRCX_AnimationChunk : strcpy(typeName, "endm"); break; data/nqc-3.1.r6/rcxlib/RCX_Disasm.cpp:922:2: [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 text[256]; data/nqc-3.1.r6/rcxlib/RCX_Disasm.cpp:923:2: [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 line[256]; data/nqc-3.1.r6/rcxlib/RCX_Disasm.cpp:958:21: [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(line, "%02x ", code[i]); data/nqc-3.1.r6/rcxlib/RCX_Disasm.cpp:974:2: [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[32]; data/nqc-3.1.r6/rcxlib/RCX_Disasm.cpp:979:4: [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(text, "%d", code[0]); data/nqc-3.1.r6/rcxlib/RCX_Disasm.cpp:982:4: [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(text, "%d", (short)WORD(code)); data/nqc-3.1.r6/rcxlib/RCX_Disasm.cpp:992: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(text, "%d", code[0]); data/nqc-3.1.r6/rcxlib/RCX_Disasm.cpp:994: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(text, "var[%d]", code[0]); data/nqc-3.1.r6/rcxlib/RCX_Disasm.cpp:998: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(text, "%d, %d, %d, %d", code[0], (code[1] >> 6) & 3, code[1] & 0x3f, (short)WORD(code+2)); data/nqc-3.1.r6/rcxlib/RCX_Disasm.cpp:1007:27: [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(text, "%d", code[0] & 7); data/nqc-3.1.r6/rcxlib/RCX_Disasm.cpp:1013: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(text, "%d, %d", code[0] & 7, (code[0] >> 6) & 3); data/nqc-3.1.r6/rcxlib/RCX_Disasm.cpp:1022:27: [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(text, "%d, %d", (code[0] >> 6) & 3, code[0] & 7); data/nqc-3.1.r6/rcxlib/RCX_Disasm.cpp:1031:27: [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(text, "%d", code[0]); data/nqc-3.1.r6/rcxlib/RCX_Disasm.cpp:1037:27: [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(text, "%d, %d", (code[0] >> 5) & 7, (code[0] & 31)); data/nqc-3.1.r6/rcxlib/RCX_Disasm.cpp:1054:33: [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(text, "%d", pc + ComputeOffset(code[0], 0)); data/nqc-3.1.r6/rcxlib/RCX_Disasm.cpp:1057:8: [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(text, "%d", pc + ComputeOffset(code[0], 0)); data/nqc-3.1.r6/rcxlib/RCX_Disasm.cpp:1069:33: [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(text, "%d", pc + ComputeOffset(code[0], code[1])); data/nqc-3.1.r6/rcxlib/RCX_Disasm.cpp:1072:29: [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(text, "%d", pc + ComputeOffset(code[0], code[1])); data/nqc-3.1.r6/rcxlib/RCX_Disasm.cpp:1084:33: [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(text, "%d", pc + (signed char)code[0]); data/nqc-3.1.r6/rcxlib/RCX_Disasm.cpp:1087:8: [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(text, "%d", pc + (signed char)code[0]); data/nqc-3.1.r6/rcxlib/RCX_Disasm.cpp:1099:33: [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(text, "%d", pc + (short)WORD(code)); data/nqc-3.1.r6/rcxlib/RCX_Disasm.cpp:1102:8: [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(text, "%d", pc + (short)WORD(code)); data/nqc-3.1.r6/rcxlib/RCX_Disasm.cpp:1106:27: [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(text, "%d", code[0]); data/nqc-3.1.r6/rcxlib/RCX_Disasm.cpp:1108:27: [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(text, "gvar[%d]", code[0]); data/nqc-3.1.r6/rcxlib/RCX_Disasm.cpp:1111:25: [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(text, "%d", (short)HLWORD(code)); data/nqc-3.1.r6/rcxlib/RCX_Disasm.cpp:1129:2: [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 text[256]; data/nqc-3.1.r6/rcxlib/RCX_Disasm.cpp:1130:2: [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[256]; data/nqc-3.1.r6/rcxlib/RCX_Disasm.cpp:1155:26: [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. case kRCX_TaskChunk : sprintf(buf, "t%03d", fCurNum); break; data/nqc-3.1.r6/rcxlib/RCX_Disasm.cpp:1156:25: [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. case kRCX_SubChunk : sprintf(buf, "s%03d", fCurNum); break; data/nqc-3.1.r6/rcxlib/RCX_Disasm.cpp:1157:14: [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. default : sprintf(buf, "l%03d", fCurNum); break; data/nqc-3.1.r6/rcxlib/RCX_Disasm.cpp:1200:2: [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 argText[256]; data/nqc-3.1.r6/rcxlib/RCX_Disasm.cpp:1320: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(text, "%d, %d", type, data); data/nqc-3.1.r6/rcxlib/RCX_Disasm.cpp:1327:29: [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(text, "var[%d]", data); data/nqc-3.1.r6/rcxlib/RCX_Disasm.cpp:1330:29: [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(text,"%d", data); data/nqc-3.1.r6/rcxlib/RCX_Disasm.cpp:1333:29: [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(text,"*var[%d]", data); data/nqc-3.1.r6/rcxlib/RCX_Disasm.cpp:1336:29: [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(text, "uart[%d]", data); data/nqc-3.1.r6/rcxlib/RCX_Disasm.cpp:1340:31: [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(text, "gvar[%d]", data); data/nqc-3.1.r6/rcxlib/RCX_Disasm.cpp:1346:31: [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(text, "*gvar[%d]", data); data/nqc-3.1.r6/rcxlib/RCX_Disasm.cpp:1406:2: [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 v1Text[16]; data/nqc-3.1.r6/rcxlib/RCX_Disasm.cpp:1407:2: [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 v2Text[16]; data/nqc-3.1.r6/rcxlib/RCX_Image.cpp:31: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). using std::fopen; data/nqc-3.1.r6/rcxlib/RCX_Image.cpp:32:12: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. using std::memcpy; data/nqc-3.1.r6/rcxlib/RCX_Image.cpp:73:9: [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(f->fData, data, (size_t)length); data/nqc-3.1.r6/rcxlib/RCX_Image.cpp:80:17: [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(f->fTags, tags, tagCount * sizeof(RCX_SourceTag)); data/nqc-3.1.r6/rcxlib/RCX_Image.cpp:103:9: [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 line[256]; data/nqc-3.1.r6/rcxlib/RCX_Image.cpp:116:17: [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 typeName[10]; data/nqc-3.1.r6/rcxlib/RCX_Image.cpp:202:14: [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). fp = fopen(filename, "rb"); data/nqc-3.1.r6/rcxlib/RCX_Image.cpp:273:33: [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[256]; data/nqc-3.1.r6/rcxlib/RCX_Image.cpp:328:14: [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). fp = fopen(filename, "wb"); data/nqc-3.1.r6/rcxlib/RCX_Image.cpp:475:25: [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(dst, "Task"); data/nqc-3.1.r6/rcxlib/RCX_Image.cpp:478:25: [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(dst, "Sub"); data/nqc-3.1.r6/rcxlib/RCX_Image.cpp:481:25: [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(dst, "Sound"); data/nqc-3.1.r6/rcxlib/RCX_Image.cpp:484:25: [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(dst, "Animation"); data/nqc-3.1.r6/rcxlib/RCX_Image.cpp:490:25: [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(dst, "Res %d", type); data/nqc-3.1.r6/rcxlib/RCX_Image.cpp:511:9: [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 line[256]; data/nqc-3.1.r6/rcxlib/RCX_Image.cpp:522: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(line, "\tmood\t%d\n", ChunkNum); data/nqc-3.1.r6/rcxlib/RCX_Image.cpp:566:27: [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(ptr, "%d ", *data++); data/nqc-3.1.r6/rcxlib/RCX_Image.cpp:578: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(line, "\tendm\n"); data/nqc-3.1.r6/rcxlib/RCX_Image.cpp:595:21: [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(line, "%03x ", offset); data/nqc-3.1.r6/rcxlib/RCX_Image.cpp:601:29: [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(ptr, "%02x ", *data++); data/nqc-3.1.r6/rcxlib/RCX_Log.cpp:127: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, "Variable %d: ", type & 0x1f); data/nqc-3.1.r6/rcxlib/RCX_Log.cpp:130: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, "Timer %d: ", type & 0x1f); data/nqc-3.1.r6/rcxlib/RCX_Log.cpp:133: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, "Sensor %d: ", (type & 0x1f) + 1); data/nqc-3.1.r6/rcxlib/RCX_Log.cpp:136: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, "Watch: "); data/nqc-3.1.r6/rcxlib/RCX_Log.cpp:139: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, "%02x: ", type); data/nqc-3.1.r6/rcxlib/RCX_Log.cpp:144:2: [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", GetData(index)); data/nqc-3.1.r6/rcxlib/RCX_SpyboticsLinker.cpp:27:12: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. using std::memcpy; data/nqc-3.1.r6/rcxlib/RCX_SpyboticsLinker.cpp:205:2: [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(&(*fOutput)[fContentOffset], data, length); data/nqc-3.1.r6/rcxlib/RCX_USBTowerPipe_fbsd.cpp:274:7: [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). fd = open(dn, O_RDWR); data/nqc-3.1.r6/rcxlib/RCX_USBTowerPipe_fbsd.cpp:304:2: [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(dn, ".1"); data/nqc-3.1.r6/rcxlib/RCX_USBTowerPipe_fbsd.cpp:305:9: [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). fdRd = open(dn, O_RDONLY|O_NONBLOCK); data/nqc-3.1.r6/rcxlib/RCX_USBTowerPipe_fbsd.cpp:324:2: [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(dn, ".2"); data/nqc-3.1.r6/rcxlib/RCX_USBTowerPipe_fbsd.cpp:325:9: [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). fdWr = open(dn, O_WRONLY); data/nqc-3.1.r6/rcxlib/RCX_USBTowerPipe_linux.cpp:71:7: [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). fd = open(name, O_RDWR); data/nqc-3.1.r6/rcxlib/RCX_USBTowerPipe_linux.cpp:101:34: [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. if ((i = write(fd, (void *) &((char *)ptr)[actual], (size_t)count)) < 0) data/nqc-3.1.r6/rcxlib/RCX_USBTowerPipe_osx.cpp:110:11: [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. unsigned char fInBuffer[kReadPacketSize]; data/nqc-3.1.r6/rcxlib/legousbtower.h:48:11: [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. unsigned char buffer[16]; // variable replies from the tower data/nqc-3.1.r6/rcxspy/rcxspy.cpp:13:8: [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). bool open(const char *name); data/nqc-3.1.r6/rcxspy/rcxspy.cpp:46:14: [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). bool Reader::open(const char *name) data/nqc-3.1.r6/rcxspy/rcxspy.cpp:77:14: [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 (!reader.open("")) { data/nqc-3.1.r6/compiler/Buffer.cpp:29: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). using std::strlen; data/nqc-3.1.r6/compiler/Buffer.cpp:94:12: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while((c=getc(fp)) != EOF) data/nqc-3.1.r6/compiler/Buffer.cpp:128:19: [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). fName = new char[strlen(name) + 1]; data/nqc-3.1.r6/compiler/Compiler.cpp:153:40: [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). buf->Create("<cmdline>", value, (int)strlen(value)); data/nqc-3.1.r6/compiler/Symbol.cpp:37:18: [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). fKey = new char[strlen(name) + 1]; data/nqc-3.1.r6/compiler/lexer.cpp:701:14: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ data/nqc-3.1.r6/compiler/parse.cpp:1889: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). size += strlen(yytname[x]) + 15, count++; data/nqc-3.1.r6/compiler/parse.cpp:1904:25: [1] (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 character. strcat(msg, "'"); data/nqc-3.1.r6/default/lexer.cpp:701:14: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ data/nqc-3.1.r6/default/parse.cpp:1874: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). size += strlen(yytname[x]) + 15, count++; data/nqc-3.1.r6/default/parse.cpp:1889:4: [1] (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 character. strcat(msg, "'"); data/nqc-3.1.r6/mkdata/mkdata.cpp:83:12: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while((c=fgetc(src)) != EOF) data/nqc-3.1.r6/nqc/CmdLine.cpp:46:15: [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). s = new char[strlen(a) + 1]; data/nqc-3.1.r6/nqc/CmdLine.cpp:79: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). char *buf = new char[strlen(line)+1]; data/nqc-3.1.r6/nqc/DirList.cpp:31: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). using std::strlen; data/nqc-3.1.r6/nqc/DirList.cpp:81:18: [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). size_t length = strlen(path); data/nqc-3.1.r6/nqc/nqc.cpp:838:20: [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). int length = (int)strlen(text); data/nqc-3.1.r6/nqc/nqc.cpp:877:6: [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(event) != 4) data/nqc-3.1.r6/nqc/nqc.cpp:899:13: [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). size_t n = strlen(source); data/nqc-3.1.r6/nqc/nqc.cpp:900:21: [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). size_t newExtLen = strlen(newExt); data/nqc-3.1.r6/nqc/nqc.cpp:903:8: [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). n -= strlen(oldExt); data/nqc-3.1.r6/nqc/nqc.cpp:915: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). size_t slen = strlen(s1); data/nqc-3.1.r6/nqc/nqc.cpp:916: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). size_t plen = strlen(ext); data/nqc-3.1.r6/nqc/nqc.cpp:933:19: [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). ptr = filename + strlen(filename) - 1; data/nqc-3.1.r6/platform/PSerial_unix.cpp:243:15: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). long rval = read(fTerm, ptr, count); data/nqc-3.1.r6/platform/PSerial_unix.cpp:289:19: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if ((nread = read(fTerm, cur, nread)) < 0) data/nqc-3.1.r6/rcxlib/RCX_Disasm.cpp:930:3: [1] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source is a constant character. sprintf(text, "?"); data/nqc-3.1.r6/rcxlib/RCX_Disasm.cpp:963:8: [1] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source is a constant character. sprintf(line, "\n"); data/nqc-3.1.r6/rcxlib/RCX_Disasm.cpp:1224: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). text += strlen(text); data/nqc-3.1.r6/rcxlib/RCX_Disasm.cpp:1236: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). text += strlen(text); data/nqc-3.1.r6/rcxlib/RCX_Disasm.cpp:1441:14: [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). Print(text, strlen(text)); data/nqc-3.1.r6/rcxlib/RCX_Image.cpp:216:39: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). fTargetType = (RCX_TargetType)getc(fp); data/nqc-3.1.r6/rcxlib/RCX_Image.cpp:219:9: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). getc(fp); data/nqc-3.1.r6/rcxlib/RCX_Image.cpp:230:32: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). type = (UByte) getc(fp); data/nqc-3.1.r6/rcxlib/RCX_Image.cpp:233:33: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). number = (UByte)getc(fp); data/nqc-3.1.r6/rcxlib/RCX_Image.cpp:263:24: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). type = getc(fp); data/nqc-3.1.r6/rcxlib/RCX_Image.cpp:264:25: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). index = getc(fp); data/nqc-3.1.r6/rcxlib/RCX_Image.cpp:265:26: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). length = getc(fp); data/nqc-3.1.r6/rcxlib/RCX_Image.cpp:266:23: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). (void)getc(fp); // reserved data/nqc-3.1.r6/rcxlib/RCX_Image.cpp:429:29: [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). int length = name ? strlen(name)+1 : 0; data/nqc-3.1.r6/rcxlib/RCX_Image.cpp:443:20: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). d = (UByte)getc(fp); data/nqc-3.1.r6/rcxlib/RCX_Image.cpp:444:21: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). d += (UByte)getc(fp) << 8; data/nqc-3.1.r6/rcxlib/RCX_Image.cpp:445:21: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). d += (UByte)getc(fp) << 16; data/nqc-3.1.r6/rcxlib/RCX_Image.cpp:446:21: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). d += (UByte)getc(fp) << 24; data/nqc-3.1.r6/rcxlib/RCX_Image.cpp:455:20: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). d = (UByte)getc(fp); data/nqc-3.1.r6/rcxlib/RCX_Image.cpp:456:21: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). d += (UByte)getc(fp) << 8; data/nqc-3.1.r6/rcxlib/RCX_Image.cpp:465:36: [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 *newString = new char[strlen(s) + 1]; data/nqc-3.1.r6/rcxlib/RCX_Image.cpp:560:19: [1] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source is a constant character. sprintf(line, "\t"); data/nqc-3.1.r6/rcxlib/RCX_Image.cpp:561: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). ptr = line + strlen(line); data/nqc-3.1.r6/rcxlib/RCX_Image.cpp:567:34: [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). ptr += strlen(ptr); data/nqc-3.1.r6/rcxlib/RCX_Image.cpp:570:19: [1] (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 character. strcat(ptr, "\n"); data/nqc-3.1.r6/rcxlib/RCX_Image.cpp:596:34: [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). ptr = line + strlen(line); data/nqc-3.1.r6/rcxlib/RCX_Image.cpp:602:36: [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). ptr += strlen(ptr); data/nqc-3.1.r6/rcxlib/RCX_Image.cpp:605:21: [1] (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 character. strcat(ptr, "\n"); data/nqc-3.1.r6/rcxlib/RCX_Log.cpp:29: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). using std::strlen; data/nqc-3.1.r6/rcxlib/RCX_Log.cpp:142: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). buf += strlen(buf); data/nqc-3.1.r6/rcxlib/RCX_USBTowerPipe_fbsd.cpp:217:2: [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(timeout_ms * 1000 / 2); data/nqc-3.1.r6/rcxlib/RCX_USBTowerPipe_fbsd.cpp:235:3: [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(timeout_ms * 1000 / 8); data/nqc-3.1.r6/rcxlib/RCX_USBTowerPipe_fbsd.cpp:248:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). err = read(fdRd, (void *)rdptr, count); data/nqc-3.1.r6/rcxlib/RCX_USBTowerPipe_fbsd.cpp:302: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). dn = (char *)malloc(strlen(devname) + 2 + 1); data/nqc-3.1.r6/rcxlib/RCX_USBTowerPipe_linux.cpp:117:16: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if ((actual = read(fd, ptr, count)) < 0) data/nqc-3.1.r6/rcxlib/RCX_USBTowerPipe_linux.cpp:153:2: [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(timeout_ms * 1000 / 2); data/nqc-3.1.r6/rcxlib/RCX_USBTowerPipe_osx.cpp:246:2: [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(timeout_ms * 1000 / 2); ANALYSIS SUMMARY: Hits = 297 Lines analyzed = 43270 in approximately 2.08 seconds (20789 lines/second) Physical Source Lines of Code (SLOC) = 30887 Hits@level = [0] 175 [1] 63 [2] 156 [3] 7 [4] 71 [5] 0 Hits@level+ = [0+] 472 [1+] 297 [2+] 234 [3+] 78 [4+] 71 [5+] 0 Hits/KSLOC@level+ = [0+] 15.2815 [1+] 9.6157 [2+] 7.576 [3+] 2.52533 [4+] 2.2987 [5+] 0 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.