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/grcompiler-5.2/compiler/Compiler.cpp Examining data/grcompiler-5.2/compiler/ErrorCheckClasses.cpp Examining data/grcompiler-5.2/compiler/ErrorCheckFeatures.cpp Examining data/grcompiler-5.2/compiler/ErrorCheckRules.cpp Examining data/grcompiler-5.2/compiler/Fsm.cpp Examining data/grcompiler-5.2/compiler/Fsm.h Examining data/grcompiler-5.2/compiler/GdlExpression.h Examining data/grcompiler-5.2/compiler/GdlFeatures.cpp Examining data/grcompiler-5.2/compiler/GdlFeatures.h Examining data/grcompiler-5.2/compiler/GdlGlyphClassDefn.cpp Examining data/grcompiler-5.2/compiler/GdlGlyphClassDefn.h Examining data/grcompiler-5.2/compiler/GdlGlyphDefn.h Examining data/grcompiler-5.2/compiler/GdlNameDefn.h Examining data/grcompiler-5.2/compiler/GdlObject.h Examining data/grcompiler-5.2/compiler/GdlRenderer.cpp Examining data/grcompiler-5.2/compiler/GdlRenderer.h Examining data/grcompiler-5.2/compiler/GdlRule.cpp Examining data/grcompiler-5.2/compiler/GdlRule.h Examining data/grcompiler-5.2/compiler/GdlTablePass.cpp Examining data/grcompiler-5.2/compiler/GdlTablePass.h Examining data/grcompiler-5.2/compiler/Generic/GrCommon.h Examining data/grcompiler-5.2/compiler/Generic/GrConstants.h Examining data/grcompiler-5.2/compiler/Generic/GrDebug.h Examining data/grcompiler-5.2/compiler/Generic/GrMstypes.h Examining data/grcompiler-5.2/compiler/Generic/GrPlatform.h Examining data/grcompiler-5.2/compiler/Generic/Platform.cpp Examining data/grcompiler-5.2/compiler/Generic/Throwable.h Examining data/grcompiler-5.2/compiler/Generic/UtilInt.h Examining data/grcompiler-5.2/compiler/Generic/UtilString.cpp Examining data/grcompiler-5.2/compiler/Generic/UtilString.h Examining data/grcompiler-5.2/compiler/Generic/UtilString_i.cpp Examining data/grcompiler-5.2/compiler/GlyphBoundaries.cpp Examining data/grcompiler-5.2/compiler/GlyphBoundaries.h Examining data/grcompiler-5.2/compiler/Grammar/ANTLRException.cpp Examining data/grcompiler-5.2/compiler/Grammar/AST.cpp Examining data/grcompiler-5.2/compiler/Grammar/ASTDebug.hpp Examining data/grcompiler-5.2/compiler/Grammar/ASTFactory.cpp Examining data/grcompiler-5.2/compiler/Grammar/Antlr/ANTLRException.hpp Examining data/grcompiler-5.2/compiler/Grammar/Antlr/AST.hpp Examining data/grcompiler-5.2/compiler/Grammar/Antlr/ASTArray.hpp Examining data/grcompiler-5.2/compiler/Grammar/Antlr/ASTFactory.hpp Examining data/grcompiler-5.2/compiler/Grammar/Antlr/ASTNULLType.hpp Examining data/grcompiler-5.2/compiler/Grammar/Antlr/ASTNode.hpp Examining data/grcompiler-5.2/compiler/Grammar/Antlr/ASTPair.hpp Examining data/grcompiler-5.2/compiler/Grammar/Antlr/BitSet.hpp Examining data/grcompiler-5.2/compiler/Grammar/Antlr/CharBuffer.hpp Examining data/grcompiler-5.2/compiler/Grammar/Antlr/CharScanner.hpp Examining data/grcompiler-5.2/compiler/Grammar/Antlr/CircularQueue.hpp Examining data/grcompiler-5.2/compiler/Grammar/Antlr/CommonASTNode.hpp Examining data/grcompiler-5.2/compiler/Grammar/Antlr/CommonToken.hpp Examining data/grcompiler-5.2/compiler/Grammar/Antlr/InputBuffer.hpp Examining data/grcompiler-5.2/compiler/Grammar/Antlr/LLkParser.hpp Examining data/grcompiler-5.2/compiler/Grammar/Antlr/LexerSharedInputState.hpp Examining data/grcompiler-5.2/compiler/Grammar/Antlr/MismatchedTokenException.hpp Examining data/grcompiler-5.2/compiler/Grammar/Antlr/NoViableAltException.hpp Examining data/grcompiler-5.2/compiler/Grammar/Antlr/Parser.hpp Examining data/grcompiler-5.2/compiler/Grammar/Antlr/ParserException.hpp Examining data/grcompiler-5.2/compiler/Grammar/Antlr/ParserSharedInputState.hpp Examining data/grcompiler-5.2/compiler/Grammar/Antlr/RefCount.hpp Examining data/grcompiler-5.2/compiler/Grammar/Antlr/ScannerException.hpp Examining data/grcompiler-5.2/compiler/Grammar/Antlr/SemanticException.hpp Examining data/grcompiler-5.2/compiler/Grammar/Antlr/String.hpp Examining data/grcompiler-5.2/compiler/Grammar/Antlr/Token.hpp Examining data/grcompiler-5.2/compiler/Grammar/Antlr/TokenBuffer.hpp Examining data/grcompiler-5.2/compiler/Grammar/Antlr/TokenStream.hpp Examining data/grcompiler-5.2/compiler/Grammar/Antlr/config.hpp Examining data/grcompiler-5.2/compiler/Grammar/BitSet.cpp Examining data/grcompiler-5.2/compiler/Grammar/CharBuffer.cpp Examining data/grcompiler-5.2/compiler/Grammar/CharScanner.cpp Examining data/grcompiler-5.2/compiler/Grammar/CommonASTNode.cpp Examining data/grcompiler-5.2/compiler/Grammar/CommonToken.cpp Examining data/grcompiler-5.2/compiler/Grammar/InputBuffer.cpp Examining data/grcompiler-5.2/compiler/Grammar/LLkParser.cpp Examining data/grcompiler-5.2/compiler/Grammar/LexerSharedInputState.cpp Examining data/grcompiler-5.2/compiler/Grammar/MismatchedTokenException.cpp Examining data/grcompiler-5.2/compiler/Grammar/NoViableAltException.cpp Examining data/grcompiler-5.2/compiler/Grammar/Parser.cpp Examining data/grcompiler-5.2/compiler/Grammar/ParserException.cpp Examining data/grcompiler-5.2/compiler/Grammar/ParserSharedInputState.cpp Examining data/grcompiler-5.2/compiler/Grammar/ScannerException.cpp Examining data/grcompiler-5.2/compiler/Grammar/String.cpp Examining data/grcompiler-5.2/compiler/Grammar/Token.cpp Examining data/grcompiler-5.2/compiler/Grammar/TokenBuffer.cpp Examining data/grcompiler-5.2/compiler/GrcBinaryStream.h Examining data/grcompiler-5.2/compiler/GrcEnv.h Examining data/grcompiler-5.2/compiler/GrcErrorList.cpp Examining data/grcompiler-5.2/compiler/GrcErrorList.h Examining data/grcompiler-5.2/compiler/GrcFont.cpp Examining data/grcompiler-5.2/compiler/GrcFont.h Examining data/grcompiler-5.2/compiler/GrcGlyphAttrMatrix.cpp Examining data/grcompiler-5.2/compiler/GrcGlyphAttrMatrix.h Examining data/grcompiler-5.2/compiler/GrcManager.cpp Examining data/grcompiler-5.2/compiler/GrcMasterTable.cpp Examining data/grcompiler-5.2/compiler/GrcMasterTable.h Examining data/grcompiler-5.2/compiler/GrcSymTable.cpp Examining data/grcompiler-5.2/compiler/GrcSymTable.h Examining data/grcompiler-5.2/compiler/Grp.h Examining data/grcompiler-5.2/compiler/GrpASTNode.hpp Examining data/grcompiler-5.2/compiler/GrpExtensions.cpp Examining data/grcompiler-5.2/compiler/GrpLexer.cpp Examining data/grcompiler-5.2/compiler/GrpLexer.hpp Examining data/grcompiler-5.2/compiler/GrpLineAndFile.hpp Examining data/grcompiler-5.2/compiler/GrpParser.cpp Examining data/grcompiler-5.2/compiler/GrpParser.hpp Examining data/grcompiler-5.2/compiler/GrpParserDebug.cpp Examining data/grcompiler-5.2/compiler/GrpParserTokenTypes.hpp Examining data/grcompiler-5.2/compiler/GrpToken.hpp Examining data/grcompiler-5.2/compiler/GrpTokenStreamFilter.hpp Examining data/grcompiler-5.2/compiler/LZ4/lz4.c Examining data/grcompiler-5.2/compiler/LZ4/lz4.h Examining data/grcompiler-5.2/compiler/LZ4/lz4hc.c Examining data/grcompiler-5.2/compiler/LZ4/lz4hc.h Examining data/grcompiler-5.2/compiler/LgCharPropsStub.h Examining data/grcompiler-5.2/compiler/ParserTreeWalker.cpp Examining data/grcompiler-5.2/compiler/PostParser.cpp Examining data/grcompiler-5.2/compiler/StrAnsiHash.h Examining data/grcompiler-5.2/compiler/TtfTypes.h Examining data/grcompiler-5.2/compiler/TtfUtil.cpp Examining data/grcompiler-5.2/compiler/TtfUtil.h Examining data/grcompiler-5.2/compiler/constants.h Examining data/grcompiler-5.2/compiler/main.cpp Examining data/grcompiler-5.2/compiler/main.h Examining data/grcompiler-5.2/compiler/resource.h Examining data/grcompiler-5.2/compiler/GrcManager.h Examining data/grcompiler-5.2/compiler/OutputToFont.cpp Examining data/grcompiler-5.2/compiler/GdlExpression.cpp Examining data/grcompiler-5.2/preprocessor/FPPBase.h Examining data/grcompiler-5.2/preprocessor/FPP_protos.h Examining data/grcompiler-5.2/preprocessor/cpp.h Examining data/grcompiler-5.2/preprocessor/cpp1.c Examining data/grcompiler-5.2/preprocessor/cpp2.c Examining data/grcompiler-5.2/preprocessor/cpp3.c Examining data/grcompiler-5.2/preprocessor/cpp4.c Examining data/grcompiler-5.2/preprocessor/cpp5.c Examining data/grcompiler-5.2/preprocessor/cpp6.c Examining data/grcompiler-5.2/preprocessor/cppadd.h Examining data/grcompiler-5.2/preprocessor/fpp.h Examining data/grcompiler-5.2/preprocessor/fpp_pragmas.h Examining data/grcompiler-5.2/preprocessor/memory.c Examining data/grcompiler-5.2/preprocessor/memory.h Examining data/grcompiler-5.2/preprocessor/usecpp.c Examining data/grcompiler-5.2/preprocessor/cppdef.h Examining data/grcompiler-5.2/test/GrcRegressionTest/CompareFontTables.cpp Examining data/grcompiler-5.2/test/GrcRegressionTest/FileInput.cpp Examining data/grcompiler-5.2/test/GrcRegressionTest/FileInput.h Examining data/grcompiler-5.2/test/GrcRegressionTest/FontStub.cpp Examining data/grcompiler-5.2/test/GrcRegressionTest/FontTableCache.h Examining data/grcompiler-5.2/test/GrcRegressionTest/GrcRegressionTest.cpp Examining data/grcompiler-5.2/test/GrcRegressionTest/GrcRtFileFont.cpp Examining data/grcompiler-5.2/test/GrcRegressionTest/GrcRtFileFont.h Examining data/grcompiler-5.2/test/GrcRegressionTest/TestCase.h Examining data/grcompiler-5.2/test/GrcRegressionTest/main.h Examining data/grcompiler-5.2/test/GrcRegressionTest/stdafx.h FINAL RESULTS: data/grcompiler-5.2/compiler/Generic/Platform.cpp:35:17: [4] (buffer) wcscpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using a function version that stops copying at the end of the buffer. return (utf16*)wcscpy((wchar_t*)dest, (const wchar_t*)src); data/grcompiler-5.2/compiler/Generic/Throwable.h:43:4: [4] (buffer) wcscpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using a function version that stops copying at the end of the buffer. wcscpy(m_pszMsg, pszMsg); data/grcompiler-5.2/compiler/Generic/Throwable.h:104:4: [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(m_pszDump, pszDump); data/grcompiler-5.2/compiler/GrcFont.cpp:63: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(m_pchFileName, pchFontFile); // strcpy_s(m_pchFileName, cch, pchFontFile) data/grcompiler-5.2/compiler/ParserTreeWalker.cpp:106: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(pszPreProcErr, staOutputPath.c_str()); data/grcompiler-5.2/compiler/ParserTreeWalker.cpp:145:2: [4] (buffer) _tcscpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using a function version that stops copying at the end of the buffer. _tcscpy(rgchCommandLine, strCommandLine.data()); data/grcompiler-5.2/compiler/ParserTreeWalker.cpp:221:15: [4] (shell) execlp: 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. testexec = execlp(staGdlppFile.c_str(), staGdlppFile.c_str(), data/grcompiler-5.2/compiler/ParserTreeWalker.cpp:224:15: [4] (shell) execlp: 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. testexec = execlp(staGdlppFile.c_str(), staGdlppFile.c_str(), data/grcompiler-5.2/compiler/main.cpp:189: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(rgchOutputFile, pch); data/grcompiler-5.2/preprocessor/cpp1.c:555:6: [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(global->functionname, tempfunc2); data/grcompiler-5.2/preprocessor/cpp2.c:724:13: [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( tmpname, filename ); data/grcompiler-5.2/preprocessor/cpp2.c:726: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( tmpname, filename ); data/grcompiler-5.2/preprocessor/cpp2.c:750:14: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf( tmpname, "%s/%s", *incptr, filename ); data/grcompiler-5.2/preprocessor/cpp2.c:753:17: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf( tmpname, "%s/%s", *incptr, filename ); data/grcompiler-5.2/preprocessor/cpp2.c:756:17: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf( tmpname, "%s%s", *incptr, filename ); data/grcompiler-5.2/preprocessor/cpp3.c:303: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(global->work, tags->data); /* Remember input filename */ data/grcompiler-5.2/preprocessor/cpp3.c:402:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(tp, "\"%3s %2d %4d\"", /* "Aug 20 1988" */ data/grcompiler-5.2/preprocessor/cpp4.c:383: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(global->parmp, text); data/grcompiler-5.2/preprocessor/cpp4.c:466:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(global->work, "\"%s\"", (file->progname != NULL) data/grcompiler-5.2/preprocessor/cpp4.c:477:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(global->work, "\"%s\"", global->functionname[0]? data/grcompiler-5.2/preprocessor/cpp4.c:668:6: [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(defp-1, global->parlist[c]); data/grcompiler-5.2/preprocessor/cpp4.c:676: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(defp, global->parlist[c]); data/grcompiler-5.2/preprocessor/cpp6.c:317:7: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(global->work, "%s%s", token1, global->tokenbuf); data/grcompiler-5.2/preprocessor/cpp6.c:321: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(global->work, token1); data/grcompiler-5.2/preprocessor/cpp6.c:335: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(global->work, token1); data/grcompiler-5.2/preprocessor/cpp6.c:570: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(result, text); data/grcompiler-5.2/preprocessor/cpp6.c:735: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(dp->name, name); data/grcompiler-5.2/preprocessor/cpp6.c:1087: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(file->buffer, text); data/grcompiler-5.2/preprocessor/cpp6.c:1219:5: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(stderr, ErrorMessage[error], arg); data/grcompiler-5.2/preprocessor/cpp6.c:1267:5: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(stderr, format, arg); data/grcompiler-5.2/preprocessor/usecpp.c:287:3: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(stderr, format, arg); data/grcompiler-5.2/test/GrcRegressionTest/GrcRegressionTest.cpp:75: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(g_logFileName, argv[iargc]); data/grcompiler-5.2/compiler/OutputToFont.cpp:128:29: [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. const char * rgchMinPath = getenv(rgchEnvVarName); data/grcompiler-5.2/compiler/ParserTreeWalker.cpp:149:11: [3] (shell) CreateProcess: This causes a new process to execute and is difficult to use safely (CWE-78). Specify the application path in the first argument, NOT as part of the second, or embedded spaces could allow an attacker to force a different program to run. BOOL f = CreateProcess(NULL, data/grcompiler-5.2/compiler/ParserTreeWalker.cpp:149:11: [3] (shell) CreateProcess: This causes a new process to execute and is difficult to use safely (CWE-78). Specify the application path in the first argument, NOT as part of the second, or embedded spaces could allow an attacker to force a different program to run. BOOL f = CreateProcess(NULL, data/grcompiler-5.2/compiler/main.cpp:84:24: [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 * pchGdlppFile = getenv("GDLPP"); data/grcompiler-5.2/preprocessor/usecpp.c:324:17: [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((env_var = getenv("GDLPP_PREFS"))) { data/grcompiler-5.2/preprocessor/usecpp.c:326:17: [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((env_var = getenv("CPP_PREFS"))) { data/grcompiler-5.2/compiler/Compiler.cpp:805:10: [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). strmOut.open(staOutputFilename.data()); data/grcompiler-5.2/compiler/Compiler.cpp:916:10: [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). strmOut.open(staOutputFilename.data()); data/grcompiler-5.2/compiler/Compiler.cpp:1322: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 rgch[20]; data/grcompiler-5.2/compiler/Compiler.cpp:1352: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 rgch[20]; data/grcompiler-5.2/compiler/Compiler.cpp:1441: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 rgch[20]; data/grcompiler-5.2/compiler/Compiler.cpp:1460: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 rgch[20]; data/grcompiler-5.2/compiler/Compiler.cpp:1476:10: [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). strmOut.open(staOutputFilename.data()); data/grcompiler-5.2/compiler/Compiler.cpp:1913:10: [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). strmOut.open(staOutputFilename.data()); data/grcompiler-5.2/compiler/Compiler.cpp:2016:10: [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). strmOut.open(staOutputFilename.data()); data/grcompiler-5.2/compiler/Compiler.cpp:2365: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 rgchCurWkDir[128]; data/grcompiler-5.2/compiler/Compiler.cpp:2372: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 rgchDbgXmlFile[128]; data/grcompiler-5.2/compiler/Compiler.cpp:2373: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 rgchOutputPath[128]; data/grcompiler-5.2/compiler/Compiler.cpp:2376: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(rgchDbgXmlFile, pchOutputFilename, cchLen * sizeof(char)); data/grcompiler-5.2/compiler/Compiler.cpp:2381: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(rgchOutputPath, rgchDbgXmlFile, cchLen * sizeof(char)); data/grcompiler-5.2/compiler/Compiler.cpp:2418:10: [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). strmOut.open(rgchDbgXmlFile); data/grcompiler-5.2/compiler/Compiler.cpp:2739: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 rgch[5]; data/grcompiler-5.2/compiler/Compiler.cpp:3146: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 rgch[20]; data/grcompiler-5.2/compiler/Compiler.cpp:3160: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 rgch[20]; data/grcompiler-5.2/compiler/Compiler.cpp:3306:4: [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 rgchBuf[64]; data/grcompiler-5.2/compiler/Compiler.cpp:3308:4: [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(rgchBuf, pchStart, (pch - pchStart) * sizeof(char)); data/grcompiler-5.2/compiler/ErrorCheckClasses.cpp:158: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 rgch[20]; data/grcompiler-5.2/compiler/ErrorCheckClasses.cpp:228: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 rgch1[20]; data/grcompiler-5.2/compiler/ErrorCheckClasses.cpp:229: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 rgch2[20]; data/grcompiler-5.2/compiler/ErrorCheckClasses.cpp:590: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 rgchCdPg[20]; data/grcompiler-5.2/compiler/ErrorCheckClasses.cpp:596: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 rgchCdPt[2] = {0,0}; data/grcompiler-5.2/compiler/ErrorCheckClasses.cpp:899:4: [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 rgch[10]; data/grcompiler-5.2/compiler/ErrorCheckClasses.cpp:946:4: [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 rgch[10]; data/grcompiler-5.2/compiler/ErrorCheckClasses.cpp:966:4: [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 rgch[10]; data/grcompiler-5.2/compiler/ErrorCheckClasses.cpp:981: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 rgch[10]; data/grcompiler-5.2/compiler/ErrorCheckClasses.cpp:1119: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 rgch1[20]; data/grcompiler-5.2/compiler/ErrorCheckClasses.cpp:1120: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 rgch2[20]; data/grcompiler-5.2/compiler/ErrorCheckClasses.cpp:1183: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 rgchLev[20]; data/grcompiler-5.2/compiler/ErrorCheckClasses.cpp:1640: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 rgchMax[20]; data/grcompiler-5.2/compiler/ErrorCheckClasses.cpp:1642: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 rgchCount[20]; data/grcompiler-5.2/compiler/ErrorCheckClasses.cpp:1995: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 rgch[20]; data/grcompiler-5.2/compiler/ErrorCheckClasses.cpp:2188: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. char rgch[20]; data/grcompiler-5.2/compiler/ErrorCheckClasses.cpp:3343:7: [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 rgch1[20]; data/grcompiler-5.2/compiler/ErrorCheckClasses.cpp:3344:7: [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 rgch2[20]; data/grcompiler-5.2/compiler/ErrorCheckClasses.cpp:3358:7: [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 rgch1[20]; data/grcompiler-5.2/compiler/ErrorCheckClasses.cpp:3359:7: [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 rgch2[20]; data/grcompiler-5.2/compiler/ErrorCheckFeatures.cpp:59: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 rgch[20]; data/grcompiler-5.2/compiler/ErrorCheckFeatures.cpp:63:6: [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 rgchID[5]; data/grcompiler-5.2/compiler/ErrorCheckFeatures.cpp:64:6: [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(rgch, &nID, 4); data/grcompiler-5.2/compiler/ErrorCheckFeatures.cpp:70:6: [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(rgch, staTmp.data(), staTmp.length() + 1); data/grcompiler-5.2/compiler/ErrorCheckFeatures.cpp:100: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 rgchMax[20]; data/grcompiler-5.2/compiler/ErrorCheckFeatures.cpp:102: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 rgchCount[20]; data/grcompiler-5.2/compiler/ErrorCheckFeatures.cpp:166:6: [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 rgchValue[20]; data/grcompiler-5.2/compiler/ErrorCheckRules.cpp:166: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 rgch1[20]; data/grcompiler-5.2/compiler/ErrorCheckRules.cpp:167: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 rgch2[20]; data/grcompiler-5.2/compiler/ErrorCheckRules.cpp:199: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 rgchPass[20]; data/grcompiler-5.2/compiler/ErrorCheckRules.cpp:216: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 rgchScrDir[20]; data/grcompiler-5.2/compiler/ErrorCheckRules.cpp:483: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 rgch1[20]; data/grcompiler-5.2/compiler/ErrorCheckRules.cpp:484: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 rgch2[20]; data/grcompiler-5.2/compiler/ErrorCheckRules.cpp:701:4: [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 rgchMax[20]; data/grcompiler-5.2/compiler/ErrorCheckRules.cpp:703:4: [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 rgchCount[20]; data/grcompiler-5.2/compiler/ErrorCheckRules.cpp:806: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 rgchMax[20]; data/grcompiler-5.2/compiler/ErrorCheckRules.cpp:808: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 rgchCount[20]; data/grcompiler-5.2/compiler/ErrorCheckRules.cpp:1104:7: [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 rgch[20]; data/grcompiler-5.2/compiler/ErrorCheckRules.cpp:1191: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 rgch[20]; data/grcompiler-5.2/compiler/ErrorCheckRules.cpp:1607:4: [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 rgch[20]; data/grcompiler-5.2/compiler/Fsm.cpp:1037:10: [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). strmOut.open(staOutputFilename.data()); data/grcompiler-5.2/compiler/Fsm.cpp:1102: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 rgch[20]; data/grcompiler-5.2/compiler/GdlExpression.cpp:312:4: [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 rgch[20]; data/grcompiler-5.2/compiler/GdlExpression.cpp:1078:6: [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 rgch[20]; data/grcompiler-5.2/compiler/GdlExpression.cpp:1253: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 rgch[20]; data/grcompiler-5.2/compiler/GdlExpression.cpp:1400:4: [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 rgch[20]; data/grcompiler-5.2/compiler/GdlExpression.cpp:1843: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 rgch[20]; data/grcompiler-5.2/compiler/GdlExpression.cpp:1952: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 rgchItem[20]; data/grcompiler-5.2/compiler/GdlExpression.cpp:2074:4: [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 rgch[20]; data/grcompiler-5.2/compiler/GdlExpression.cpp:2085:4: [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 rgch[20]; data/grcompiler-5.2/compiler/GdlExpression.cpp:2367:6: [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 rgch[20]; data/grcompiler-5.2/compiler/GdlExpression.cpp:2396: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 rgchSlotNumber[20]; data/grcompiler-5.2/compiler/GdlExpression.cpp:2440: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 rgchSlotNumber[20]; data/grcompiler-5.2/compiler/GdlFeatures.h:325: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(&nCode, m_rgchID, sizeof(m_rgchID)); data/grcompiler-5.2/compiler/GdlFeatures.h:334: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(m_rgchID, staCode.data(), staCode.size() * sizeof(char)); data/grcompiler-5.2/compiler/GdlFeatures.h:351: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 m_rgchID[4]; data/grcompiler-5.2/compiler/GdlGlyphDefn.h:260: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 rgch[20]; data/grcompiler-5.2/compiler/GdlGlyphDefn.h:265: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 rgchHex[20]; data/grcompiler-5.2/compiler/GdlGlyphDefn.h:278: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 rgch[20]; data/grcompiler-5.2/compiler/GdlGlyphDefn.h:290: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 rgch[20]; data/grcompiler-5.2/compiler/GdlRule.h:206: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 rgchItem[20]; data/grcompiler-5.2/compiler/GdlTablePass.cpp:45: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 rgch[20]; data/grcompiler-5.2/compiler/GdlTablePass.cpp:68: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 rgchMax[20]; data/grcompiler-5.2/compiler/GdlTablePass.cpp:78: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 rgchMax[20]; data/grcompiler-5.2/compiler/Generic/GrPlatform.h:191:16: [2] (buffer) MultiByteToWideChar: Requires maximum length in CHARACTERS, not bytes (CWE-120). unsigned short MultiByteToWideChar(unsigned long code_page, unsigned long, data/grcompiler-5.2/compiler/Generic/Platform.cpp:17:11: [2] (buffer) MultiByteToWideChar: Requires maximum length in CHARACTERS, not bytes (CWE-120). return ::MultiByteToWideChar(CP_ACP, 0, prgchsSrc, cchsSrc, (LPWSTR)prgchwDst, cchwDst); data/grcompiler-5.2/compiler/Generic/Platform.cpp:23:11: [2] (buffer) MultiByteToWideChar: Requires maximum length in CHARACTERS, not bytes (CWE-120). return ::MultiByteToWideChar(nCodePage, 0, prgchsSrc, cchsSrc, (LPWSTR)prgchwDst, cchwDst); data/grcompiler-5.2/compiler/Generic/Platform.cpp:154: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(dest, src, sizeof(utf16) * srcsize); data/grcompiler-5.2/compiler/Generic/Platform.cpp:161: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(dest, src, sizeof(utf16) * std::min(utf16len(src, n), n)); data/grcompiler-5.2/compiler/Generic/Platform.cpp:344:16: [2] (buffer) MultiByteToWideChar: Requires maximum length in CHARACTERS, not bytes (CWE-120). unsigned short MultiByteToWideChar(unsigned long code_page, unsigned long, data/grcompiler-5.2/compiler/Generic/UtilString.cpp:27:7: [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. const char g_rgchDigits[36] = {'0','1','2','3','4','5','6','7','8','9','A','B','C','D','E', data/grcompiler-5.2/compiler/Generic/UtilString.cpp:30:14: [2] (buffer) wchar_t: 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 const wchar_t szSpace[5] = L" \t\r\n"; // whitespace characters data/grcompiler-5.2/compiler/Generic/UtilString.h:84: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. extern const char g_rgchDigits[kradMax]; data/grcompiler-5.2/compiler/Grammar/CharScanner.cpp:339: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 buf[2]; data/grcompiler-5.2/compiler/Grammar/String.cpp:38: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 tmp[100]; data/grcompiler-5.2/compiler/Grammar/String.cpp:39: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(tmp,"%d",rhs); data/grcompiler-5.2/compiler/GrcErrorList.cpp:216:10: [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). strmOut.open(staFileName.c_str()); data/grcompiler-5.2/compiler/GrcFont.cpp:300: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(rgchwName, (gr::byte *)m_pName + lOffset, lSize); data/grcompiler-5.2/compiler/GrcFont.cpp:389:7: [2] (buffer) MultiByteToWideChar: Requires maximum length in CHARACTERS, not bytes (CWE-120). if (!MultiByteToWideChar(wCodePage, 0, &wCodePointChar, 1, (LPWSTR)&wUnicode, 1)) data/grcompiler-5.2/compiler/GrcFont.cpp:477: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 rgch[20]; data/grcompiler-5.2/compiler/GrcFont.cpp:696: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 rgch[20]; data/grcompiler-5.2/compiler/GrcFont.cpp:726: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 rgch[20]; data/grcompiler-5.2/compiler/GrcFont.cpp:772: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 rgch1[20]; data/grcompiler-5.2/compiler/GrcFont.cpp:773: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 rgch2[20]; data/grcompiler-5.2/compiler/GrcFont.cpp:803: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). m_pFile = fopen(m_pchFileName, "rb"); data/grcompiler-5.2/compiler/GrcFont.cpp:878: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 chTableTag[5]; data/grcompiler-5.2/compiler/GrcMasterTable.cpp:212:6: [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 rgch[20]; data/grcompiler-5.2/compiler/GrcMasterTable.cpp:283:17: [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). nLangID = atoi(strLang.data()); // 1033 data/grcompiler-5.2/compiler/GrcMasterTable.cpp:338:16: [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). nLangID = atoi(strLang.data()); // eg, 1033 data/grcompiler-5.2/compiler/GrcMasterTable.cpp:543:18: [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 nNameID = atoi(staNameID.data()); data/grcompiler-5.2/compiler/GrcMasterTable.cpp:549:18: [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 nLangID = atoi(staLangID.data()); data/grcompiler-5.2/compiler/GrcSymTable.cpp:313: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 rgch[20]; data/grcompiler-5.2/compiler/GrcSymTable.cpp:2033: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 rgchLevel[10]; data/grcompiler-5.2/compiler/GrcSymTable.cpp:2101: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 rgchLevel[10]; data/grcompiler-5.2/compiler/GrpASTNode.hpp:50: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 rgch[20]; data/grcompiler-5.2/compiler/GrpExtensions.cpp:46:23: [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 nLineInMarker = atoi(tokLineNumber->getText().c_str()); data/grcompiler-5.2/compiler/GrpParserDebug.cpp:21: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 intString[20]; data/grcompiler-5.2/compiler/LZ4/lz4.c:148: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(&val16, memPtr, 2); data/grcompiler-5.2/compiler/LZ4/lz4.c:169: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(memPtr, &value, 2); data/grcompiler-5.2/compiler/LZ4/lz4.c:182: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(&val32, memPtr, 4); data/grcompiler-5.2/compiler/LZ4/lz4.c:189: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(&val64, memPtr, 8); data/grcompiler-5.2/compiler/LZ4/lz4.c:202:59: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. static void LZ4_copy4(void* dstPtr, const void* srcPtr) { memcpy(dstPtr, srcPtr, 4); } data/grcompiler-5.2/compiler/LZ4/lz4.c:204:59: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. static void LZ4_copy8(void* dstPtr, const void* srcPtr) { memcpy(dstPtr, srcPtr, 8); } data/grcompiler-5.2/compiler/LZ4/lz4.c:648: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(op, anchor, lastRun); data/grcompiler-5.2/compiler/LZ4/lz4.c:884: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(op, anchor, lastRunSize); data/grcompiler-5.2/compiler/LZ4/lz4.c:1186: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(op, ip, length); data/grcompiler-5.2/compiler/LZ4/lz4.c:1228: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(op, dictEnd - copySize, copySize); data/grcompiler-5.2/compiler/LZ4/lz4.c:1239:21: [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(op, lowPrefix, copySize); data/grcompiler-5.2/compiler/LZ4/lz4hc.c:529: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(op, anchor, iend - anchor); data/grcompiler-5.2/compiler/OutputToFont.cpp:198:4: [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(pDirEntryOut + iTableOut, pDirEntryCopy + iTable, sizeof(OffsetSubTable::Entry)); data/grcompiler-5.2/compiler/OutputToFont.cpp:598: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 rgch[20]; data/grcompiler-5.2/compiler/OutputToFont.cpp:766: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 tempDate[20]; data/grcompiler-5.2/compiler/OutputToFont.cpp:1042: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(pbNextString, pbStr, cbStr); data/grcompiler-5.2/compiler/OutputToFont.cpp:1056:4: [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(pbNextString, pbStr, cbStr); data/grcompiler-5.2/compiler/OutputToFont.cpp:1097:6: [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 rgch[20]; data/grcompiler-5.2/compiler/OutputToFont.cpp:1109:6: [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 rgch[20]; data/grcompiler-5.2/compiler/OutputToFont.cpp:1134: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(pbNextString, rgch16, cbStr); data/grcompiler-5.2/compiler/OutputToFont.cpp:1195: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(prgOs2TblNew, pOs2TblMin, isizeof(uint8) * cbOs2TblMin); data/grcompiler-5.2/compiler/OutputToFont.cpp:1200: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(prgOs2TblNew + 4, pOs2TblSrc + 4, isizeof(uint16)); data/grcompiler-5.2/compiler/OutputToFont.cpp:1203: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(prgOs2TblNew + 8, pOs2TblSrc + 8, isizeof(uint16)); data/grcompiler-5.2/compiler/OutputToFont.cpp:1206: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(prgOs2TblNew + 30, pOs2TblSrc + 30, isizeof(uint16)); data/grcompiler-5.2/compiler/OutputToFont.cpp:1209: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(prgOs2TblNew + 42, pOs2TblSrc + 42, isizeof(uint8)*4 * 4); data/grcompiler-5.2/compiler/OutputToFont.cpp:1212: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(prgOs2TblNew + 64, pOs2TblSrc + 64, isizeof(uint16)); data/grcompiler-5.2/compiler/OutputToFont.cpp:1215: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(prgOs2TblNew + 66, pOs2TblSrc + 66, isizeof(uint16)); data/grcompiler-5.2/compiler/OutputToFont.cpp:3457: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 rgchCode[4]; data/grcompiler-5.2/compiler/OutputToFont.cpp:3458: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(rgchCode, &nCode, 4); data/grcompiler-5.2/compiler/ParserTreeWalker.cpp:62: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). strmIn.open(staFilePreProc.c_str()); data/grcompiler-5.2/compiler/ParserTreeWalker.cpp:108: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(pszPreProcErr + cchOutputPath, _T("\\$_gdlpp_stderr.txt"));} data/grcompiler-5.2/compiler/ParserTreeWalker.cpp:110: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(pszPreProcErr + cchOutputPath, _T("$_gdlpp_stderr.txt"));} data/grcompiler-5.2/compiler/ParserTreeWalker.cpp:111:27: [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 * pFilePreProcErr = fopen(pszPreProcErr, "w+"); data/grcompiler-5.2/compiler/ParserTreeWalker.cpp:202: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 tmpgdl[15] = "/tmp/gdlXXXXXX"; data/grcompiler-5.2/compiler/ParserTreeWalker.cpp:203:6: [2] (tmpfile) mkstemp: Potential for temporary file vulnerability in some circumstances. Some older Unix-like systems create temp files with permission to write by all by default, so be sure to set the umask to override this. Also, some older Unix systems might fail to use O_EXCL when opening the file, so make sure that O_EXCL is used by the library (CWE-377). if (mkstemp(tmpgdl)==-1) data/grcompiler-5.2/compiler/ParserTreeWalker.cpp:352:13: [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). nLineNo = atoi((const char *)pchLineNoMin); data/grcompiler-5.2/compiler/ParserTreeWalker.cpp:402: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 rgch[100]; data/grcompiler-5.2/compiler/ParserTreeWalker.cpp:404: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(rgch, sta.data() + ichMin, (ichLim - ichMin)); data/grcompiler-5.2/compiler/ParserTreeWalker.cpp:763:4: [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 rgch1[20]; data/grcompiler-5.2/compiler/ParserTreeWalker.cpp:764:4: [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 rgch2[20]; data/grcompiler-5.2/compiler/ParserTreeWalker.cpp:905:7: [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 rgchMax[20]; data/grcompiler-5.2/compiler/ParserTreeWalker.cpp:2241: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 rgchPass[20]; data/grcompiler-5.2/compiler/ParserTreeWalker.cpp:3670:10: [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). strmOut.open("dbg_parsetree.txt"); data/grcompiler-5.2/compiler/PostParser.cpp:135:6: [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 rgch[20]; data/grcompiler-5.2/compiler/TtfUtil.cpp:80: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. const char * rgPostName[kcPostNames] = { data/grcompiler-5.2/compiler/TtfUtil.cpp:562: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(pBufTmp, pBufTable, lSizeTable * sizeof(char)); data/grcompiler-5.2/compiler/main.cpp:89: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 rgchGdlppFile[1024]; data/grcompiler-5.2/compiler/main.cpp:113: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 rgchOutputFile[128]; data/grcompiler-5.2/compiler/main.cpp:276: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 rgchFamily[128]; data/grcompiler-5.2/compiler/main.cpp:298:10: [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). strmGdl.open(pchGdlFile, std::ios_base::in | std::ios_base::binary); data/grcompiler-5.2/compiler/main.cpp:338: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 rgchOutputPath[128]; data/grcompiler-5.2/compiler/main.cpp:347: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(rgchOutputPath, rgchOutputFile, cchOutputPath); /* don't include \ */ data/grcompiler-5.2/compiler/main.cpp:386:4: [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 rgch[20]; data/grcompiler-5.2/compiler/main.cpp:408:4: [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 rgch[20]; data/grcompiler-5.2/compiler/main.cpp:472:4: [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 rgch[20]; data/grcompiler-5.2/compiler/main.cpp:563: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 rgch[20]; data/grcompiler-5.2/compiler/main.cpp:623: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). strm1.open(pchFile1, std::ios_base::in | std::ios_base::binary); data/grcompiler-5.2/compiler/main.cpp:628: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). strm2.open(pchFile2, std::ios_base::in | std::ios_base::binary); data/grcompiler-5.2/compiler/main.cpp:720:2: [2] (buffer) wchar_t: 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. wchar_t rgchw[120]; data/grcompiler-5.2/compiler/main.cpp:753: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 rgch[20]; data/grcompiler-5.2/preprocessor/cpp.h:175: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 name[1]; /* #define name */ data/grcompiler-5.2/preprocessor/cpp.h:191: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[1]; /* current input line */ data/grcompiler-5.2/preprocessor/cpp1.c:364: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 tempfunc[MAX_FUNC_LENGTH + 1]; data/grcompiler-5.2/preprocessor/cpp1.c:365: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 tempfunc2[MAX_FUNC_LENGTH + 1]; data/grcompiler-5.2/preprocessor/cpp1.c:739: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[16]; /* an integer can't be that big! */ data/grcompiler-5.2/preprocessor/cpp1.c:742: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(buffer, "%d", number); data/grcompiler-5.2/preprocessor/cpp2.c:157: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( global->tokenbuf, "line" ); /* synonym for #line 123 */ data/grcompiler-5.2/preprocessor/cpp2.c:289: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). global->line = atoi(global->work) - 1; /* Reset line number */ data/grcompiler-5.2/preprocessor/cpp2.c:695: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 tmpname[NWORK]; /* Filename work area */ data/grcompiler-5.2/preprocessor/cpp3.c:100: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). if ((fp = fopen(filename, "r")) == NULL) data/grcompiler-5.2/preprocessor/cpp3.c:356: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 months[12][4] = { data/grcompiler-5.2/preprocessor/cpp3.c:416: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(tp, "\"%2d:%02d:%02d\"", /* "20:42:31" */ data/grcompiler-5.2/preprocessor/cpp4.c:449: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(global->work, "%d", global->line); data/grcompiler-5.2/preprocessor/cpp4.c:454: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(global->work, "%d", file->line); data/grcompiler-5.2/preprocessor/cpp4.c:485: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(global->work, "%d", global->funcline); data/grcompiler-5.2/preprocessor/cpp5.c:123: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 opdope[OP_MAX] = { data/grcompiler-5.2/preprocessor/cpp6.c:176: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 type[256] = { /* Character type codes Hex */ data/grcompiler-5.2/preprocessor/cpp6.c:812:4: [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[32]; data/grcompiler-5.2/preprocessor/cpp6.c:813: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(buffer, "\\0%o", c); data/grcompiler-5.2/preprocessor/cppadd.h:119: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 work[NWORK + 1]; /* Work buffer */ data/grcompiler-5.2/preprocessor/cppadd.h:152: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 ifstack[BLK_NEST]; /* #if information */ data/grcompiler-5.2/preprocessor/cppadd.h:159: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 *incdir[NINCLUDE]; /* -i directories */ data/grcompiler-5.2/preprocessor/cppadd.h:165: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 *include[NINCLUDE]; data/grcompiler-5.2/preprocessor/cppadd.h:166: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 includeshow[NINCLUDE]; /* show it or not! */ data/grcompiler-5.2/preprocessor/cppadd.h:175: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 *preset[5]; /* names defined at cpp start */ data/grcompiler-5.2/preprocessor/cppadd.h:181: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 *magic[5]; /* Note: order is important */ data/grcompiler-5.2/preprocessor/cppadd.h:197: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 parm[NPARMWORK + 1]; /* define param work buffer */ data/grcompiler-5.2/preprocessor/cppadd.h:199: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 *parlist[LASTPARM]; /* -> start of each parameter */ data/grcompiler-5.2/preprocessor/cppadd.h:252: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 *excludedinit[20]; /* functions (names) excluded from the initfunc */ data/grcompiler-5.2/preprocessor/memory.c:103: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(new, ptr, point->size); /* copy contents */ data/grcompiler-5.2/preprocessor/usecpp.c:303: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 ( (PrefsFile_PF = fopen(CPP_PREFS_FILE, "r")) || data/grcompiler-5.2/preprocessor/usecpp.c:304:23: [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). (PrefsFile_PF = fopen(DEFAULT_CPP_PREFS_FILE, "r"))) { data/grcompiler-5.2/preprocessor/usecpp.c:338: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 *argv[MAX_TAGS]; data/grcompiler-5.2/test/GrcRegressionTest/GrcRegressionTest.cpp:27: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 g_logFileName[128]; data/grcompiler-5.2/test/GrcRegressionTest/GrcRegressionTest.cpp:102:6: [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(g_logFileName, "grcregtest.log"); data/grcompiler-5.2/test/GrcRegressionTest/GrcRegressionTest.cpp:104:12: [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). g_strmLog.open(g_logFileName, std::ios_base::out | std::ios_base::app ); data/grcompiler-5.2/test/GrcRegressionTest/GrcRtFileFont.cpp:112:11: [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). m_file = fopen(fileName.c_str(), "rb"); data/grcompiler-5.2/compiler/Compiler.cpp:2370: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). int cchLen = strlen(pchOutputFilename); data/grcompiler-5.2/compiler/Generic/Platform.cpp:41:17: [1] (buffer) wcsncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). return (utf16*)wcsncpy((wchar_t*)dest, (const wchar_t*)src, n); data/grcompiler-5.2/compiler/Generic/Platform.cpp:49: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). Platform_AnsiToUnicode(src, strlen(src), dest, n); data/grcompiler-5.2/compiler/Generic/Platform.cpp:57:9: [1] (buffer) wcslen: 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 wcslen((const wchar_t*)s); data/grcompiler-5.2/compiler/Generic/Platform.cpp:167: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). Platform_AnsiToUnicode(src, strlen(src), dest, n); data/grcompiler-5.2/compiler/Generic/Platform.cpp:352: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). src_count = strlen(source); // length of the source it's self data/grcompiler-5.2/compiler/Generic/Throwable.h:42:27: [1] (buffer) wcslen: 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). m_pszMsg = new wchar_t[wcslen(pszMsg)+1];//.Assign(pszMsg); data/grcompiler-5.2/compiler/Generic/Throwable.h:103:25: [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). m_pszDump = new char[strlen(pszDump)+1]; data/grcompiler-5.2/compiler/Generic/UtilString.cpp:638:12: [1] (buffer) wcslen: 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). *pcch = wcslen(cszResourceString[i].pszText); data/grcompiler-5.2/compiler/GrcErrorList.cpp:440:31: [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 * pchEnd = pchGdlFile + strlen(pchGdlFile); data/grcompiler-5.2/compiler/GrcFont.cpp:59:26: [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 cch = pchFontFile ? strlen(pchFontFile) + 1: 0; data/grcompiler-5.2/compiler/GrcFont.cpp:879:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(chTableTag, (char *)&lnTableTag, 4); data/grcompiler-5.2/compiler/OutputToFont.cpp:90:13: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). strmSrc.read((char *)&offsetTableSrc, lSize + lOffset); data/grcompiler-5.2/compiler/OutputToFont.cpp:92:24: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). uint16 cTableSrc = read(offsetTableSrc.num_tables); data/grcompiler-5.2/compiler/OutputToFont.cpp:94:13: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). strmSrc.read((char *)pDirEntrySrc, lSize); data/grcompiler-5.2/compiler/OutputToFont.cpp:120:16: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). uint32 tag = read(pDirEntrySrc[iTable].tag); data/grcompiler-5.2/compiler/OutputToFont.cpp:149:11: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). strmMin.read((char *)&offsetTableMin, lOffset + lSize); data/grcompiler-5.2/compiler/OutputToFont.cpp:150:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(offsetTableMin.scaler_type) != OneFix) data/grcompiler-5.2/compiler/OutputToFont.cpp:152:24: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int cTableIn = read(offsetTableMin.num_tables); data/grcompiler-5.2/compiler/OutputToFont.cpp:155:17: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). strmSrc.read((char *)&pDirEntryMin, lSize); data/grcompiler-5.2/compiler/OutputToFont.cpp:160:17: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). strmSrc.read((char *)pbTableHeadSrc, iTableHeadLen); data/grcompiler-5.2/compiler/OutputToFont.cpp:192:16: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). uint32 tag = read(pDirEntrySrc[iTable].tag); data/grcompiler-5.2/compiler/OutputToFont.cpp:208:32: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). pOffsetTableOut->num_tables = read(cTableOut); data/grcompiler-5.2/compiler/OutputToFont.cpp:210:34: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). pOffsetTableOut->search_range = read(suTmp); data/grcompiler-5.2/compiler/OutputToFont.cpp:212:36: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). pOffsetTableOut->entry_selector = read(suTmp); data/grcompiler-5.2/compiler/OutputToFont.cpp:214:33: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). pOffsetTableOut->range_shift = read(suTmp); data/grcompiler-5.2/compiler/OutputToFont.cpp:234:12: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). cbSize = read(pDirEntryCopy[iSrc].length); // dir entries are word aligned already data/grcompiler-5.2/compiler/OutputToFont.cpp:235:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ibOffset = read(pDirEntryCopy[iSrc].offset); data/grcompiler-5.2/compiler/OutputToFont.cpp:239:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). pstrmCopy->read((char *)pbTable, cbSize); data/grcompiler-5.2/compiler/OutputToFont.cpp:241:16: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). uint32 tag = read(pDirEntryCopy[iSrc].tag); data/grcompiler-5.2/compiler/OutputToFont.cpp:256:20: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int cbSizeSrc = read(pDirEntrySrc[iTableOS2Src].length); data/grcompiler-5.2/compiler/OutputToFont.cpp:257:22: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int ibOffsetSrc = read(pDirEntrySrc[iTableOS2Src].offset); data/grcompiler-5.2/compiler/OutputToFont.cpp:261:12: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). strmSrc.read((char *)pbTableSrc, cbSizeSrc); data/grcompiler-5.2/compiler/OutputToFont.cpp:266:32: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). pDirEntryOut[iOut].length = read(cbSize); data/grcompiler-5.2/compiler/OutputToFont.cpp:276:20: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int cbSizeSrc = read(pDirEntrySrc[iTableCmapSrc].length); data/grcompiler-5.2/compiler/OutputToFont.cpp:277:22: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int ibOffsetSrc = read(pDirEntrySrc[iTableCmapSrc].offset); data/grcompiler-5.2/compiler/OutputToFont.cpp:281:12: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). strmSrc.read((char *)pbTableSrc, cbSizeSrc); data/grcompiler-5.2/compiler/OutputToFont.cpp:285:32: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). pDirEntryOut[iOut].length = read(cbSize); data/grcompiler-5.2/compiler/OutputToFont.cpp:297:33: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). pDirEntryOut[iOut].length = read(cbSize); data/grcompiler-5.2/compiler/OutputToFont.cpp:313:31: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). pDirEntryOut[iOut].offset = read(ibTableOffset); data/grcompiler-5.2/compiler/OutputToFont.cpp:331:32: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). pDirEntryOut[nCurTable].tag = read(TableIdTag(ktiGloc)); data/grcompiler-5.2/compiler/OutputToFont.cpp:332:35: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). pDirEntryOut[nCurTable].length = read(cbSize); data/grcompiler-5.2/compiler/OutputToFont.cpp:333:35: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). pDirEntryOut[nCurTable].offset = read(ibOffset); data/grcompiler-5.2/compiler/OutputToFont.cpp:337:32: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). pDirEntryOut[nCurTable].tag = read(TableIdTag(ktiGlat)); data/grcompiler-5.2/compiler/OutputToFont.cpp:338:35: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). pDirEntryOut[nCurTable].length = read(cbSize2); data/grcompiler-5.2/compiler/OutputToFont.cpp:339:35: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). pDirEntryOut[nCurTable].offset = read(ibOffset2); data/grcompiler-5.2/compiler/OutputToFont.cpp:344:32: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). pDirEntryOut[nCurTable].tag = read(TableIdTag(ktiSilf)); data/grcompiler-5.2/compiler/OutputToFont.cpp:345:35: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). pDirEntryOut[nCurTable].length = read(cbSize); data/grcompiler-5.2/compiler/OutputToFont.cpp:346:35: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). pDirEntryOut[nCurTable].offset = read(ibOffset); data/grcompiler-5.2/compiler/OutputToFont.cpp:351:32: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). pDirEntryOut[nCurTable].tag = read(TableIdTag(ktiFeat)); data/grcompiler-5.2/compiler/OutputToFont.cpp:352:35: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). pDirEntryOut[nCurTable].length = read(cbSize); data/grcompiler-5.2/compiler/OutputToFont.cpp:353:35: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). pDirEntryOut[nCurTable].offset = read(ibOffset); data/grcompiler-5.2/compiler/OutputToFont.cpp:358:32: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). pDirEntryOut[nCurTable].tag = read(TableIdTag(ktiSill)); data/grcompiler-5.2/compiler/OutputToFont.cpp:359:35: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). pDirEntryOut[nCurTable].length = read(cbSize); data/grcompiler-5.2/compiler/OutputToFont.cpp:360:35: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). pDirEntryOut[nCurTable].offset = read(ibOffset); data/grcompiler-5.2/compiler/OutputToFont.cpp:370:33: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). pDirEntryOut[nCurTable].tag = read(TableIdTag(ktiSile)); data/grcompiler-5.2/compiler/OutputToFont.cpp:371:36: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). pDirEntryOut[nCurTable].length = read(cbSize); data/grcompiler-5.2/compiler/OutputToFont.cpp:372:36: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). pDirEntryOut[nCurTable].offset = read(ibOffset); data/grcompiler-5.2/compiler/OutputToFont.cpp:385:21: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). cbSize = PadLong(read(pDirEntryOut[iOut].length)); // find table size (tables are padded) data/grcompiler-5.2/compiler/OutputToFont.cpp:388:19: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). bstrmDst.seekg(read(pDirEntryOut[iOut].offset)); data/grcompiler-5.2/compiler/OutputToFont.cpp:389:13: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). bstrmDst.read((char *)pbTable, cbSize); data/grcompiler-5.2/compiler/OutputToFont.cpp:391:34: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). pDirEntryOut[iOut].checksum = read(luCheckSum); data/grcompiler-5.2/compiler/OutputToFont.cpp:400:17: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). luCheckSum += read(pDirEntryOut[iOut].checksum); data/grcompiler-5.2/compiler/OutputToFont.cpp:420:11: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). bstrmDst.read((char *)pbTable, cbHeadSize); // read the head table data/grcompiler-5.2/compiler/OutputToFont.cpp:421:50: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ((FontHeader *)pbTable)->check_sum_adjustment = read(luCheckSum); data/grcompiler-5.2/compiler/OutputToFont.cpp:446:10: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). strmSrc.read((char *)pNameTbl, iTableNameLen); data/grcompiler-5.2/compiler/OutputToFont.cpp:451:13: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). strmSrc.read((char *)pFeatTbl, iTableFeatLen); data/grcompiler-5.2/compiler/OutputToFont.cpp:454:16: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int version = read(*((uint32*)p)); p += 4; data/grcompiler-5.2/compiler/OutputToFont.cpp:455:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int cfeat = read(*((uint16*)p)); p +=2; data/grcompiler-5.2/compiler/OutputToFont.cpp:457:17: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). uint16 tmp16 = read(*((uint16*)p)); p +=2; data/grcompiler-5.2/compiler/OutputToFont.cpp:458:17: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). uint32 tmp32 = read(*((uint32*)p)); p += 4; data/grcompiler-5.2/compiler/OutputToFont.cpp:467:16: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). pfeat->SetID(read(*((uint32*)p))); p += 4; data/grcompiler-5.2/compiler/OutputToFont.cpp:468:15: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int cfset = read(*((uint16*)p)); p +=2; data/grcompiler-5.2/compiler/OutputToFont.cpp:469:11: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). tmp16 = read(*((uint16*)p)); p +=2; // reserved data/grcompiler-5.2/compiler/OutputToFont.cpp:470:16: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int offset = read(*((uint32*)p)); p += 4; data/grcompiler-5.2/compiler/OutputToFont.cpp:471:15: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int flags = read(*((uint16*)p)); p +=2; data/grcompiler-5.2/compiler/OutputToFont.cpp:472:17: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int nNameID = read(*((uint16*)p)); p +=2; data/grcompiler-5.2/compiler/OutputToFont.cpp:487:20: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). pfset->SetValue(read(*((uint16*)p))); p +=2; data/grcompiler-5.2/compiler/OutputToFont.cpp:488:19: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int nNameID = (read(*((uint16*)p))); p +=2; data/grcompiler-5.2/compiler/OutputToFont.cpp:519:20: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). uint16 cRecords = read(pTblOld->count); data/grcompiler-5.2/compiler/OutputToFont.cpp:520:23: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). uint16 ibStrOffset = read(pTblOld->string_offset); data/grcompiler-5.2/compiler/OutputToFont.cpp:542:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(pRecord[iRecord].name_id) == n_family) data/grcompiler-5.2/compiler/OutputToFont.cpp:544:16: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int nPlat = read(pRecord[iRecord].platform_id); data/grcompiler-5.2/compiler/OutputToFont.cpp:545:15: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int nEnc = read(pRecord[iRecord].platform_specific_id); data/grcompiler-5.2/compiler/OutputToFont.cpp:546:16: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int nLang = read(pRecord[iRecord].language_id); data/grcompiler-5.2/compiler/OutputToFont.cpp:581:22: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). cbOldStringData += read(pRecord[iRecord].length); data/grcompiler-5.2/compiler/OutputToFont.cpp:582:36: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). nMaxNameId = max(nMaxNameId, int(read(pRecord[iRecord].name_id))); data/grcompiler-5.2/compiler/OutputToFont.cpp:657:52: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ibSubFamilyOffset = (irecSubFamily == -1) ? 0 : read(pRecord[irecSubFamily].offset) + ibStrOffset; data/grcompiler-5.2/compiler/OutputToFont.cpp:658:46: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). cbSubFamily = (irecSubFamily == -1) ? 0 : read(pRecord[irecSubFamily].length); data/grcompiler-5.2/compiler/OutputToFont.cpp:659:46: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ibVendorOffset = (irecVendor == -1) ? 0 : read(pRecord[irecVendor].offset) + ibStrOffset; data/grcompiler-5.2/compiler/OutputToFont.cpp:660:40: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). cbVendor = (irecVendor == -1) ? 0 : read(pRecord[irecVendor].length); data/grcompiler-5.2/compiler/OutputToFont.cpp:676:21: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). dbStringDiff -= read(pRecord[irecFamilyName].length); data/grcompiler-5.2/compiler/OutputToFont.cpp:681:21: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). dbStringDiff -= read(pRecord[irecFullName].length); data/grcompiler-5.2/compiler/OutputToFont.cpp:686:21: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). dbStringDiff -= read(pRecord[irecUniqueName].length); data/grcompiler-5.2/compiler/OutputToFont.cpp:691:21: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). dbStringDiff -= read(pRecord[irecPSName].length); data/grcompiler-5.2/compiler/OutputToFont.cpp:696:21: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). dbStringDiff -= read(pRecord[irecPrefFamily].length); data/grcompiler-5.2/compiler/OutputToFont.cpp:701:21: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). dbStringDiff -= read(pRecord[irecCompatibleFull].length); data/grcompiler-5.2/compiler/OutputToFont.cpp:771:33: [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). std::copy(tempDate, tempDate + strlen(tempDate), stuDate); data/grcompiler-5.2/compiler/OutputToFont.cpp:796:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(pRecord->platform_id) == suPlatformId && data/grcompiler-5.2/compiler/OutputToFont.cpp:797:4: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read(pRecord->platform_specific_id) == suEncodingId) data/grcompiler-5.2/compiler/OutputToFont.cpp:800:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(pRecord->language_id) == suLangId) data/grcompiler-5.2/compiler/OutputToFont.cpp:802:21: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). uint16 nameID = read(pRecord->name_id); data/grcompiler-5.2/compiler/OutputToFont.cpp:865:76: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). std::transform(sub_family.begin(), sub_family.end(), sub_family.begin(), read<uint16>); data/grcompiler-5.2/compiler/OutputToFont.cpp:868:64: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). std::transform(vendor.begin(), vendor.end(), vendor.begin(), read<uint16>); data/grcompiler-5.2/compiler/OutputToFont.cpp:933:12: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). return read(p1->nPlatId) - read(p2->nPlatId); data/grcompiler-5.2/compiler/OutputToFont.cpp:933:32: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). return read(p1->nPlatId) - read(p2->nPlatId); data/grcompiler-5.2/compiler/OutputToFont.cpp:935:12: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). return read(p1->nEncId) - read(p2->nEncId); data/grcompiler-5.2/compiler/OutputToFont.cpp:935:31: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). return read(p1->nEncId) - read(p2->nEncId); data/grcompiler-5.2/compiler/OutputToFont.cpp:937:12: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). return read(p1->nLangId) - read(p2->nLangId); data/grcompiler-5.2/compiler/OutputToFont.cpp:937:32: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). return read(p1->nLangId) - read(p2->nLangId); data/grcompiler-5.2/compiler/OutputToFont.cpp:939:12: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). return read(p1->nNameId) - read(p2->nNameId); data/grcompiler-5.2/compiler/OutputToFont.cpp:939:32: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). return read(p1->nNameId) - read(p2->nNameId); data/grcompiler-5.2/compiler/OutputToFont.cpp:944:19: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). uint16 crecOld = read(pTbl->count); data/grcompiler-5.2/compiler/OutputToFont.cpp:945:26: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). uint16 ibStrOffsetOld = read(pTbl->string_offset); data/grcompiler-5.2/compiler/OutputToFont.cpp:954:34: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ((FontNames *)pTblNew)->count = read(crecNew); data/grcompiler-5.2/compiler/OutputToFont.cpp:956:42: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ((FontNames *)pTblNew)->string_offset = read(ibStrOffsetNew); data/grcompiler-5.2/compiler/OutputToFont.cpp:986:27: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). && (ppec->platformID < read(pOldRecord[irec].platform_id) data/grcompiler-5.2/compiler/OutputToFont.cpp:987:29: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). || (ppec->platformID == read(pOldRecord[irec].platform_id) data/grcompiler-5.2/compiler/OutputToFont.cpp:988:28: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). && ppec->encodingID < read(pOldRecord[irec].platform_specific_id)))) data/grcompiler-5.2/compiler/OutputToFont.cpp:1006:27: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). && ppec->platformID == read(pOldRecord[irec].platform_id) data/grcompiler-5.2/compiler/OutputToFont.cpp:1007:27: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). && ppec->encodingID == read(pOldRecord[irec].platform_specific_id) data/grcompiler-5.2/compiler/OutputToFont.cpp:1008:26: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). && ppec->engLangID == read(pOldRecord[irec].language_id)) data/grcompiler-5.2/compiler/OutputToFont.cpp:1010:20: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). uint16 nameID = read(pOldRecord[irec].name_id); data/grcompiler-5.2/compiler/OutputToFont.cpp:1039:30: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). pNewRecord[irec].length = read(cbStr); data/grcompiler-5.2/compiler/OutputToFont.cpp:1054:12: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). cbStr = read(pOldRecord[irec].length); data/grcompiler-5.2/compiler/OutputToFont.cpp:1055:39: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). pbStr = pTblOld + ibStrOffsetOld + read(pOldRecord[irec].offset); data/grcompiler-5.2/compiler/OutputToFont.cpp:1058:29: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). pNewRecord[irec].offset = read(dibNew); data/grcompiler-5.2/compiler/OutputToFont.cpp:1077:35: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). pNewRecord[irec].platform_id = read(ppec->platformID); data/grcompiler-5.2/compiler/OutputToFont.cpp:1078:44: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). pNewRecord[irec].platform_specific_id = read(ppec->encodingID); data/grcompiler-5.2/compiler/OutputToFont.cpp:1079:35: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). pNewRecord[irec].language_id = read(vnLangIds[istring]); data/grcompiler-5.2/compiler/OutputToFont.cpp:1080:31: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). pNewRecord[irec].name_id = read(vnNameTblIds[istring]); data/grcompiler-5.2/compiler/OutputToFont.cpp:1141:30: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). pNewRecord[irec].length = read(cbStr); data/grcompiler-5.2/compiler/OutputToFont.cpp:1143:5: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read(vdibOffsets8[istring]): data/grcompiler-5.2/compiler/OutputToFont.cpp:1144:5: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read(vdibOffsets16[istring]); data/grcompiler-5.2/compiler/OutputToFont.cpp:1713: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). int cchFile = strlen(pchSrcFileName); data/grcompiler-5.2/compiler/OutputToFont.cpp:2503:24: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). uint32 const hdr = read((m_tcCompressor << 27) | (nSize & 0x07ffffff)); data/grcompiler-5.2/compiler/OutputToFont.cpp:3650:23: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). unsigned int lTmp1 = read(((OffsetSubTable::Entry *)ptr1)->tag); data/grcompiler-5.2/compiler/OutputToFont.cpp:3651:23: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). unsigned int lTmp2 = read(((OffsetSubTable::Entry *)ptr2)->tag); data/grcompiler-5.2/compiler/OutputToFont.cpp:3668:17: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). luCheckSum += read(*element); data/grcompiler-5.2/compiler/ParserTreeWalker.cpp:97: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). int cchOutputPath = strlen(staOutputPath.data()); data/grcompiler-5.2/compiler/ParserTreeWalker.cpp:98:38: [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 cchPreProcErr = cchOutputPath + strlen(_T("\\$_gdlpp_stderr.txt")) + 1; data/grcompiler-5.2/compiler/TtfTypes.h:66:32: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). template<typename T> inline T read(const T d) { data/grcompiler-5.2/compiler/TtfTypes.h:71:27: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). template<> inline uint16 read(const uint16 d) { data/grcompiler-5.2/compiler/TtfTypes.h:75:26: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). template<> inline int16 read(const int16 d) { data/grcompiler-5.2/compiler/TtfTypes.h:79:27: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). template<> inline uint32 read(const uint32 d) { data/grcompiler-5.2/compiler/TtfTypes.h:83:26: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). template<> inline int32 read(const int32 d) { data/grcompiler-5.2/compiler/TtfUtil.cpp:168:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). return read(pOffsetTable->scaler_type) == Sfnt::OffsetSubTable::TrueTypeWin; data/grcompiler-5.2/compiler/TtfUtil.cpp:181:12: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). lSize = read(pOffsetTable->num_tables) data/grcompiler-5.2/compiler/TtfUtil.cpp:208:34: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). * const dir_end = entry_itr + read(pOffsetTable->num_tables); data/grcompiler-5.2/compiler/TtfUtil.cpp:210:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). assert(read(pOffsetTable->num_tables) < 40); data/grcompiler-5.2/compiler/TtfUtil.cpp:211:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(pOffsetTable->num_tables) > 40) data/grcompiler-5.2/compiler/TtfUtil.cpp:216:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(entry_itr->tag) == lTableTag) data/grcompiler-5.2/compiler/TtfUtil.cpp:218:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). lOffset = read(entry_itr->offset); data/grcompiler-5.2/compiler/TtfUtil.cpp:219:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). lSize = read(entry_itr->length); data/grcompiler-5.2/compiler/TtfUtil.cpp:241:10: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). assert(read(pCmap->version) == 0); data/grcompiler-5.2/compiler/TtfUtil.cpp:242:10: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). return read(pCmap->version) == 0; data/grcompiler-5.2/compiler/TtfUtil.cpp:249:12: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). bool r = read(pHead->version) == OneFix data/grcompiler-5.2/compiler/TtfUtil.cpp:250:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). && read(pHead->magic_number) == FontHeader::MagicNumber data/grcompiler-5.2/compiler/TtfUtil.cpp:251:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). && read(pHead->glyph_data_format) data/grcompiler-5.2/compiler/TtfUtil.cpp:253:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). && (read(pHead->index_to_loc_format) data/grcompiler-5.2/compiler/TtfUtil.cpp:255:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). || read(pHead->index_to_loc_format) data/grcompiler-5.2/compiler/TtfUtil.cpp:265:24: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). const fixed format = read(pPost->format); data/grcompiler-5.2/compiler/TtfUtil.cpp:277:12: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). bool r = read(pHhea->version) == OneFix data/grcompiler-5.2/compiler/TtfUtil.cpp:278:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). && read(pHhea->metric_data_format) == 0 data/grcompiler-5.2/compiler/TtfUtil.cpp:287:12: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). bool r = read(pMaxp->version) == OneFix data/grcompiler-5.2/compiler/TtfUtil.cpp:296:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(pOs2->version) == 0) data/grcompiler-5.2/compiler/TtfUtil.cpp:304:12: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). else if (read(pOs2->version) == 1) data/grcompiler-5.2/compiler/TtfUtil.cpp:312:12: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). else if (read(pOs2->version) == 2) data/grcompiler-5.2/compiler/TtfUtil.cpp:317:12: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). else if (read(pOs2->version) >= 3) data/grcompiler-5.2/compiler/TtfUtil.cpp:331:10: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). assert(read(pName->format) == 0); data/grcompiler-5.2/compiler/TtfUtil.cpp:332:10: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). return read(pName->format) == 0; data/grcompiler-5.2/compiler/TtfUtil.cpp:351:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). return read(pTable->num_glyphs); data/grcompiler-5.2/compiler/TtfUtil.cpp:363:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). return read(pTable->max_component_elements); data/grcompiler-5.2/compiler/TtfUtil.cpp:377:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). return read(pTable->max_component_depth); data/grcompiler-5.2/compiler/TtfUtil.cpp:392:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(pTable->index_to_loc_format) data/grcompiler-5.2/compiler/TtfUtil.cpp:397:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(pTable->index_to_loc_format) data/grcompiler-5.2/compiler/TtfUtil.cpp:414:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). return read(pTable->units_per_em); data/grcompiler-5.2/compiler/TtfUtil.cpp:425:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). return read(pTable->check_sum_adjustment); data/grcompiler-5.2/compiler/TtfUtil.cpp:440:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). *pnDateBC = read(pTable->created[0]); data/grcompiler-5.2/compiler/TtfUtil.cpp:441:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). *pnDateAD = read(pTable->created[1]); data/grcompiler-5.2/compiler/TtfUtil.cpp:456:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). *pnDateBC = read(pTable->modified[0]); data/grcompiler-5.2/compiler/TtfUtil.cpp:457:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). *pnDateAD = read(pTable->modified[1]); data/grcompiler-5.2/compiler/TtfUtil.cpp:468:11: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). return ((read(pTable->mac_style) & 0x00000002) != 0); data/grcompiler-5.2/compiler/TtfUtil.cpp:478:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). return read(pTable->win_ascent); data/grcompiler-5.2/compiler/TtfUtil.cpp:488:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). return read(pTable->win_descent); data/grcompiler-5.2/compiler/TtfUtil.cpp:502:11: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). fBold = (read(pTable->fs_selection) & Sfnt::Compatibility::Bold) != 0; data/grcompiler-5.2/compiler/TtfUtil.cpp:503:13: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). fItalic = (read(pTable->fs_selection) & Sfnt::Compatibility::Italic) != 0; data/grcompiler-5.2/compiler/TtfUtil.cpp:518:19: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). uint16 cRecord = read(pTable->count); data/grcompiler-5.2/compiler/TtfUtil.cpp:519:25: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). uint16 nRecordOffset = read(pTable->string_offset); data/grcompiler-5.2/compiler/TtfUtil.cpp:524:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(pRecord->platform_id) == nPlatformId && data/grcompiler-5.2/compiler/TtfUtil.cpp:525:4: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read(pRecord->platform_specific_id) == nEncodingId && data/grcompiler-5.2/compiler/TtfUtil.cpp:526:4: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read(pRecord->language_id) == nLangId && data/grcompiler-5.2/compiler/TtfUtil.cpp:527:4: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read(pRecord->name_id) == nNameId) data/grcompiler-5.2/compiler/TtfUtil.cpp:529:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). lOffset = read(pRecord->offset) + nRecordOffset; data/grcompiler-5.2/compiler/TtfUtil.cpp:530:12: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). lSize = read(pRecord->length); data/grcompiler-5.2/compiler/TtfUtil.cpp:547:19: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). uint16 cRecord = read(pTable->count); data/grcompiler-5.2/compiler/TtfUtil.cpp:548:25: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). uint16 nRecordOffset = read(pTable->string_offset); data/grcompiler-5.2/compiler/TtfUtil.cpp:553:22: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int lOffsetTable = read(pRecord->offset) + nRecordOffset; data/grcompiler-5.2/compiler/TtfUtil.cpp:554:23: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). size_t lSizeTable = read(pRecord->length); data/grcompiler-5.2/compiler/TtfUtil.cpp:559:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(pRecord->platform_id) == Sfnt::NameRecord::Macintosh) data/grcompiler-5.2/compiler/TtfUtil.cpp:575:19: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). nPlatformId = read(pRecord->platform_id); data/grcompiler-5.2/compiler/TtfUtil.cpp:576:19: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). nEncodingId = read(pRecord->platform_specific_id); data/grcompiler-5.2/compiler/TtfUtil.cpp:577:15: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). nLangId = read(pRecord->language_id); data/grcompiler-5.2/compiler/TtfUtil.cpp:578:15: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). nNameId = read(pRecord->name_id); data/grcompiler-5.2/compiler/TtfUtil.cpp:598:19: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). uint16 cRecord = read(pTable->count); data/grcompiler-5.2/compiler/TtfUtil.cpp:605:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(pRecord->platform_id) == nPlatformId && data/grcompiler-5.2/compiler/TtfUtil.cpp:606:4: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read(pRecord->platform_specific_id) == nEncodingId) data/grcompiler-5.2/compiler/TtfUtil.cpp:609:18: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int nLangId = read(pRecord->language_id); data/grcompiler-5.2/compiler/TtfUtil.cpp:610:18: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int nNameId = read(pRecord->name_id); data/grcompiler-5.2/compiler/TtfUtil.cpp:706:17: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). fixed format = read(pTable->format); data/grcompiler-5.2/compiler/TtfUtil.cpp:751:18: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int cnGlyphs = read(pTable2->number_of_glyphs); data/grcompiler-5.2/compiler/TtfUtil.cpp:757:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(pTable2->glyph_name_index[nGlyphId]) == iPostName) data/grcompiler-5.2/compiler/TtfUtil.cpp:763:26: [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 nStrSizeGoal = strlen(pPostName); data/grcompiler-5.2/compiler/TtfUtil.cpp:791:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(pTable2->glyph_name_index[nGlyphId]) == iInNames) data/grcompiler-5.2/compiler/TtfUtil.cpp:817:38: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). std::transform(pStr, pStrEnd, pStr, read<uint16>); data/grcompiler-5.2/compiler/TtfUtil.cpp:838:27: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). size_t cLongHorMetrics = read(phhea->num_long_hor_metrics); data/grcompiler-5.2/compiler/TtfUtil.cpp:841:13: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). nAdvWid = read(phmtx[nGlyphId].advance_width); data/grcompiler-5.2/compiler/TtfUtil.cpp:842:10: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). nLsb = read(phmtx[nGlyphId].left_side_bearing); data/grcompiler-5.2/compiler/TtfUtil.cpp:846:13: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). nAdvWid = read(phmtx[cLongHorMetrics - 1].advance_width); data/grcompiler-5.2/compiler/TtfUtil.cpp:858:10: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). nLsb = read(*pLsb); data/grcompiler-5.2/compiler/TtfUtil.cpp:876:24: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). uint16 csuPlatforms = read(pTable->num_subtables); data/grcompiler-5.2/compiler/TtfUtil.cpp:879:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(pTable->encoding[i].platform_id) == nPlatformId && data/grcompiler-5.2/compiler/TtfUtil.cpp:880:26: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). (nEncodingId == -1 || read(pTable->encoding[i].platform_specific_id) == nEncodingId)) data/grcompiler-5.2/compiler/TtfUtil.cpp:883:5: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read(pTable->encoding[i].offset); data/grcompiler-5.2/compiler/TtfUtil.cpp:900:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). return read(pTable->format) == 4; data/grcompiler-5.2/compiler/TtfUtil.cpp:912:16: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). uint16 nSeg = read(pTable->seg_count_x2) >> 1; data/grcompiler-5.2/compiler/TtfUtil.cpp:925:11: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). chEnd = read(*pMid); data/grcompiler-5.2/compiler/TtfUtil.cpp:928:34: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (cMid == 0 || nUnicodeId > read(pMid[-1])) data/grcompiler-5.2/compiler/TtfUtil.cpp:945:12: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). chStart = read(*(pMid += nSeg + 1)); data/grcompiler-5.2/compiler/TtfUtil.cpp:949:19: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int16 idDelta = read(*(pMid += nSeg)); data/grcompiler-5.2/compiler/TtfUtil.cpp:950:26: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). uint16 idRangeOffset = read(*(pMid += nSeg)); data/grcompiler-5.2/compiler/TtfUtil.cpp:956:24: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). gr::gid16 nGlyphId = read(*(pMid + (nUnicodeId - chStart) + (idRangeOffset >> 1))); data/grcompiler-5.2/compiler/TtfUtil.cpp:976:18: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). uint16 nRange = read(pTable->seg_count_x2) >> 1; data/grcompiler-5.2/compiler/TtfUtil.cpp:989:10: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). return read(pStartCode[0]); data/grcompiler-5.2/compiler/TtfUtil.cpp:1000:23: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while (iRange > 0 && read(pStartCode[iRange]) > nUnicodePrev) data/grcompiler-5.2/compiler/TtfUtil.cpp:1002:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while (read(pTable->end_code[iRange]) < nUnicodePrev) data/grcompiler-5.2/compiler/TtfUtil.cpp:1006:28: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). unsigned int nStartCode = read(pStartCode[iRange]); data/grcompiler-5.2/compiler/TtfUtil.cpp:1007:26: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). unsigned int nEndCode = read(pTable->end_code[iRange]); data/grcompiler-5.2/compiler/TtfUtil.cpp:1027:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). return read(pStartCode[iRange + 1]); data/grcompiler-5.2/compiler/TtfUtil.cpp:1038:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). return read(pTable->format) == 12; data/grcompiler-5.2/compiler/TtfUtil.cpp:1051:20: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). uint32 ucGroups = read(pTable->num_groups); data/grcompiler-5.2/compiler/TtfUtil.cpp:1055:23: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). uint32 uStartCode = read(pTable->group[i].start_char_code); data/grcompiler-5.2/compiler/TtfUtil.cpp:1056:21: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). uint32 uEndCode = read(pTable->group[i].end_char_code); data/grcompiler-5.2/compiler/TtfUtil.cpp:1060:23: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). uint32 uStartGid = read(pTable->group[i].start_glyph_id); data/grcompiler-5.2/compiler/TtfUtil.cpp:1080:15: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int nRange = read(pTable->num_groups); data/grcompiler-5.2/compiler/TtfUtil.cpp:1089:10: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). return read(pTable->group[0].start_char_code); data/grcompiler-5.2/compiler/TtfUtil.cpp:1100:23: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while (iRange > 0 && read(pTable->group[iRange].start_char_code) > nUnicodePrev) data/grcompiler-5.2/compiler/TtfUtil.cpp:1102:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while (read(pTable->group[iRange].end_char_code) < nUnicodePrev) data/grcompiler-5.2/compiler/TtfUtil.cpp:1107:28: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). unsigned int nStartCode = read(pTable->group[iRange].start_char_code); data/grcompiler-5.2/compiler/TtfUtil.cpp:1108:26: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). unsigned int nEndCode = read(pTable->group[iRange].end_char_code); data/grcompiler-5.2/compiler/TtfUtil.cpp:1126:45: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). return (iRange + 1 >= nRange) ? 0x10FFFF : read(pTable->group[iRange + 1].start_char_code); data/grcompiler-5.2/compiler/TtfUtil.cpp:1143:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(pTable->index_to_loc_format) == Sfnt::FontHeader::ShortIndexLocFormat) data/grcompiler-5.2/compiler/TtfUtil.cpp:1148:12: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). return (read(pShortTable[nGlyphId]) << 1); data/grcompiler-5.2/compiler/TtfUtil.cpp:1152:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(pTable->index_to_loc_format) == Sfnt::FontHeader::LongIndexLocFormat) data/grcompiler-5.2/compiler/TtfUtil.cpp:1157:11: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). return read(pLongTable[nGlyphId]); data/grcompiler-5.2/compiler/TtfUtil.cpp:1185:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). xMin = read(pGlyph->x_min); data/grcompiler-5.2/compiler/TtfUtil.cpp:1186:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). yMin = read(pGlyph->y_min); data/grcompiler-5.2/compiler/TtfUtil.cpp:1187:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). xMax = read(pGlyph->x_max); data/grcompiler-5.2/compiler/TtfUtil.cpp:1188:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). yMax = read(pGlyph->y_max); data/grcompiler-5.2/compiler/TtfUtil.cpp:1200:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). return read(pGlyph->number_of_contours); // -1 means composite glyph data/grcompiler-5.2/compiler/TtfUtil.cpp:1217:18: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int cContours = read(pGlyph->number_of_contours); data/grcompiler-5.2/compiler/TtfUtil.cpp:1223:28: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). prgnContourEndPoint[i] = read(pGlyph->end_pts_of_contours[i]); data/grcompiler-5.2/compiler/TtfUtil.cpp:1248:18: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int cContours = read(pGlyph->number_of_contours); data/grcompiler-5.2/compiler/TtfUtil.cpp:1252:13: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int cPts = read(pGlyph->end_pts_of_contours[cContours - 1]) + 1; data/grcompiler-5.2/compiler/TtfUtil.cpp:1261:16: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int cbHints = read(*(uint16 *)pbGlyph); data/grcompiler-5.2/compiler/TtfUtil.cpp:1315:20: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). prgnX[iFlag] = read(*(int16 *)pbGlyph); data/grcompiler-5.2/compiler/TtfUtil.cpp:1344:20: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). prgnY[iFlag] = read(*(int16 *)pbGlyph); data/grcompiler-5.2/compiler/TtfUtil.cpp:1380:16: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). GlyphFlags = read(*((uint16 *)pbGlyph)); data/grcompiler-5.2/compiler/TtfUtil.cpp:1382:32: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). prgnCompId[iCurrentComp++] = read(*((uint16 *)pbGlyph)); data/grcompiler-5.2/compiler/TtfUtil.cpp:1424:16: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). GlyphFlags = read(*((uint16 *)pbGlyph)); data/grcompiler-5.2/compiler/TtfUtil.cpp:1426:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(*((uint16 *)pbGlyph)) == nCompId) data/grcompiler-5.2/compiler/TtfUtil.cpp:1433:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). a = read(*(int16 *)pbGlyph); data/grcompiler-5.2/compiler/TtfUtil.cpp:1435:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). b = read(*(int16 *)pbGlyph); data/grcompiler-5.2/compiler/TtfUtil.cpp:1489:16: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). GlyphFlags = read(*((uint16 *)pbGlyph)); data/grcompiler-5.2/compiler/TtfUtil.cpp:1491:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(*((uint16 *)pbGlyph)) == nCompId) data/grcompiler-5.2/compiler/TtfUtil.cpp:1503:32: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). flt11 = fixed_to_float<14>(read(*(uint16 *)pbGlyph)); data/grcompiler-5.2/compiler/TtfUtil.cpp:1511:32: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). flt11 = fixed_to_float<14>(read(*(uint16 *)pbGlyph)); data/grcompiler-5.2/compiler/TtfUtil.cpp:1515:32: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). flt22 = fixed_to_float<14>(read(*(uint16 *)pbGlyph)); data/grcompiler-5.2/compiler/TtfUtil.cpp:1520:32: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). flt11 = fixed_to_float<14>(read(*(uint16 *)pbGlyph)); data/grcompiler-5.2/compiler/TtfUtil.cpp:1522:32: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). flt12 = fixed_to_float<14>(read(*(uint16 *)pbGlyph)); data/grcompiler-5.2/compiler/TtfUtil.cpp:1524:32: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). flt21 = fixed_to_float<14>(read(*(uint16 *)pbGlyph)); data/grcompiler-5.2/compiler/TtfUtil.cpp:1526:32: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). flt22 = fixed_to_float<14>(read(*(uint16 *)pbGlyph)); data/grcompiler-5.2/compiler/TtfUtil.cpp:1570:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(pTable->index_to_loc_format) == Sfnt::FontHeader::ShortIndexLocFormat) data/grcompiler-5.2/compiler/TtfUtil.cpp:1575:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(pTable->index_to_loc_format) == Sfnt::FontHeader::LongIndexLocFormat) data/grcompiler-5.2/compiler/main.cpp:193: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). Platform_AnsiToUnicode(pch, strlen(pch), rgchwOutputFontFamily, strlen(pch)); data/grcompiler-5.2/compiler/main.cpp:193:68: [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). Platform_AnsiToUnicode(pch, strlen(pch), rgchwOutputFontFamily, strlen(pch)); data/grcompiler-5.2/compiler/main.cpp:198:50: [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 (char * pchLp = pch; pchLp - pch < signed(strlen(pch)); pchLp++) data/grcompiler-5.2/compiler/main.cpp:343: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). int cchOutputPath = strlen(rgchOutputFile); data/grcompiler-5.2/compiler/main.cpp:434:7: [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(rgchOutputPath) == 0) data/grcompiler-5.2/preprocessor/cpp1.c:521:4: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(tempfunc, global->tokenbuf, MAX_FUNC_LENGTH); data/grcompiler-5.2/preprocessor/cpp1.c:624:8: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(tempfunc2, global->tokenbuf, MAX_FUNC_LENGTH); data/grcompiler-5.2/preprocessor/cpp2.c:738: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). len = strlen(*incptr); data/grcompiler-5.2/preprocessor/cpp2.c:740: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). if( len + strlen(filename) >= sizeof(tmpname) ) data/grcompiler-5.2/preprocessor/cpp2.c:809:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy( result, source, tp2 - source + 1 ); data/grcompiler-5.2/preprocessor/cpp4.c:378: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). size = strlen(text) + 1; data/grcompiler-5.2/preprocessor/cpp4.c:653: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). size = strlen(global->parlist[c]); data/grcompiler-5.2/preprocessor/cpp6.c:312: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). if ((int)strlen(token1) + (int)strlen(global->tokenbuf) >= NWORK) { data/grcompiler-5.2/preprocessor/cpp6.c:312:38: [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 ((int)strlen(token1) + (int)strlen(global->tokenbuf) >= NWORK) { data/grcompiler-5.2/preprocessor/cpp6.c:322:38: [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). global->workp = global->work + strlen(global->work); data/grcompiler-5.2/preprocessor/cpp6.c:569:27: [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). result = Getmem(global, strlen(text) + 1); data/grcompiler-5.2/preprocessor/cpp6.c:585: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). size = strlen(name); /* File/macro name */ data/grcompiler-5.2/preprocessor/cpp6.c:589: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). size = strlen(name); data/grcompiler-5.2/preprocessor/cpp6.c:1085:25: [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). ret = getfile(global, strlen(text) + 1, "", &file); data/grcompiler-5.2/test/GrcRegressionTest/GrcRegressionTest.cpp:99: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(g_logFileName) == 0) ANALYSIS SUMMARY: Hits = 556 Lines analyzed = 77611 in approximately 1.94 seconds (39920 lines/second) Physical Source Lines of Code (SLOC) = 54657 Hits@level = [0] 22 [1] 304 [2] 214 [3] 6 [4] 32 [5] 0 Hits@level+ = [0+] 578 [1+] 556 [2+] 252 [3+] 38 [4+] 32 [5+] 0 Hits/KSLOC@level+ = [0+] 10.575 [1+] 10.1725 [2+] 4.61057 [3+] 0.695245 [4+] 0.585469 [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.