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/ghc-8.10.2/driver/gcc/gcc.c
Examining data/ghc-8.10.2/driver/haddock/haddock.c
Examining data/ghc-8.10.2/driver/ghci/ghci.c
Examining data/ghc-8.10.2/driver/utils/isMinTTY.c
Examining data/ghc-8.10.2/driver/utils/getLocation.h
Examining data/ghc-8.10.2/driver/utils/cwrapper.h
Examining data/ghc-8.10.2/driver/utils/dynwrapper.c
Examining data/ghc-8.10.2/driver/utils/cwrapper.c
Examining data/ghc-8.10.2/driver/utils/getLocation.c
Examining data/ghc-8.10.2/driver/utils/isMinTTY.h
Examining data/ghc-8.10.2/driver/ghc/ghc.c
Examining data/ghc-8.10.2/compiler/Unique.h
Examining data/ghc-8.10.2/compiler/ghci/keepCAFsForGHCi.c
Examining data/ghc-8.10.2/compiler/parser/cutils.h
Examining data/ghc-8.10.2/compiler/parser/cutils.c
Examining data/ghc-8.10.2/compiler/cbits/genSym.c
Examining data/ghc-8.10.2/compiler/HsVersions.h
Examining data/ghc-8.10.2/utils/hsc2hs/template-hsc.h
Examining data/ghc-8.10.2/utils/hsc2hs/test/asm/tmp.c
Examining data/ghc-8.10.2/utils/hsc2hs/cbits/utils.c
Examining data/ghc-8.10.2/utils/lndir/lndir-Xosdefs.h
Examining data/ghc-8.10.2/utils/lndir/lndir.c
Examining data/ghc-8.10.2/utils/lndir/lndir-Xos.h
Examining data/ghc-8.10.2/utils/hp2ps/Scale.h
Examining data/ghc-8.10.2/utils/hp2ps/Curves.c
Examining data/ghc-8.10.2/utils/hp2ps/PsFile.c
Examining data/ghc-8.10.2/utils/hp2ps/Reorder.h
Examining data/ghc-8.10.2/utils/hp2ps/Main.c
Examining data/ghc-8.10.2/utils/hp2ps/HpFile.c
Examining data/ghc-8.10.2/utils/hp2ps/Key.h
Examining data/ghc-8.10.2/utils/hp2ps/HpFile.h
Examining data/ghc-8.10.2/utils/hp2ps/AreaBelow.h
Examining data/ghc-8.10.2/utils/hp2ps/Error.h
Examining data/ghc-8.10.2/utils/hp2ps/Error.c
Examining data/ghc-8.10.2/utils/hp2ps/Dimensions.h
Examining data/ghc-8.10.2/utils/hp2ps/AuxFile.c
Examining data/ghc-8.10.2/utils/hp2ps/PsFile.h
Examining data/ghc-8.10.2/utils/hp2ps/Shade.h
Examining data/ghc-8.10.2/utils/hp2ps/TopTwenty.h
Examining data/ghc-8.10.2/utils/hp2ps/Axes.c
Examining data/ghc-8.10.2/utils/hp2ps/Utilities.h
Examining data/ghc-8.10.2/utils/hp2ps/Deviation.h
Examining data/ghc-8.10.2/utils/hp2ps/TraceElement.h
Examining data/ghc-8.10.2/utils/hp2ps/Scale.c
Examining data/ghc-8.10.2/utils/hp2ps/TraceElement.c
Examining data/ghc-8.10.2/utils/hp2ps/Axes.h
Examining data/ghc-8.10.2/utils/hp2ps/Defines.h
Examining data/ghc-8.10.2/utils/hp2ps/Key.c
Examining data/ghc-8.10.2/utils/hp2ps/TopTwenty.c
Examining data/ghc-8.10.2/utils/hp2ps/AuxFile.h
Examining data/ghc-8.10.2/utils/hp2ps/Reorder.c
Examining data/ghc-8.10.2/utils/hp2ps/Curves.h
Examining data/ghc-8.10.2/utils/hp2ps/Dimensions.c
Examining data/ghc-8.10.2/utils/hp2ps/AreaBelow.c
Examining data/ghc-8.10.2/utils/hp2ps/Main.h
Examining data/ghc-8.10.2/utils/hp2ps/Utilities.c
Examining data/ghc-8.10.2/utils/hp2ps/Marks.c
Examining data/ghc-8.10.2/utils/hp2ps/Shade.c
Examining data/ghc-8.10.2/utils/hp2ps/Deviation.c
Examining data/ghc-8.10.2/utils/hp2ps/Marks.h
Examining data/ghc-8.10.2/utils/touchy/touchy.c
Examining data/ghc-8.10.2/utils/haddock/hypsrc-test/src/Include1For1091.h
Examining data/ghc-8.10.2/utils/haddock/hypsrc-test/src/Include2For1091.h
Examining data/ghc-8.10.2/utils/fs/fs.h
Examining data/ghc-8.10.2/utils/fs/fs.c
Examining data/ghc-8.10.2/utils/coverity/model.c
Examining data/ghc-8.10.2/utils/ghc-pkg/CRT_noglob.c
Examining data/ghc-8.10.2/utils/unlit/unlit.c
Examining data/ghc-8.10.2/utils/iserv/cbits/iservmain.c
Examining data/ghc-8.10.2/libraries/ghc-prim/cbits/pdep.c
Examining data/ghc-8.10.2/libraries/ghc-prim/cbits/bitrev.c
Examining data/ghc-8.10.2/libraries/ghc-prim/cbits/bswap.c
Examining data/ghc-8.10.2/libraries/ghc-prim/cbits/debug.c
Examining data/ghc-8.10.2/libraries/ghc-prim/cbits/longlong.c
Examining data/ghc-8.10.2/libraries/ghc-prim/cbits/word2float.c
Examining data/ghc-8.10.2/libraries/ghc-prim/cbits/clz.c
Examining data/ghc-8.10.2/libraries/ghc-prim/cbits/pext.c
Examining data/ghc-8.10.2/libraries/ghc-prim/cbits/ctz.c
Examining data/ghc-8.10.2/libraries/ghc-prim/cbits/popcnt.c
Examining data/ghc-8.10.2/libraries/ghc-prim/cbits/atomic.c
Examining data/ghc-8.10.2/libraries/text/benchmarks/cbits/time_iconv.c
Examining data/ghc-8.10.2/libraries/text/include/text_cbits.h
Examining data/ghc-8.10.2/libraries/text/cbits/cbits.c
Examining data/ghc-8.10.2/libraries/Win32/include/diatemp.h
Examining data/ghc-8.10.2/libraries/Win32/include/alignment.h
Examining data/ghc-8.10.2/libraries/Win32/include/winternl_compat.h
Examining data/ghc-8.10.2/libraries/Win32/include/WndProc.h
Examining data/ghc-8.10.2/libraries/Win32/include/winuser_compat.h
Examining data/ghc-8.10.2/libraries/Win32/include/win32debug.h
Examining data/ghc-8.10.2/libraries/Win32/include/alphablend.h
Examining data/ghc-8.10.2/libraries/Win32/include/HsWin32.h
Examining data/ghc-8.10.2/libraries/Win32/include/Win32Aux.h
Examining data/ghc-8.10.2/libraries/Win32/include/HsGDI.h
Examining data/ghc-8.10.2/libraries/Win32/include/dumpBMP.h
Examining data/ghc-8.10.2/libraries/Win32/include/ellipse.h
Examining data/ghc-8.10.2/libraries/Win32/include/errors.h
Examining data/ghc-8.10.2/libraries/Win32/include/windows_cconv.h
Examining data/ghc-8.10.2/libraries/Win32/cbits/HsGDI.c
Examining data/ghc-8.10.2/libraries/Win32/cbits/diatemp.c
Examining data/ghc-8.10.2/libraries/Win32/cbits/dumpBMP.c
Examining data/ghc-8.10.2/libraries/Win32/cbits/WndProc.c
Examining data/ghc-8.10.2/libraries/Win32/cbits/HsWin32.c
Examining data/ghc-8.10.2/libraries/Win32/cbits/ellipse.c
Examining data/ghc-8.10.2/libraries/Win32/cbits/alphablend.c
Examining data/ghc-8.10.2/libraries/Win32/cbits/errors.c
Examining data/ghc-8.10.2/libraries/integer-gmp/gmp/ghc-gmp.h
Examining data/ghc-8.10.2/libraries/integer-gmp/cbits/wrappers.c
Examining data/ghc-8.10.2/libraries/Cabal/Cabal/tests/cbits/rpmvercmp.c
Examining data/ghc-8.10.2/libraries/Cabal/cabal-testsuite/PackageTests/COnlyMain/foo.c
Examining data/ghc-8.10.2/libraries/Cabal/cabal-testsuite/PackageTests/Exec/T4049/csrc/MyForeignLibWrapper.c
Examining data/ghc-8.10.2/libraries/Cabal/cabal-testsuite/PackageTests/Exec/T4049/UseLib.c
Examining data/ghc-8.10.2/libraries/Cabal/cabal-testsuite/PackageTests/Regression/T5309/memoized-tcm/dynamicCharacterOperations.h
Examining data/ghc-8.10.2/libraries/Cabal/cabal-testsuite/PackageTests/Regression/T5309/memoized-tcm/costMatrixWrapper.h
Examining data/ghc-8.10.2/libraries/Cabal/cabal-testsuite/PackageTests/Regression/T5309/memoized-tcm/costMatrix.h
Examining data/ghc-8.10.2/libraries/Cabal/cabal-testsuite/PackageTests/Regression/T5309/memoized-tcm/costMatrix.cpp
Examining data/ghc-8.10.2/libraries/Cabal/cabal-testsuite/PackageTests/Regression/T5309/memoized-tcm/costMatrixWrapper.c
Examining data/ghc-8.10.2/libraries/Cabal/cabal-testsuite/PackageTests/Regression/T5309/memoized-tcm/dynamicCharacterOperations.c
Examining data/ghc-8.10.2/libraries/Cabal/cabal-testsuite/PackageTests/Regression/T2971a/include/T2971a.h
Examining data/ghc-8.10.2/libraries/Cabal/cabal-testsuite/PackageTests/Regression/T2971/p/include/T2971test.h
Examining data/ghc-8.10.2/libraries/Cabal/cabal-testsuite/PackageTests/Regression/T4720/bug/extra-inc/bug-extra-inc.h
Examining data/ghc-8.10.2/libraries/Cabal/cabal-testsuite/PackageTests/Regression/T4720/bug/cbits/bug.c
Examining data/ghc-8.10.2/libraries/Cabal/cabal-testsuite/PackageTests/ForeignLibs/csrc/MyForeignLibWrapper.c
Examining data/ghc-8.10.2/libraries/Cabal/cabal-testsuite/PackageTests/ForeignLibs/UseLib.c
Examining data/ghc-8.10.2/libraries/Cabal/cabal-testsuite/PackageTests/CMain/foo.c
Examining data/ghc-8.10.2/libraries/time/test/unix/Test/Format/FormatStuff.c
Examining data/ghc-8.10.2/libraries/time/test/unix/Test/Format/FormatStuff.h
Examining data/ghc-8.10.2/libraries/time/lib/include/HsTime.h
Examining data/ghc-8.10.2/libraries/time/lib/cbits/HsTime.c
Examining data/ghc-8.10.2/libraries/base/include/HsEvent.h
Examining data/ghc-8.10.2/libraries/base/include/HsBase.h
Examining data/ghc-8.10.2/libraries/base/include/CTypes.h
Examining data/ghc-8.10.2/libraries/base/include/consUtils.h
Examining data/ghc-8.10.2/libraries/base/include/ieee-flpt.h
Examining data/ghc-8.10.2/libraries/base/include/WCsubst.h
Examining data/ghc-8.10.2/libraries/base/include/md5.h
Examining data/ghc-8.10.2/libraries/base/tests/IO/T12010/cbits/initWinSock.c
Examining data/ghc-8.10.2/libraries/base/cbits/md5.c
Examining data/ghc-8.10.2/libraries/base/cbits/Win32Utils.c
Examining data/ghc-8.10.2/libraries/base/cbits/consUtils.c
Examining data/ghc-8.10.2/libraries/base/cbits/SetEnv.c
Examining data/ghc-8.10.2/libraries/base/cbits/iconv.c
Examining data/ghc-8.10.2/libraries/base/cbits/primFloat.c
Examining data/ghc-8.10.2/libraries/base/cbits/DarwinUtils.c
Examining data/ghc-8.10.2/libraries/base/cbits/sysconf.c
Examining data/ghc-8.10.2/libraries/base/cbits/inputReady.c
Examining data/ghc-8.10.2/libraries/base/cbits/PrelIOUtils.c
Examining data/ghc-8.10.2/libraries/base/cbits/WCsubst.c
Examining data/ghc-8.10.2/libraries/process/include/runProcess.h
Examining data/ghc-8.10.2/libraries/process/include/processFlags.h
Examining data/ghc-8.10.2/libraries/process/tests/T9775/ok.c
Examining data/ghc-8.10.2/libraries/process/tests/T9775/main.c
Examining data/ghc-8.10.2/libraries/process/tests/exitminus1.c
Examining data/ghc-8.10.2/libraries/process/tests/process007_fd.c
Examining data/ghc-8.10.2/libraries/process/cbits/runProcess.c
Examining data/ghc-8.10.2/libraries/binary/benchmarks/CBenchmark.c
Examining data/ghc-8.10.2/libraries/binary/benchmarks/CBenchmark.h
Examining data/ghc-8.10.2/libraries/unix/include/HsUnix.h
Examining data/ghc-8.10.2/libraries/unix/include/execvpe.h
Examining data/ghc-8.10.2/libraries/unix/cbits/HsUnix.c
Examining data/ghc-8.10.2/libraries/unix/cbits/execvpe.c
Examining data/ghc-8.10.2/libraries/libiserv/cbits/iservmain.c
Examining data/ghc-8.10.2/libraries/haskeline/examples/export/main.c
Examining data/ghc-8.10.2/libraries/haskeline/cbits/h_wcwidth.c
Examining data/ghc-8.10.2/libraries/haskeline/cbits/win_console.c
Examining data/ghc-8.10.2/libraries/haskeline/cbits/h_iconv.c
Examining data/ghc-8.10.2/libraries/haskeline/includes/h_iconv.h
Examining data/ghc-8.10.2/libraries/haskeline/includes/win_console.h
Examining data/ghc-8.10.2/libraries/haskeline/includes/windows_cconv.h
Examining data/ghc-8.10.2/libraries/containers/containers-tests/include/containers.h
Examining data/ghc-8.10.2/libraries/containers/containers/include/containers.h
Examining data/ghc-8.10.2/libraries/directory/System/Directory/Internal/windows_ext.h
Examining data/ghc-8.10.2/libraries/directory/System/Directory/Internal/utility.h
Examining data/ghc-8.10.2/libraries/bytestring/include/fpstring.h
Examining data/ghc-8.10.2/libraries/bytestring/cbits/itoa.c
Examining data/ghc-8.10.2/libraries/bytestring/cbits/fpstring.c
Examining data/ghc-8.10.2/ghc/hschooks.c
Examining data/ghc-8.10.2/includes/Rts.h
Examining data/ghc-8.10.2/includes/HsFFI.h
Examining data/ghc-8.10.2/includes/stg/Prim.h
Examining data/ghc-8.10.2/includes/stg/Types.h
Examining data/ghc-8.10.2/includes/stg/MachRegsForHost.h
Examining data/ghc-8.10.2/includes/stg/DLL.h
Examining data/ghc-8.10.2/includes/stg/SMP.h
Examining data/ghc-8.10.2/includes/stg/Ticky.h
Examining data/ghc-8.10.2/includes/stg/Regs.h
Examining data/ghc-8.10.2/includes/stg/MachRegs.h
Examining data/ghc-8.10.2/includes/stg/MiscClosures.h
Examining data/ghc-8.10.2/includes/RtsAPI.h
Examining data/ghc-8.10.2/includes/MachDeps.h
Examining data/ghc-8.10.2/includes/ghcconfig.h
Examining data/ghc-8.10.2/includes/Stg.h
Examining data/ghc-8.10.2/includes/Cmm.h
Examining data/ghc-8.10.2/includes/rts/Messages.h
Examining data/ghc-8.10.2/includes/rts/Flags.h
Examining data/ghc-8.10.2/includes/rts/Bytecodes.h
Examining data/ghc-8.10.2/includes/rts/FileLock.h
Examining data/ghc-8.10.2/includes/rts/Types.h
Examining data/ghc-8.10.2/includes/rts/prof/LDV.h
Examining data/ghc-8.10.2/includes/rts/prof/CCS.h
Examining data/ghc-8.10.2/includes/rts/EventLogWriter.h
Examining data/ghc-8.10.2/includes/rts/Libdw.h
Examining data/ghc-8.10.2/includes/rts/LibdwPool.h
Examining data/ghc-8.10.2/includes/rts/TTY.h
Examining data/ghc-8.10.2/includes/rts/SpinLock.h
Examining data/ghc-8.10.2/includes/rts/Parallel.h
Examining data/ghc-8.10.2/includes/rts/PrimFloat.h
Examining data/ghc-8.10.2/includes/rts/Globals.h
Examining data/ghc-8.10.2/includes/rts/IOManager.h
Examining data/ghc-8.10.2/includes/rts/Profiling.h
Examining data/ghc-8.10.2/includes/rts/NonMoving.h
Examining data/ghc-8.10.2/includes/rts/Ticky.h
Examining data/ghc-8.10.2/includes/rts/EventLogFormat.h
Examining data/ghc-8.10.2/includes/rts/StableName.h
Examining data/ghc-8.10.2/includes/rts/StaticPtrTable.h
Examining data/ghc-8.10.2/includes/rts/storage/FunTypes.h
Examining data/ghc-8.10.2/includes/rts/storage/Heap.h
Examining data/ghc-8.10.2/includes/rts/storage/ClosureTypes.h
Examining data/ghc-8.10.2/includes/rts/storage/ClosureMacros.h
Examining data/ghc-8.10.2/includes/rts/storage/GC.h
Examining data/ghc-8.10.2/includes/rts/storage/MBlock.h
Examining data/ghc-8.10.2/includes/rts/storage/Closures.h
Examining data/ghc-8.10.2/includes/rts/storage/InfoTables.h
Examining data/ghc-8.10.2/includes/rts/storage/TSO.h
Examining data/ghc-8.10.2/includes/rts/storage/Block.h
Examining data/ghc-8.10.2/includes/rts/OSThreads.h
Examining data/ghc-8.10.2/includes/rts/BlockSignals.h
Examining data/ghc-8.10.2/includes/rts/Signals.h
Examining data/ghc-8.10.2/includes/rts/Constants.h
Examining data/ghc-8.10.2/includes/rts/Config.h
Examining data/ghc-8.10.2/includes/rts/Adjustor.h
Examining data/ghc-8.10.2/includes/rts/Hpc.h
Examining data/ghc-8.10.2/includes/rts/GetTime.h
Examining data/ghc-8.10.2/includes/rts/Time.h
Examining data/ghc-8.10.2/includes/rts/Main.h
Examining data/ghc-8.10.2/includes/rts/Threads.h
Examining data/ghc-8.10.2/includes/rts/StablePtr.h
Examining data/ghc-8.10.2/includes/rts/Timer.h
Examining data/ghc-8.10.2/includes/rts/Linker.h
Examining data/ghc-8.10.2/includes/rts/Utils.h
Examining data/ghc-8.10.2/rts/LinkerInternals.h
Examining data/ghc-8.10.2/rts/Messages.h
Examining data/ghc-8.10.2/rts/Arena.c
Examining data/ghc-8.10.2/rts/Printer.h
Examining data/ghc-8.10.2/rts/Schedule.c
Examining data/ghc-8.10.2/rts/Trace.h
Examining data/ghc-8.10.2/rts/Globals.c
Examining data/ghc-8.10.2/rts/StgCRun.c
Examining data/ghc-8.10.2/rts/FileLock.c
Examining data/ghc-8.10.2/rts/FileLock.h
Examining data/ghc-8.10.2/rts/STM.c
Examining data/ghc-8.10.2/rts/ThreadLabels.h
Examining data/ghc-8.10.2/rts/StableName.c
Examining data/ghc-8.10.2/rts/Libdw.c
Examining data/ghc-8.10.2/rts/StgPrimFloat.c
Examining data/ghc-8.10.2/rts/StgRun.h
Examining data/ghc-8.10.2/rts/ThreadPaused.h
Examining data/ghc-8.10.2/rts/RtsStartup.c
Examining data/ghc-8.10.2/rts/Disassembler.h
Examining data/ghc-8.10.2/rts/Proftimer.h
Examining data/ghc-8.10.2/rts/WSDeque.h
Examining data/ghc-8.10.2/rts/RtsFlags.c
Examining data/ghc-8.10.2/rts/ProfilerReportJson.h
Examining data/ghc-8.10.2/rts/BeginPrivate.h
Examining data/ghc-8.10.2/rts/RtsFlags.h
Examining data/ghc-8.10.2/rts/Schedule.h
Examining data/ghc-8.10.2/rts/Adjustor.c
Examining data/ghc-8.10.2/rts/sm/Storage.c
Examining data/ghc-8.10.2/rts/sm/GCAux.c
Examining data/ghc-8.10.2/rts/sm/MarkWeak.h
Examining data/ghc-8.10.2/rts/sm/MBlock.c
Examining data/ghc-8.10.2/rts/sm/BlockAlloc.c
Examining data/ghc-8.10.2/rts/sm/Scav_thr.c
Examining data/ghc-8.10.2/rts/sm/NonMovingShortcut.c
Examining data/ghc-8.10.2/rts/sm/Sweep.h
Examining data/ghc-8.10.2/rts/sm/GCThread.h
Examining data/ghc-8.10.2/rts/sm/NonMovingScav.c
Examining data/ghc-8.10.2/rts/sm/Sweep.c
Examining data/ghc-8.10.2/rts/sm/GCUtils.c
Examining data/ghc-8.10.2/rts/sm/NonMovingSweep.c
Examining data/ghc-8.10.2/rts/sm/Sanity.c
Examining data/ghc-8.10.2/rts/sm/HeapAlloc.h
Examining data/ghc-8.10.2/rts/sm/CNF.c
Examining data/ghc-8.10.2/rts/sm/NonMovingScav.h
Examining data/ghc-8.10.2/rts/sm/GC.h
Examining data/ghc-8.10.2/rts/sm/NonMovingShortcut.h
Examining data/ghc-8.10.2/rts/sm/NonMoving.c
Examining data/ghc-8.10.2/rts/sm/ShouldCompact.h
Examining data/ghc-8.10.2/rts/sm/NonMoving.h
Examining data/ghc-8.10.2/rts/sm/CNF.h
Examining data/ghc-8.10.2/rts/sm/MarkStack.h
Examining data/ghc-8.10.2/rts/sm/NonMovingSweep.h
Examining data/ghc-8.10.2/rts/sm/NonMovingMark.h
Examining data/ghc-8.10.2/rts/sm/GCUtils.h
Examining data/ghc-8.10.2/rts/sm/BlockAlloc.h
Examining data/ghc-8.10.2/rts/sm/NonMovingCensus.h
Examining data/ghc-8.10.2/rts/sm/Evac.c
Examining data/ghc-8.10.2/rts/sm/Scav.h
Examining data/ghc-8.10.2/rts/sm/Storage.h
Examining data/ghc-8.10.2/rts/sm/MarkWeak.c
Examining data/ghc-8.10.2/rts/sm/GCTDecl.h
Examining data/ghc-8.10.2/rts/sm/GC.c
Examining data/ghc-8.10.2/rts/sm/OSMem.h
Examining data/ghc-8.10.2/rts/sm/NonMovingCensus.c
Examining data/ghc-8.10.2/rts/sm/Compact.c
Examining data/ghc-8.10.2/rts/sm/Compact.h
Examining data/ghc-8.10.2/rts/sm/HeapUtils.h
Examining data/ghc-8.10.2/rts/sm/Evac.h
Examining data/ghc-8.10.2/rts/sm/Evac_thr.c
Examining data/ghc-8.10.2/rts/sm/NonMovingMark.c
Examining data/ghc-8.10.2/rts/sm/Scav.c
Examining data/ghc-8.10.2/rts/sm/Sanity.h
Examining data/ghc-8.10.2/rts/Libdw.h
Examining data/ghc-8.10.2/rts/Capability.h
Examining data/ghc-8.10.2/rts/LibdwPool.h
Examining data/ghc-8.10.2/rts/TraverseHeap.h
Examining data/ghc-8.10.2/rts/Task.h
Examining data/ghc-8.10.2/rts/Interpreter.c
Examining data/ghc-8.10.2/rts/PathUtils.h
Examining data/ghc-8.10.2/rts/RetainerSet.h
Examining data/ghc-8.10.2/rts/hooks/OnExit.c
Examining data/ghc-8.10.2/rts/hooks/Hooks.h
Examining data/ghc-8.10.2/rts/hooks/OutOfHeap.c
Examining data/ghc-8.10.2/rts/hooks/LongGCSync.c
Examining data/ghc-8.10.2/rts/hooks/StackOverflow.c
Examining data/ghc-8.10.2/rts/hooks/FlagDefaults.c
Examining data/ghc-8.10.2/rts/hooks/MallocFail.c
Examining data/ghc-8.10.2/rts/Hpc.c
Examining data/ghc-8.10.2/rts/Interpreter.h
Examining data/ghc-8.10.2/rts/RtsSymbols.h
Examining data/ghc-8.10.2/rts/Apply.h
Examining data/ghc-8.10.2/rts/Globals.h
Examining data/ghc-8.10.2/rts/ProfHeap.h
Examining data/ghc-8.10.2/rts/Task.c
Examining data/ghc-8.10.2/rts/StaticPtrTable.c
Examining data/ghc-8.10.2/rts/Profiling.c
Examining data/ghc-8.10.2/rts/LibdwPool.c
Examining data/ghc-8.10.2/rts/WSDeque.c
Examining data/ghc-8.10.2/rts/Ticker.h
Examining data/ghc-8.10.2/rts/EndPrivate.h
Examining data/ghc-8.10.2/rts/Hash.h
Examining data/ghc-8.10.2/rts/Threads.c
Examining data/ghc-8.10.2/rts/Profiling.h
Examining data/ghc-8.10.2/rts/TopHandler.h
Examining data/ghc-8.10.2/rts/HsFFI.c
Examining data/ghc-8.10.2/rts/RtsSignals.h
Examining data/ghc-8.10.2/rts/STM.h
Examining data/ghc-8.10.2/rts/RetainerProfile.c
Examining data/ghc-8.10.2/rts/RtsAPI.c
Examining data/ghc-8.10.2/rts/RtsDllMain.h
Examining data/ghc-8.10.2/rts/Arena.h
Examining data/ghc-8.10.2/rts/ProfilerReportJson.c
Examining data/ghc-8.10.2/rts/RtsDllMain.c
Examining data/ghc-8.10.2/rts/LdvProfile.c
Examining data/ghc-8.10.2/rts/TopHandler.c
Examining data/ghc-8.10.2/rts/AutoApply.h
Examining data/ghc-8.10.2/rts/Ticky.h
Examining data/ghc-8.10.2/rts/AwaitEvent.h
Examining data/ghc-8.10.2/rts/linker/CacheFlush.c
Examining data/ghc-8.10.2/rts/linker/elf_util.c
Examining data/ghc-8.10.2/rts/linker/MachO.c
Examining data/ghc-8.10.2/rts/linker/elf_reloc_aarch64.c
Examining data/ghc-8.10.2/rts/linker/elf_plt.c
Examining data/ghc-8.10.2/rts/linker/M32Alloc.c
Examining data/ghc-8.10.2/rts/linker/elf_plt_arm.h
Examining data/ghc-8.10.2/rts/linker/elf_plt_aarch64.h
Examining data/ghc-8.10.2/rts/linker/M32Alloc.h
Examining data/ghc-8.10.2/rts/linker/PEi386.h
Examining data/ghc-8.10.2/rts/linker/elf_util.h
Examining data/ghc-8.10.2/rts/linker/elf_reloc.c
Examining data/ghc-8.10.2/rts/linker/elf_got.h
Examining data/ghc-8.10.2/rts/linker/elf_compat.h
Examining data/ghc-8.10.2/rts/linker/SymbolExtras.c
Examining data/ghc-8.10.2/rts/linker/PEi386Types.h
Examining data/ghc-8.10.2/rts/linker/elf_plt_aarch64.c
Examining data/ghc-8.10.2/rts/linker/CacheFlush.h
Examining data/ghc-8.10.2/rts/linker/Elf.c
Examining data/ghc-8.10.2/rts/linker/Elf.h
Examining data/ghc-8.10.2/rts/linker/elf_plt_arm.c
Examining data/ghc-8.10.2/rts/linker/elf_reloc_aarch64.h
Examining data/ghc-8.10.2/rts/linker/elf_reloc.h
Examining data/ghc-8.10.2/rts/linker/MachOTypes.h
Examining data/ghc-8.10.2/rts/linker/PEi386.c
Examining data/ghc-8.10.2/rts/linker/ElfTypes.h
Examining data/ghc-8.10.2/rts/linker/LoadArchive.c
Examining data/ghc-8.10.2/rts/linker/MachO.h
Examining data/ghc-8.10.2/rts/linker/SymbolExtras.h
Examining data/ghc-8.10.2/rts/linker/elf_plt.h
Examining data/ghc-8.10.2/rts/linker/elf_got.c
Examining data/ghc-8.10.2/rts/linker/util.h
Examining data/ghc-8.10.2/rts/Proftimer.c
Examining data/ghc-8.10.2/rts/ProfHeap.c
Examining data/ghc-8.10.2/rts/Stats.c
Examining data/ghc-8.10.2/rts/CheckUnload.c
Examining data/ghc-8.10.2/rts/RtsUtils.h
Examining data/ghc-8.10.2/rts/posix/OSMem.c
Examining data/ghc-8.10.2/rts/posix/Clock.h
Examining data/ghc-8.10.2/rts/posix/TTY.h
Examining data/ghc-8.10.2/rts/posix/Select.c
Examining data/ghc-8.10.2/rts/posix/Select.h
Examining data/ghc-8.10.2/rts/posix/Signals.c
Examining data/ghc-8.10.2/rts/posix/Signals.h
Examining data/ghc-8.10.2/rts/posix/TTY.c
Examining data/ghc-8.10.2/rts/posix/itimer/Setitimer.c
Examining data/ghc-8.10.2/rts/posix/itimer/Pthread.c
Examining data/ghc-8.10.2/rts/posix/itimer/TimerCreate.c
Examining data/ghc-8.10.2/rts/posix/OSThreads.c
Examining data/ghc-8.10.2/rts/posix/GetEnv.c
Examining data/ghc-8.10.2/rts/posix/Itimer.c
Examining data/ghc-8.10.2/rts/posix/GetTime.c
Examining data/ghc-8.10.2/rts/RaiseAsync.c
Examining data/ghc-8.10.2/rts/PathUtils.c
Examining data/ghc-8.10.2/rts/Stats.h
Examining data/ghc-8.10.2/rts/StablePtr.c
Examining data/ghc-8.10.2/rts/StableName.h
Examining data/ghc-8.10.2/rts/ThreadPaused.c
Examining data/ghc-8.10.2/rts/StaticPtrTable.h
Examining data/ghc-8.10.2/rts/ClosureFlags.c
Examining data/ghc-8.10.2/rts/Pool.h
Examining data/ghc-8.10.2/rts/xxhash.c
Examining data/ghc-8.10.2/rts/eventlog/EventLog.h
Examining data/ghc-8.10.2/rts/eventlog/EventLog.c
Examining data/ghc-8.10.2/rts/eventlog/EventLogWriter.c
Examining data/ghc-8.10.2/rts/Disassembler.c
Examining data/ghc-8.10.2/rts/TraverseHeap.c
Examining data/ghc-8.10.2/rts/xxhash.h
Examining data/ghc-8.10.2/rts/SMPClosureOps.h
Examining data/ghc-8.10.2/rts/win32/AsyncIO.h
Examining data/ghc-8.10.2/rts/win32/OSMem.c
Examining data/ghc-8.10.2/rts/win32/ThrIOManager.c
Examining data/ghc-8.10.2/rts/win32/AsyncIO.c
Examining data/ghc-8.10.2/rts/win32/ConsoleHandler.c
Examining data/ghc-8.10.2/rts/win32/Ticker.c
Examining data/ghc-8.10.2/rts/win32/IOManager.c
Examining data/ghc-8.10.2/rts/win32/IOManager.h
Examining data/ghc-8.10.2/rts/win32/WorkQueue.h
Examining data/ghc-8.10.2/rts/win32/WorkQueue.c
Examining data/ghc-8.10.2/rts/win32/veh_excn.h
Examining data/ghc-8.10.2/rts/win32/AwaitEvent.c
Examining data/ghc-8.10.2/rts/win32/OSThreads.c
Examining data/ghc-8.10.2/rts/win32/GetEnv.c
Examining data/ghc-8.10.2/rts/win32/GetTime.c
Examining data/ghc-8.10.2/rts/win32/veh_excn.c
Examining data/ghc-8.10.2/rts/win32/ConsoleHandler.h
Examining data/ghc-8.10.2/rts/Timer.c
Examining data/ghc-8.10.2/rts/GetEnv.h
Examining data/ghc-8.10.2/rts/Inlines.c
Examining data/ghc-8.10.2/rts/Pool.c
Examining data/ghc-8.10.2/rts/RetainerSet.c
Examining data/ghc-8.10.2/rts/ProfilerReport.h
Examining data/ghc-8.10.2/rts/RtsMessages.c
Examining data/ghc-8.10.2/rts/Sparks.c
Examining data/ghc-8.10.2/rts/Printer.c
Examining data/ghc-8.10.2/rts/Ticky.c
Examining data/ghc-8.10.2/rts/StgPrimFloat.h
Examining data/ghc-8.10.2/rts/ThreadLabels.c
Examining data/ghc-8.10.2/rts/GetTime.h
Examining data/ghc-8.10.2/rts/Linker.c
Examining data/ghc-8.10.2/rts/Messages.c
Examining data/ghc-8.10.2/rts/Weak.h
Examining data/ghc-8.10.2/rts/ProfilerReport.c
Examining data/ghc-8.10.2/rts/Updates.h
Examining data/ghc-8.10.2/rts/RaiseAsync.h
Examining data/ghc-8.10.2/rts/Capability.c
Examining data/ghc-8.10.2/rts/Heap.c
Examining data/ghc-8.10.2/rts/Sparks.h
Examining data/ghc-8.10.2/rts/Hash.c
Examining data/ghc-8.10.2/rts/CheckUnload.h
Examining data/ghc-8.10.2/rts/Threads.h
Examining data/ghc-8.10.2/rts/fs_rts.h
Examining data/ghc-8.10.2/rts/RtsSymbolInfo.h
Examining data/ghc-8.10.2/rts/Weak.c
Examining data/ghc-8.10.2/rts/OldARMAtomic.c
Examining data/ghc-8.10.2/rts/RtsUtils.c
Examining data/ghc-8.10.2/rts/StablePtr.h
Examining data/ghc-8.10.2/rts/PosixSource.h
Examining data/ghc-8.10.2/rts/RtsSymbolInfo.c
Examining data/ghc-8.10.2/rts/Timer.h
Examining data/ghc-8.10.2/rts/Excn.h
Examining data/ghc-8.10.2/rts/Prelude.h
Examining data/ghc-8.10.2/rts/RtsMain.c
Examining data/ghc-8.10.2/rts/Trace.c
Examining data/ghc-8.10.2/rts/LdvProfile.h
Examining data/ghc-8.10.2/rts/RetainerProfile.h
Examining data/ghc-8.10.2/rts/RtsSymbols.c

FINAL RESULTS:

data/ghc-8.10.2/rts/RtsSymbols.c:156:32:  [5] (race) chmod:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchmod( ) instead.
      SymI_HasProto_deprecated(chmod)                    \
data/ghc-8.10.2/utils/lndir/lndir.c:348:21:  [5] (race) readlink:
  This accepts filename arguments; if an attacker can move those files or
  change the link content, a race condition results. Also, it does not
  terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach.
                if (readlink (dp->d_name, symbuf, sizeof(symbuf) - 1) >= 0) {
data/ghc-8.10.2/utils/lndir/lndir.c:370:18:  [5] (race) readlink:
  This accepts filename arguments; if an attacker can move those files or
  change the link content, a race condition results. Also, it does not
  terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach.
        symlen = readlink (dp->d_name, symbuf, sizeof(symbuf) - 1);
data/ghc-8.10.2/utils/lndir/lndir.c:379:26:  [5] (race) readlink:
  This accepts filename arguments; if an attacker can move those files or
  change the link content, a race condition results. Also, it does not
  terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach.
            basesymlen = readlink(buf, basesym, sizeof(basesym) - 1);
data/ghc-8.10.2/driver/utils/cwrapper.c:19: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, fmt, argp);
data/ghc-8.10.2/driver/utils/cwrapper.c:30:9:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
    i = vsnprintf(NULL, 0, fmt, argp);
data/ghc-8.10.2/driver/utils/cwrapper.c:43:9:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
    j = vsnprintf(p, i + 1, fmt, argp);
data/ghc-8.10.2/driver/utils/dynwrapper.c:22: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, fmt, argp);
data/ghc-8.10.2/driver/utils/dynwrapper.c:95:9:  [4] (buffer) StrCpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
        StrCpy(s, exePath);
data/ghc-8.10.2/driver/utils/dynwrapper.c:97:9:  [4] (buffer) StrCpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
        StrCpy(s, *dir);
data/ghc-8.10.2/includes/rts/Messages.h:27:16:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
#define PRINTF printf
data/ghc-8.10.2/libraries/Cabal/Cabal/tests/cbits/rpmvercmp.c:59: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(str1, a);
data/ghc-8.10.2/libraries/Cabal/Cabal/tests/cbits/rpmvercmp.c:60: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(str2, b);
data/ghc-8.10.2/libraries/Win32/cbits/diatemp.c:32:2:  [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(str, text);
data/ghc-8.10.2/libraries/process/cbits/runProcess.c:298:13:  [4] (shell) execvp:
  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.
            execvp(args[0], args);
data/ghc-8.10.2/libraries/process/tests/T9775/main.c:5:5:  [4] (shell) execv:
  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.
    execv("./ok", args);
data/ghc-8.10.2/rts/Hpc.c:94: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(res,tmp);
data/ghc-8.10.2/rts/Hpc.c:230:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(tixFilename,"%s/%s-%d.tix",hpc_tixdir,prog_name,(int)hpc_pid);
data/ghc-8.10.2/rts/Hpc.c:234:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(tixFilename, "%s.tix", prog_name);
data/ghc-8.10.2/rts/Hpc.c:353:9:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
        fprintf(f,"%" FMT_Word64,tmpModule->tixArr[i]);
data/ghc-8.10.2/rts/Linker.c:618: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(errmsg_copy, errmsg);
data/ghc-8.10.2/rts/Linker.c:1390:8:  [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(oc->archiveMemberName, archiveMemberName);
data/ghc-8.10.2/rts/PathUtils.c:24: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(ret, path);
data/ghc-8.10.2/rts/PathUtils.c:46: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(ret, dirName);
data/ghc-8.10.2/rts/PathUtils.h:22:20:  [4] (buffer) swprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
#define pathprintf swprintf
data/ghc-8.10.2/rts/PathUtils.h:31:20:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
#define pathprintf snprintf
data/ghc-8.10.2/rts/Printer.c:1049: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(res,closure_type_names[get_itbl(closure)->type]);
data/ghc-8.10.2/rts/ProfHeap.c:372: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(prog, prog_name);
data/ghc-8.10.2/rts/ProfHeap.c:387:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(hp_filename, "%s.hp", prog);
data/ghc-8.10.2/rts/ProfilerReport.c:163:13:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
            fprintf(prof_file, "  %5" FMT_Word64 " %9" FMT_Word64,
data/ghc-8.10.2/rts/ProfilerReport.c:245:13:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
            fprintf(prof_file, "  %5" FMT_Word64 " %9" FMT_Word64,
data/ghc-8.10.2/rts/Profiling.c:256:9:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
        strcpy(prog, prog_name);
data/ghc-8.10.2/rts/Profiling.c:280:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(prof_filename, "%s.prof", stem);
data/ghc-8.10.2/rts/RtsFlags.c:1804:9:  [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(f, s, ap);
data/ghc-8.10.2/rts/RtsFlags.c:1836:13:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
            snprintf(stats_filename, STATS_FILENAME_MAXLEN, filename_fmt,
data/ghc-8.10.2/rts/RtsFlags.c:2219: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(new_arg, arg);
data/ghc-8.10.2/rts/RtsMessages.c:147:6:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
     vsnprintf(message, BUFSIZE, s, ap);
data/ghc-8.10.2/rts/RtsMessages.c:164:6:  [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, s, ap);
data/ghc-8.10.2/rts/RtsMessages.c:201:14:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
         r = vsnprintf(buf, BUFSIZE, s, ap);
data/ghc-8.10.2/rts/RtsMessages.c:217:6:  [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, s, ap);
data/ghc-8.10.2/rts/RtsMessages.c:249:13:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
        r = vsnprintf(buf, BUFSIZE, s, ap);
data/ghc-8.10.2/rts/RtsMessages.c:269:9:  [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, s, ap);
data/ghc-8.10.2/rts/RtsMessages.c:299:14:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
         r = vsnprintf(buf, BUFSIZE, s, ap);
data/ghc-8.10.2/rts/RtsMessages.c:308:6:  [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, s, ap);
data/ghc-8.10.2/rts/RtsSymbols.c:152:32:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
      SymI_HasProto_deprecated(access)                   \
data/ghc-8.10.2/rts/RtsSymbols.c:168:32:  [4] (shell) execl:
  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.
      SymI_HasProto_deprecated(execl)                    \
data/ghc-8.10.2/rts/RtsSymbols.c:169:32:  [4] (shell) execle:
  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.
      SymI_HasProto_deprecated(execle)                   \
data/ghc-8.10.2/rts/RtsSymbols.c:170:32:  [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.
      SymI_HasProto_deprecated(execlp)                   \
data/ghc-8.10.2/rts/RtsSymbols.c:172:32:  [4] (shell) execv:
  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.
      SymI_HasProto_deprecated(execv)                    \
data/ghc-8.10.2/rts/RtsSymbols.c:174:32:  [4] (shell) execvp:
  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.
      SymI_HasProto_deprecated(execvp)                   \
data/ghc-8.10.2/rts/RtsSymbols.c:210:32:  [4] (tmpfile) mktemp:
  Temporary file race condition (CWE-377).
      SymI_HasProto_deprecated(mktemp)                   \
data/ghc-8.10.2/rts/RtsUtils.c:170:9:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
        strcpy(nowstr, ctime(&now));
data/ghc-8.10.2/rts/RtsUtils.c:187:17:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
                sprintf(s, "%" FMT_Word64, (StgWord64)x);
data/ghc-8.10.2/rts/RtsUtils.c:189:17:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
                sprintf(s, "%" FMT_Word64 ",%03" FMT_Word64,
data/ghc-8.10.2/rts/RtsUtils.c:193:17:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
                sprintf(s, "%"    FMT_Word64
data/ghc-8.10.2/rts/RtsUtils.c:200:17:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
                sprintf(s, "%"    FMT_Word64
data/ghc-8.10.2/rts/RtsUtils.c:209:17:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
                sprintf(s, "%"    FMT_Word64
data/ghc-8.10.2/rts/RtsUtils.c:220:17:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
                sprintf(s, "%"    FMT_Word64
data/ghc-8.10.2/rts/RtsUtils.c:233:17:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
                sprintf(s, "%"    FMT_Word64
data/ghc-8.10.2/rts/RtsUtils.c:249:9:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
        sprintf(s, "%" FMT_Word64, x);
data/ghc-8.10.2/rts/Stats.c:1684:9:  [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(sf, s, ap);
data/ghc-8.10.2/rts/Stats.h:23:16:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
#define PRINTF printf
data/ghc-8.10.2/rts/Task.c:491: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(worker_name, program_invocation_short_name);
data/ghc-8.10.2/rts/eventlog/EventLog.c:1124:21:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
    uint32_t size = vsnprintf(buf, BUF, msg,ap);
data/ghc-8.10.2/rts/eventlog/EventLogWriter.c:44:9:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
        strcpy(prog, prog_name);
data/ghc-8.10.2/rts/eventlog/EventLogWriter.c:62:13:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
            sprintf(filename, "%s.eventlog", prog);
data/ghc-8.10.2/rts/eventlog/EventLogWriter.c:71:13:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
            sprintf(filename, "%s.%" FMT_Word64 ".eventlog",
data/ghc-8.10.2/rts/linker/PEi386.c:809:9:  [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(newPath, abs_path);
data/ghc-8.10.2/rts/linker/PEi386.c:811:9:  [4] (buffer) wcscat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120).
        wcscat(newPath, str);
data/ghc-8.10.2/rts/linker/PEi386.c:2071:13:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
            sprintf(symBuffer, "_%s", lbl);
data/ghc-8.10.2/rts/linker/PEi386.c:2150:7:  [4] (buffer) wcscat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120).
      wcscat (buffer, WSTR(" "));
data/ghc-8.10.2/rts/linker/PEi386.c:2152:7:  [4] (buffer) wcscat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120).
      wcscat (buffer, name);
data/ghc-8.10.2/rts/linker/PEi386.c:2163:9:  [4] (buffer) wcscat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120).
        wcscat (buffer, s_disp);
data/ghc-8.10.2/rts/linker/PEi386.c:2177:19:  [4] (buffer) wcscat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120).
                  wcscat (buffer, WSTR(" "));
data/ghc-8.10.2/rts/linker/PEi386.c:2181:23:  [4] (buffer) wcscat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120).
                      wcscat (buffer, name);
data/ghc-8.10.2/rts/linker/PEi386.c:2186:23:  [4] (buffer) wcscat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120).
                      wcscat (buffer, oc->fileName);
data/ghc-8.10.2/rts/linker/PEi386.c:2190:19:  [4] (buffer) wcscat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120).
                  wcscat (buffer, s_disp);
data/ghc-8.10.2/rts/linker/PEi386.c:2222:19:  [4] (buffer) wcscat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120).
                  wcscat (buffer, WSTR(" "));
data/ghc-8.10.2/rts/linker/PEi386.c:2223:19:  [4] (buffer) wcscat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120).
                  wcscat (buffer, tmp);
data/ghc-8.10.2/rts/linker/PEi386.c:2225:19:  [4] (buffer) wcscat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120).
                  wcscat (buffer, tmp);
data/ghc-8.10.2/rts/linker/PEi386.c:2247:7:  [4] (buffer) wcscat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120).
      wcscat (buffer, s_line);
data/ghc-8.10.2/rts/linker/PEi386.c:2254:7:  [4] (buffer) wcscat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120).
      wcscat (buffer, s_line);
data/ghc-8.10.2/rts/linker/PEi386.c:2313:11:  [4] (buffer) wcscat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120).
          wcscat (buffer, s_disp);
data/ghc-8.10.2/rts/win32/veh_excn.c:247:5:  [4] (format) swprintf:
  Potential format string problem (CWE-134). Make format string constant.
    swprintf (szFileName, MAX_PATH,
data/ghc-8.10.2/utils/fs/fs.c:109:11:  [4] (format) swprintf:
  Potential format string problem (CWE-134). Make format string constant.
      if (swprintf (ns, 10, L"%ls%ls", win32_file_namespace, unc_prefix) <= 0)
data/ghc-8.10.2/utils/fs/fs.c:115:12:  [4] (format) swprintf:
  Potential format string problem (CWE-134). Make format string constant.
  else if (swprintf (ns, 10, L"%ls", win32_file_namespace) <= 0)
data/ghc-8.10.2/utils/fs/fs.c:125:7:  [4] (format) swprintf:
  Potential format string problem (CWE-134). Make format string constant.
  if (swprintf (result, bLen, L"%ls%ls", ns, temp) <= 0)
data/ghc-8.10.2/utils/hp2ps/Error.c:18: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, fmt, ap);
data/ghc-8.10.2/utils/hp2ps/Error.c:33: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, fmt, ap);
data/ghc-8.10.2/utils/hp2ps/Utilities.c:108: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(r, s);
data/ghc-8.10.2/utils/hp2ps/Utilities.c:118: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(r, s);
data/ghc-8.10.2/utils/hp2ps/Utilities.c:119:5:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
    strcat(r, t);
data/ghc-8.10.2/utils/lndir/lndir.c:119: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, fmt, args);
data/ghc-8.10.2/utils/lndir/lndir.c:122:5:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    fprintf (stderr, fmt, a1, a2, a3);
data/ghc-8.10.2/utils/lndir/lndir.c:154: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, fmt, args);
data/ghc-8.10.2/utils/lndir/lndir.c:157:5:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    fprintf (stderr, fmt, a1, a2, a3);
data/ghc-8.10.2/utils/lndir/lndir.c:236: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(s+1, s+2);
data/ghc-8.10.2/utils/lndir/lndir.c:275:5:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
    strcat (buf, fn);
data/ghc-8.10.2/utils/lndir/lndir.c:290:9:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
        strcpy (p, dp->d_name);
data/ghc-8.10.2/utils/unlit/unlit.c:108:2:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	fprintf(stderr, CANNOTWRITESTDOUT);
data/ghc-8.10.2/utils/unlit/unlit.c:110:2:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	fprintf(stderr, CANNOTWRITE, ofilename);
data/ghc-8.10.2/utils/unlit/unlit.c:343:8:  [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(prefix_str, *argv);
data/ghc-8.10.2/utils/unlit/unlit.c:351:9:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
        fprintf(stderr, USAGE);
data/ghc-8.10.2/utils/unlit/unlit.c:356:9:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
        fprintf(stderr, DISTINCTNAMES);
data/ghc-8.10.2/utils/unlit/unlit.c:367:13:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
            fprintf(stderr, CANNOTOPEN, argv[0]);
data/ghc-8.10.2/utils/unlit/unlit.c:376:13:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
            fprintf(stderr, CANNOTOPEN, argv[1]);
data/ghc-8.10.2/driver/gcc/gcc.c:31:15:  [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.
    oldPath = getenv("PATH");
data/ghc-8.10.2/driver/utils/dynwrapper.c:116:9:  [3] (misc) LoadLibrary:
  Ensure that the full path to the library is specified, or current directory
  may be used (CWE-829, CWE-20). Use registry entry or GetWindowsDirectory to
  find library path, if you aren't already.
    h = LoadLibrary(dll);
data/ghc-8.10.2/includes/rts/OSThreads.h:83:50:  [3] (misc) EnterCriticalSection:
  On some versions of Windows, exceptions can be thrown in low-memory
  situations. Use InitializeCriticalSectionAndSpinCount instead.
#define OS_ACQUIRE_LOCK(mutex) foreign "stdcall" EnterCriticalSection(mutex)
data/ghc-8.10.2/includes/rts/OSThreads.h:117:3:  [3] (misc) EnterCriticalSection:
  On some versions of Windows, exceptions can be thrown in low-memory
  situations. Use InitializeCriticalSectionAndSpinCount instead.
  EnterCriticalSection(mutex)
data/ghc-8.10.2/includes/rts/OSThreads.h:125:37:  [3] (misc) EnterCriticalSection:
  On some versions of Windows, exceptions can be thrown in low-memory
  situations. Use InitializeCriticalSectionAndSpinCount instead.
#define OS_ACQUIRE_LOCK(mutex)      EnterCriticalSection(mutex)
data/ghc-8.10.2/libraries/process/cbits/runProcess.c:734:10:  [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.
    if (!CreateProcess(NULL, cmd, NULL, NULL, inherit, dwFlags, environment, workingDirectory, &sInfo, &pInfo))
data/ghc-8.10.2/libraries/process/cbits/runProcess.c:734:10:  [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.
    if (!CreateProcess(NULL, cmd, NULL, NULL, inherit, dwFlags, environment, workingDirectory, &sInfo, &pInfo))
data/ghc-8.10.2/libraries/unix/cbits/execvpe.c:89:18:  [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 (!(path = getenv("PATH"))) {
data/ghc-8.10.2/rts/Hpc.c:207:16:  [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.
  hpc_tixdir = getenv("HPCTIXDIR");
data/ghc-8.10.2/rts/Hpc.c:208: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.
  hpc_tixfile = getenv("HPCTIXFILE");
data/ghc-8.10.2/rts/RtsFlags.c:675:25:  [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 *ghc_rts = getenv("GHCRTS");
data/ghc-8.10.2/rts/RtsSymbols.c:241:32:  [3] (tmpfile) tempnam:
  Temporary file race condition (CWE-377).
      SymI_HasProto_deprecated(tempnam)                  \
data/ghc-8.10.2/rts/win32/AsyncIO.c:79:5:  [3] (misc) EnterCriticalSection:
  On some versions of Windows, exceptions can be thrown in low-memory
  situations. Use InitializeCriticalSectionAndSpinCount instead.
    EnterCriticalSection(&queue_lock);
data/ghc-8.10.2/rts/win32/AsyncIO.c:114:5:  [3] (misc) EnterCriticalSection:
  On some versions of Windows, exceptions can be thrown in low-memory
  situations. Use InitializeCriticalSectionAndSpinCount instead.
    EnterCriticalSection(&queue_lock);
data/ghc-8.10.2/rts/win32/AsyncIO.c:127:5:  [3] (misc) EnterCriticalSection:
  On some versions of Windows, exceptions can be thrown in low-memory
  situations. Use InitializeCriticalSectionAndSpinCount instead.
    EnterCriticalSection(&queue_lock);
data/ghc-8.10.2/rts/win32/AsyncIO.c:139:5:  [3] (misc) EnterCriticalSection:
  On some versions of Windows, exceptions can be thrown in low-memory
  situations. Use InitializeCriticalSectionAndSpinCount instead.
    EnterCriticalSection(&queue_lock);
data/ghc-8.10.2/rts/win32/AsyncIO.c:155:5:  [3] (misc) InitializeCriticalSection:
  Exceptions can be thrown in low-memory situations. Use
  InitializeCriticalSectionAndSpinCount instead.
    InitializeCriticalSection(&queue_lock);
data/ghc-8.10.2/rts/win32/AsyncIO.c:230:5:  [3] (misc) EnterCriticalSection:
  On some versions of Windows, exceptions can be thrown in low-memory
  situations. Use InitializeCriticalSectionAndSpinCount instead.
    EnterCriticalSection(&queue_lock);
data/ghc-8.10.2/rts/win32/IOManager.c:68:9:  [3] (misc) EnterCriticalSection:
  On some versions of Windows, exceptions can be thrown in low-memory
  situations. Use InitializeCriticalSectionAndSpinCount instead.
        EnterCriticalSection(&iom->manLock);
data/ghc-8.10.2/rts/win32/IOManager.c:88:13:  [3] (misc) EnterCriticalSection:
  On some versions of Windows, exceptions can be thrown in low-memory
  situations. Use InitializeCriticalSectionAndSpinCount instead.
            EnterCriticalSection(&iom->manLock);
data/ghc-8.10.2/rts/win32/IOManager.c:94:9:  [3] (misc) EnterCriticalSection:
  On some versions of Windows, exceptions can be thrown in low-memory
  situations. Use InitializeCriticalSectionAndSpinCount instead.
        EnterCriticalSection(&iom->manLock);
data/ghc-8.10.2/rts/win32/IOManager.c:269:17:  [3] (misc) EnterCriticalSection:
  On some versions of Windows, exceptions can be thrown in low-memory
  situations. Use InitializeCriticalSectionAndSpinCount instead.
                EnterCriticalSection(&iom->manLock);
data/ghc-8.10.2/rts/win32/IOManager.c:277:13:  [3] (misc) EnterCriticalSection:
  On some versions of Windows, exceptions can be thrown in low-memory
  situations. Use InitializeCriticalSectionAndSpinCount instead.
            EnterCriticalSection(&iom->manLock);
data/ghc-8.10.2/rts/win32/IOManager.c:337:5:  [3] (misc) InitializeCriticalSection:
  Exceptions can be thrown in low-memory situations. Use
  InitializeCriticalSectionAndSpinCount instead.
    InitializeCriticalSection(&ioMan->manLock);
data/ghc-8.10.2/rts/win32/IOManager.c:343:5:  [3] (misc) InitializeCriticalSection:
  Exceptions can be thrown in low-memory situations. Use
  InitializeCriticalSectionAndSpinCount instead.
    InitializeCriticalSection(&ioMan->active_work_lock);
data/ghc-8.10.2/rts/win32/IOManager.c:363:5:  [3] (misc) EnterCriticalSection:
  On some versions of Windows, exceptions can be thrown in low-memory
  situations. Use InitializeCriticalSectionAndSpinCount instead.
    EnterCriticalSection(&ioMan->manLock);
data/ghc-8.10.2/rts/win32/IOManager.c:402:9:  [3] (misc) EnterCriticalSection:
  On some versions of Windows, exceptions can be thrown in low-memory
  situations. Use InitializeCriticalSectionAndSpinCount instead.
        EnterCriticalSection(&ioMan->manLock);
data/ghc-8.10.2/rts/win32/IOManager.c:525:13:  [3] (misc) EnterCriticalSection:
  On some versions of Windows, exceptions can be thrown in low-memory
  situations. Use InitializeCriticalSectionAndSpinCount instead.
            EnterCriticalSection(&ioMan->manLock);
data/ghc-8.10.2/rts/win32/IOManager.c:553:5:  [3] (misc) EnterCriticalSection:
  On some versions of Windows, exceptions can be thrown in low-memory
  situations. Use InitializeCriticalSectionAndSpinCount instead.
    EnterCriticalSection(&ioMan->active_work_lock);
data/ghc-8.10.2/rts/win32/IOManager.c:566:5:  [3] (misc) EnterCriticalSection:
  On some versions of Windows, exceptions can be thrown in low-memory
  situations. Use InitializeCriticalSectionAndSpinCount instead.
    EnterCriticalSection(&ioMan->active_work_lock);
data/ghc-8.10.2/rts/win32/IOManager.c:599:5:  [3] (misc) EnterCriticalSection:
  On some versions of Windows, exceptions can be thrown in low-memory
  situations. Use InitializeCriticalSectionAndSpinCount instead.
    EnterCriticalSection(&ioMan->active_work_lock);
data/ghc-8.10.2/rts/win32/WorkQueue.c:51:3:  [3] (misc) InitializeCriticalSection:
  Exceptions can be thrown in low-memory situations. Use
  InitializeCriticalSectionAndSpinCount instead.
  InitializeCriticalSection(&wq->queueLock);
data/ghc-8.10.2/rts/win32/WorkQueue.c:150:3:  [3] (misc) EnterCriticalSection:
  On some versions of Windows, exceptions can be thrown in low-memory
  situations. Use InitializeCriticalSectionAndSpinCount instead.
  EnterCriticalSection(&pq->queueLock);
data/ghc-8.10.2/rts/win32/WorkQueue.c:194:3:  [3] (misc) EnterCriticalSection:
  On some versions of Windows, exceptions can be thrown in low-memory
  situations. Use InitializeCriticalSectionAndSpinCount instead.
  EnterCriticalSection(&pq->queueLock);
data/ghc-8.10.2/driver/gcc/gcc.c:17: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 *preArgv[4];
data/ghc-8.10.2/driver/ghci/ghci.c:27: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 *preArgv[1];
data/ghc-8.10.2/includes/Cmm.h:804:11:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    prim %memcpy(dst_p, src_p, n * SIZEOF_W, SIZEOF_W);        \
data/ghc-8.10.2/includes/Cmm.h:819:15:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        prim %memcpy(dst_p, src_p, bytes, SIZEOF_W);              \
data/ghc-8.10.2/includes/Cmm.h:841:19:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            prim %memcpy(dst_p, src_p, bytes, SIZEOF_W);          \
data/ghc-8.10.2/includes/Cmm.h:879:11:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    prim %memcpy(dst_p, src_p, n * SIZEOF_W, SIZEOF_W);        \
data/ghc-8.10.2/includes/rts/storage/GC.h:134: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 pad[128];                      // make sure the following is
data/ghc-8.10.2/libraries/Cabal/cabal-testsuite/PackageTests/Regression/T5309/memoized-tcm/costMatrix.cpp:40: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(tcm, inTcm, space);
data/ghc-8.10.2/libraries/base/cbits/md5.c:77: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((uint8_t *)ctx->in + 64 - (unsigned)t, buf, len);
data/ghc-8.10.2/libraries/base/cbits/md5.c:81: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((uint8_t *)ctx->in + 64 - (unsigned)t, buf, (unsigned)t);
data/ghc-8.10.2/libraries/base/cbits/md5.c:89: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(ctx->in, buf, 64);
data/ghc-8.10.2/libraries/base/cbits/md5.c:97: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(ctx->in, buf, len);
data/ghc-8.10.2/libraries/base/cbits/md5.c:132: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(digest, ctx->buf, 16);
data/ghc-8.10.2/libraries/base/include/HsBase.h:545: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).
	return open(file,how,mode);
data/ghc-8.10.2/libraries/bytestring/cbits/fpstring.c:89:12:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    return memcpy(dst + dst_off, src + src_off, n);
data/ghc-8.10.2/libraries/integer-gmp/cbits/wrappers.c:101: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(rp, &sp[limb_shift], rn*sizeof(mp_limb_t));
data/ghc-8.10.2/libraries/integer-gmp/cbits/wrappers.c:136: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(rp, &sp[limb_shift], rn*sizeof(mp_limb_t));
data/ghc-8.10.2/libraries/integer-gmp/cbits/wrappers.c:178: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(&rp[limb_shift], sp, sn*sizeof(mp_limb_t));
data/ghc-8.10.2/libraries/integer-gmp/cbits/wrappers.c:246:7:  [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(r, x0, xn*sizeof(mp_limb_t));
data/ghc-8.10.2/libraries/integer-gmp/cbits/wrappers.c:272: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(r, rop[0]._mp_d, rn*sizeof(mp_limb_t));
data/ghc-8.10.2/libraries/integer-gmp/cbits/wrappers.c:317: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(g0, g[0]._mp_d, gn*sizeof(mp_limb_t));
data/ghc-8.10.2/libraries/integer-gmp/cbits/wrappers.c:327: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(s0, s[0]._mp_d, sn*sizeof(mp_limb_t));
data/ghc-8.10.2/libraries/integer-gmp/cbits/wrappers.c:583: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(rp, rop[0]._mp_d, sn*sizeof(mp_limb_t));
data/ghc-8.10.2/libraries/integer-gmp/cbits/wrappers.c:652: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(rp, r[0]._mp_d, rn*sizeof(mp_limb_t));
data/ghc-8.10.2/libraries/integer-gmp/cbits/wrappers.c:746: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(rp, r[0]._mp_d, rn*sizeof(mp_limb_t));
data/ghc-8.10.2/libraries/integer-gmp/cbits/wrappers.c:793: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(rp, r[0]._mp_d, rn*sizeof(mp_limb_t));
data/ghc-8.10.2/libraries/integer-gmp/cbits/wrappers.c:861: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 (rp, r[0]._mp_d, mp_size_minabs(rn,n)*sizeof(mp_limb_t)); \
data/ghc-8.10.2/libraries/process/include/runProcess.h:38:16:  [2] (race) vfork:
  On some old systems, vfork() permits race conditions, and it's very
  difficult to use correctly (CWE-362). Use fork() instead.
#define myfork vfork
data/ghc-8.10.2/libraries/process/tests/T9775/main.c:4: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 * args[2] = { "ok", NULL };
data/ghc-8.10.2/libraries/process/tests/process007_fd.c:11:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buf[SIZE];
data/ghc-8.10.2/libraries/process/tests/process007_fd.c:19:10:  [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).
    fd = atoi(argv[1]);
data/ghc-8.10.2/libraries/text/cbits/cbits.c:17: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(dest + (doff<<1), src + (soff<<1), n<<1);
data/ghc-8.10.2/libraries/unix/cbits/execvpe.c:124:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(buf, p, lp);
data/ghc-8.10.2/libraries/unix/cbits/execvpe.c:126:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(buf + lp + 1, name, ln);
data/ghc-8.10.2/libraries/unix/cbits/execvpe.c:146:7:  [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(ap + 2, argv + 1, cnt * sizeof(char *));
data/ghc-8.10.2/rts/Adjustor.c:313:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char   call[8];
data/ghc-8.10.2/rts/Hpc.c:84: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 tmp[256], *res; // XXX
data/ghc-8.10.2/rts/Interpreter.c:1770: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(arguments, Sp_plusW(ret_size+1),
data/ghc-8.10.2/rts/Interpreter.c:1848: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(Sp, ret, sizeof(W_) * stg_min(stk_offset,ret_size));
data/ghc-8.10.2/rts/Linker.c:690: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 line[MAXLINE];
data/ghc-8.10.2/rts/Linker.c:1474: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).
   fd = open(path, O_RDONLY, S_IRUSR);
data/ghc-8.10.2/rts/Linker.c:1476: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).
   fd = open(path, O_RDONLY);
data/ghc-8.10.2/rts/PathUtils.h:20: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).
#define open wopen
data/ghc-8.10.2/rts/PathUtils.h:27:18:  [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).
#define pathopen fopen
data/ghc-8.10.2/rts/ProfHeap.c:544:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buf[max_length+1], *p, *buf_end;
data/ghc-8.10.2/rts/ProfHeap.c:574:13:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
            sprintf(buf+max_length-4, "...");
data/ghc-8.10.2/rts/ProfilerReport.c:282: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 temp[128]; /* sigh: magic constant */
data/ghc-8.10.2/rts/RetainerSet.c:211: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 tmp[max_length + 1];
data/ghc-8.10.2/rts/RetainerSet.c:220: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(tmp + 0, "(%d)", -(rs->id));
data/ghc-8.10.2/rts/RtsFlags.c:556: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(win32_full_utf8_argv, argv, sizeof(char*) * (*argc + 1));
data/ghc-8.10.2/rts/RtsFlags.c:1835:13:  [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 stats_filename[STATS_FILENAME_MAXLEN];
data/ghc-8.10.2/rts/RtsFlags.c:2265:25:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    if ( (last_slash = (char *) strrchr(argv[0], '/')) != NULL ) {
data/ghc-8.10.2/rts/RtsMessages.c:144: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 title[BUFSIZE], message[BUFSIZE];
data/ghc-8.10.2/rts/RtsMessages.c:198: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 buf[BUFSIZE];
data/ghc-8.10.2/rts/RtsMessages.c:246: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 buf[BUFSIZE];
data/ghc-8.10.2/rts/RtsMessages.c:296: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 buf[BUFSIZE];
data/ghc-8.10.2/rts/RtsStartup.c:187: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 *my_argv[2] = { NULL, NULL };
data/ghc-8.10.2/rts/RtsSymbols.c:211:32:  [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).
      SymI_HasProto_deprecated(open)                     \
data/ghc-8.10.2/rts/RtsUtils.c:118: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(d, s, l);
data/ghc-8.10.2/rts/RtsUtils.c:163:12:  [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 nowstr[26];
data/ghc-8.10.2/rts/RtsUtils.c:345:21:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    static unsigned char buf[108];
data/ghc-8.10.2/rts/StablePtr.c:186: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(new_stable_ptr_table,
data/ghc-8.10.2/rts/Stats.c:800: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 temp[512];
data/ghc-8.10.2/rts/StgCRun.c:587:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char space[RESERVED_C_STACK_BYTES];
data/ghc-8.10.2/rts/Task.c: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 worker_name[16];
data/ghc-8.10.2/rts/Task.c:489:7:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
      strcpy(worker_name + 13, ":w");
data/ghc-8.10.2/rts/Task.c:492:7:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
      strcpy(worker_name + procname_len, ":w");
data/ghc-8.10.2/rts/Threads.c:674: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(/* dest   */ new_stack->sp - chunk_words,
data/ghc-8.10.2/rts/Threads.c:726: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(/* dest */ new_stack->sp - retvals,
data/ghc-8.10.2/rts/Trace.c:458:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            char buf[256];
data/ghc-8.10.2/rts/eventlog/EventLog.c:177: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(eb->pos, buf, size);
data/ghc-8.10.2/rts/eventlog/EventLog.c:190: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(eb->pos, buf, len);
data/ghc-8.10.2/rts/eventlog/EventLog.c:1123:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buf[BUF];
data/ghc-8.10.2/rts/linker/Elf.c:674:13:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
       fd = open(oc->fileName, O_RDONLY, S_IRUSR);
data/ghc-8.10.2/rts/linker/Elf.c:676:13:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
       fd = open(oc->fileName, O_RDONLY);
data/ghc-8.10.2/rts/linker/Elf.c:764:11:  [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( mem, oc->image + offset, size );
data/ghc-8.10.2/rts/linker/Elf.c:786:15:  [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(start, oc->image + offset, size);
data/ghc-8.10.2/rts/linker/Elf.c:1655:11:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
          memcpy((void*)P, &payload, sizeof(payload));
data/ghc-8.10.2/rts/linker/Elf.c:1676:11:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
          memcpy((void*)P, &payload, sizeof(payload));
data/ghc-8.10.2/rts/linker/Elf.c:1683:11:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
          memcpy((void*)P, &payload, sizeof(payload));
data/ghc-8.10.2/rts/linker/Elf.c:1703:11:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
          memcpy((void*)P, &payload, sizeof(payload));
data/ghc-8.10.2/rts/linker/Elf.c:1723:11:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
          memcpy((void*)P, &payload, sizeof(payload));
data/ghc-8.10.2/rts/linker/Elf.c:1739:11:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
          memcpy((void*)P, &payload, sizeof(payload));
data/ghc-8.10.2/rts/linker/Elf.c:1761:11:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
          memcpy((void*)P, &payload, sizeof(payload));
data/ghc-8.10.2/rts/linker/Elf.c:1781:11:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
          memcpy((void*)P, &payload, sizeof(payload));
data/ghc-8.10.2/rts/linker/LoadArchive.c:36:34:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static uint32_t read4Bytes(const char buf[static 4])
data/ghc-8.10.2/rts/linker/LoadArchive.c:41:31:  [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 StgBool loadFatArchive(char tmp[static 20], FILE* f, pathchar* path)
data/ghc-8.10.2/rts/linker/LoadArchive.c:149:32:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static StgBool checkFatArchive(char magic[static 20], FILE* f, pathchar* path)
data/ghc-8.10.2/rts/linker/LoadArchive.c:189: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).
        n = atoi(fileName + 1);
data/ghc-8.10.2/rts/linker/LoadArchive.c:221: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(fileName, gnuFileIndex + n, FileNameSize);
data/ghc-8.10.2/rts/linker/LoadArchive.c:254: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 tmp[20];
data/ghc-8.10.2/rts/linker/LoadArchive.c:370:22:  [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).
        memberSize = atoi(tmp);
data/ghc-8.10.2/rts/linker/LoadArchive.c:390:36:  [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).
                thisFileNameSize = atoi(fileName + 3);
data/ghc-8.10.2/rts/linker/LoadArchive.c:520:13:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
            sprintf(archiveMemberName, "%" PATH_FMT "(%.*s)",
data/ghc-8.10.2/rts/linker/MachO.c:1248: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(secMem, oc->image + section->offset, section->size);
data/ghc-8.10.2/rts/linker/PEi386.c:477:18:  [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 const char header_bigobj_classid[16] =
data/ghc-8.10.2/rts/linker/PEi386.c:1221: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 (oc->info->symbols+i, (char*)symtab + sym_size * i, sym_size);
data/ghc-8.10.2/rts/linker/PEi386.c:1226: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 (oc->info->str_tab, strtab + PEi386_STRTAB_OFFSET, n_strtab);
data/ghc-8.10.2/rts/linker/PEi386.c:1271: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 (section->info->relocs, reltab + relocs_offset,
data/ghc-8.10.2/rts/linker/PEi386.c:1824: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(extra->jumpIsland, jmp, 6);
data/ghc-8.10.2/rts/linker/PEi386.c:2070:13:  [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 symBuffer[50];
data/ghc-8.10.2/rts/linker/PEi386.c:2111: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 (newStart, start, size);
data/ghc-8.10.2/rts/linker/SymbolExtras.c:84:11:  [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, oc->image, oc->fileSize);
data/ghc-8.10.2/rts/linker/SymbolExtras.c:185: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(extra->jumpIsland, jmp, 6);
data/ghc-8.10.2/rts/posix/Signals.c:258:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(buf+1, info, sizeof(siginfo_t));
data/ghc-8.10.2/rts/posix/Signals.c:303: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(next_pending_handler, info, sizeof(siginfo_t));
data/ghc-8.10.2/rts/posix/Signals.c:472: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(info, next_pending_handler, sizeof(siginfo_t));
data/ghc-8.10.2/rts/win32/veh_excn.c:323:9:  [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 buffer[1024];
data/ghc-8.10.2/rts/xxhash.c:106:76:  [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* XXH_memcpy(void* dest, const void* src, size_t size) { return memcpy(dest,src,size); }
data/ghc-8.10.2/rts/xxhash.c:362: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(dstState, srcState, sizeof(*dstState));
data/ghc-8.10.2/rts/xxhash.c:373: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(statePtr, &state, sizeof(state));
data/ghc-8.10.2/rts/xxhash.c:507: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(dst, &hash, sizeof(*dst));
data/ghc-8.10.2/rts/xxhash.c:732: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(dstState, srcState, sizeof(*dstState));
data/ghc-8.10.2/rts/xxhash.c:743: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(statePtr, &state, sizeof(state));
data/ghc-8.10.2/rts/xxhash.c:880: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(dst, &hash, sizeof(*dst));
data/ghc-8.10.2/rts/xxhash.h:203:27:  [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.
typedef struct { unsigned char digest[4]; } XXH32_canonical_t;
data/ghc-8.10.2/rts/xxhash.h:238:27:  [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.
typedef struct { unsigned char digest[8]; } XXH64_canonical_t;
data/ghc-8.10.2/utils/fs/fs.c:58:3:  [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 ns[10] = {0};
data/ghc-8.10.2/utils/fs/fs.c:84:20:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
          result = memcpy (result, temp, wcslen (temp));
data/ghc-8.10.2/utils/fs/fs.c:98:16:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      result = memcpy (result, temp, wcslen (temp));
data/ghc-8.10.2/utils/fs/fs.c:374:10:  [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 *FS(fopen) (const char* filename, const char* mode)
data/ghc-8.10.2/utils/fs/fs.c:588:10:  [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 *FS(fopen) (const char* filename, const char* mode)
data/ghc-8.10.2/utils/fs/fs.c:590:10:  [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).
  return fopen (filename, mode);
data/ghc-8.10.2/utils/fs/fs.h:35:10:  [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 *FS(fopen) (const char* filename, const char* mode);
data/ghc-8.10.2/utils/fs/fs.h:49:10:  [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 *FS(fopen) (const char* filename, const char* mode);
data/ghc-8.10.2/utils/hp2ps/HpFile.c:339: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 numberstring[ NUMBER_LENGTH + 1 ];
data/ghc-8.10.2/utils/hp2ps/HpFile.c:365:22:  [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).
        theinteger = atoi(numberstring);
data/ghc-8.10.2/utils/hp2ps/HpFile.c:384: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 idbuffer[5000];
data/ghc-8.10.2/utils/hp2ps/Main.c:109:12:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
		TWENTY = atoi(*argv + 1);
data/ghc-8.10.2/utils/hp2ps/Utilities.c:49:14:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if ((r = fopen(s, mode)) == NULL) {
data/ghc-8.10.2/utils/lndir/lndir.c:179:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buf[BUFSIZE];
data/ghc-8.10.2/utils/lndir/lndir.c:253:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buf[MAXPATHLEN + 1], *p;
data/ghc-8.10.2/utils/lndir/lndir.c:254: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 symbuf[MAXPATHLEN + 1];
data/ghc-8.10.2/utils/lndir/lndir.c:255: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 basesym[MAXPATHLEN + 1];
data/ghc-8.10.2/utils/lndir/lndir.c:272: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 (buf, "../");
data/ghc-8.10.2/utils/lndir/lndir.c:421:12:  [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 fn[MAXPATHLEN+1];
data/ghc-8.10.2/utils/unlit/unlit.c:176:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buf[100];
data/ghc-8.10.2/utils/unlit/unlit.c:269: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 lineb[1000];
data/ghc-8.10.2/utils/unlit/unlit.c:286: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 lineb[1000];
data/ghc-8.10.2/driver/utils/cwrapper.c:95: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).
    cmdline_len = 1 + strlen(exePath)*2 + 2;
data/ghc-8.10.2/driver/utils/cwrapper.c:97:28:  [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).
        cmdline_len += 1 + strlen(args1[i])*2 + 2;
data/ghc-8.10.2/driver/utils/cwrapper.c:100:28:  [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).
        cmdline_len += 1 + strlen(args2[i])*2 + 2;
data/ghc-8.10.2/libraries/Cabal/Cabal/tests/cbits/rpmvercmp.c:40: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).
    char *buf1 = malloc(strlen(a) + 1);
data/ghc-8.10.2/libraries/Cabal/Cabal/tests/cbits/rpmvercmp.c:41: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).
    char *buf2 = malloc(strlen(b) + 1);
data/ghc-8.10.2/libraries/Cabal/Cabal/tests/cbits/rpmvercmp.c:116: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).
	    if (strlen(one) > strlen(two)) return 1;
data/ghc-8.10.2/libraries/Cabal/Cabal/tests/cbits/rpmvercmp.c:116:24:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	    if (strlen(one) > strlen(two)) return 1;
data/ghc-8.10.2/libraries/Cabal/Cabal/tests/cbits/rpmvercmp.c:117: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).
	    if (strlen(two) > strlen(one)) return -1;
data/ghc-8.10.2/libraries/Cabal/Cabal/tests/cbits/rpmvercmp.c:117:24:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	    if (strlen(two) > strlen(one)) return -1;
data/ghc-8.10.2/libraries/Win32/cbits/diatemp.c:33:23:  [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).
 ptr = (LPWORD)(str + wcslen(str) + 1);
data/ghc-8.10.2/libraries/Win32/cbits/diatemp.c:145:11:  [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).
    sz += wcslen(classname) + 1;
data/ghc-8.10.2/libraries/Win32/cbits/diatemp.c:150:11:  [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).
    sz += wcslen(text) + 1;
data/ghc-8.10.2/libraries/process/cbits/runProcess.c:332:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    r = read(forkCommunicationFds[0], &failCode, sizeof(failCode));
data/ghc-8.10.2/libraries/process/cbits/runProcess.c:364:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        r = read(forkCommunicationFds[0], &err, sizeof(err));
data/ghc-8.10.2/libraries/process/tests/process007_fd.c:21:21:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    while ((nRead = read(fd, buf, SIZE)) != 0) {
data/ghc-8.10.2/libraries/unix/cbits/execvpe.c:105:44:  [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 (path == NULL || (bp = buf = malloc(strlen(path)+strlen(name)+2)) == NULL)
data/ghc-8.10.2/libraries/unix/cbits/execvpe.c:105:57:  [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 (path == NULL || (bp = buf = malloc(strlen(path)+strlen(name)+2)) == NULL)
data/ghc-8.10.2/libraries/unix/cbits/execvpe.c:121: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).
	    lp = strlen(p);
data/ghc-8.10.2/libraries/unix/cbits/execvpe.c:122: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).
	ln = strlen(name);
data/ghc-8.10.2/rts/Adjustor.c:146: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).
    n_args = strlen(typeString) - 1;
data/ghc-8.10.2/rts/Adjustor.c:814:17:  [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 n = strlen(typeString),i;
data/ghc-8.10.2/rts/Hash.c:84:29:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    StgWord h = XXH64 (key, strlen(key), 1048583);
data/ghc-8.10.2/rts/Hash.c:86:29:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    StgWord h = XXH32 (key, strlen(key), 1048583);
data/ghc-8.10.2/rts/Hpc.c:65:12:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  tix_ch = getc(tixFile);
data/ghc-8.10.2/rts/Hpc.c:74:12:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  tix_ch = getc(tixFile);
data/ghc-8.10.2/rts/Hpc.c:79:14:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    tix_ch = getc(tixFile);
data/ghc-8.10.2/rts/Hpc.c:89:14:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    tix_ch = getc(tixFile);
data/ghc-8.10.2/rts/Hpc.c:102:14:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    tix_ch = getc(tixFile);
data/ghc-8.10.2/rts/Hpc.c:227:43:  [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).
    tixFilename = (char *) stgMallocBytes(strlen(hpc_tixdir) +
data/ghc-8.10.2/rts/Hpc.c:228:43:  [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).
                                          strlen(prog_name) + 12,
data/ghc-8.10.2/rts/Hpc.c:232:43:  [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).
    tixFilename = (char *) stgMallocBytes(strlen(prog_name) + 6,
data/ghc-8.10.2/rts/Linker.c:617:36:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      errmsg_copy = stgMallocBytes(strlen(errmsg)+1, "addDLL");
data/ghc-8.10.2/rts/Linker.c:722:7:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
      strncpy(line, (errmsg+(match[1].rm_so)),match_length);
data/ghc-8.10.2/rts/Linker.c:1388:48:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
       oc->archiveMemberName = stgMallocBytes( strlen(archiveMemberName)+1,
data/ghc-8.10.2/rts/PathUtils.c:23: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).
    ret = stgMallocBytes( strlen(path)+1, "pathdup" );
data/ghc-8.10.2/rts/PathUtils.h:16:17:  [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).
#define pathlen wcslen
data/ghc-8.10.2/rts/PathUtils.h:26:17:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
#define pathlen strlen
data/ghc-8.10.2/rts/ProfHeap.c:371: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).
    prog = stgMallocBytes(strlen(prog_name) + 1, "initHeapProfiling");
data/ghc-8.10.2/rts/ProfHeap.c:386:34:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    hp_filename = stgMallocBytes(strlen(prog) + 6, "hpFileName");
data/ghc-8.10.2/rts/ProfilerReportJson.c:28: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).
    in_size = strlen(str) + 1;
data/ghc-8.10.2/rts/Profiling.c:255:39:  [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).
        prog = arenaAlloc(prof_arena, strlen(prog_name) + 1);
data/ghc-8.10.2/rts/Profiling.c:279:48:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        prof_filename = arenaAlloc(prof_arena, strlen(stem) + 6);
data/ghc-8.10.2/rts/RetainerSet.c:221:12:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    size = strlen(tmp);
data/ghc-8.10.2/rts/RetainerSet.c:226:13:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
            strncpy(tmp + size, rs->element[j]->cc->label, max_length - size);
data/ghc-8.10.2/rts/RetainerSet.c:227:20:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            size = strlen(tmp);
data/ghc-8.10.2/rts/RetainerSet.c:230:13:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120). Risk is low because the source is a
  constant character.
            strncpy(tmp + size, ",", max_length - size);
data/ghc-8.10.2/rts/RetainerSet.c:231:20:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            size = strlen(tmp);
data/ghc-8.10.2/rts/RetainerSet.c:236:13:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
            strncpy(tmp + size, rs->element[j]->cc->label, max_length - size);
data/ghc-8.10.2/rts/RtsFlags.c:597:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(t, c1, c2-c1);
data/ghc-8.10.2/rts/RtsFlags.c:1509: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).
                          if (strlen(&rts_argv[arg][3]) == 0) {
data/ghc-8.10.2/rts/RtsFlags.c:1903: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).
        c = s[strlen(s)-1];
data/ghc-8.10.2/rts/RtsFlags.c:2039:35:  [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).
                    right = arg + strlen(arg);
data/ghc-8.10.2/rts/RtsFlags.c:2218:36:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    char *new_arg = stgMallocBytes(strlen(arg) + 1, "copyArg");
data/ghc-8.10.2/rts/RtsFlags.c:2271:29:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    last_slash = argv[0] + (strlen(argv[0]) - 1);
data/ghc-8.10.2/rts/RtsSymbols.c:217:32:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      SymI_HasProto_deprecated(read)                     \
data/ghc-8.10.2/rts/RtsSymbols.c:245:32:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
      SymI_HasProto_deprecated(umask)                    \
data/ghc-8.10.2/rts/Task.c:482: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).
  size_t procname_len = strlen(program_invocation_short_name);
data/ghc-8.10.2/rts/Task.c:488:7:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
      strncpy(worker_name, program_invocation_short_name, 13);
data/ghc-8.10.2/rts/ThreadLabels.c:105:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  len = strlen(label)+1;
data/ghc-8.10.2/rts/ThreadLabels.c:107:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
  strncpy(buf,label,len);
data/ghc-8.10.2/rts/eventlog/EventLog.c:188: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).
        const int len = strlen(buf);
data/ghc-8.10.2/rts/eventlog/EventLog.c:857: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).
    int strsize = strlen(msg);
data/ghc-8.10.2/rts/eventlog/EventLog.c:894:21:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        size += 1 + strlen(argv[i]);
data/ghc-8.10.2/rts/eventlog/EventLog.c:915:53:  [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).
        postBuf(&eventBuf, (StgWord8*) argv[i], 1 + strlen(argv[i]));
data/ghc-8.10.2/rts/eventlog/EventLog.c:1151: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).
    const size_t size = strlen(msg);
data/ghc-8.10.2/rts/eventlog/EventLog.c:1201: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).
    const int strsize = strlen(label);
data/ghc-8.10.2/rts/eventlog/EventLog.c:1310: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).
        flags->modSelector ? strlen(flags->modSelector) : 0;
data/ghc-8.10.2/rts/eventlog/EventLog.c:1312: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).
        flags->descrSelector ? strlen(flags->descrSelector) : 0;
data/ghc-8.10.2/rts/eventlog/EventLog.c:1314: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).
        flags->typeSelector ? strlen(flags->typeSelector) : 0;
data/ghc-8.10.2/rts/eventlog/EventLog.c:1316:29:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        flags->ccSelector ? strlen(flags->ccSelector) : 0;
data/ghc-8.10.2/rts/eventlog/EventLog.c:1318: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).
        flags->ccsSelector ? strlen(flags->ccsSelector) : 0;
data/ghc-8.10.2/rts/eventlog/EventLog.c:1320:35:  [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).
        flags->retainerSelector ? strlen(flags->retainerSelector) : 0;
data/ghc-8.10.2/rts/eventlog/EventLog.c:1322: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).
        flags->bioSelector ? strlen(flags->bioSelector) : 0;
data/ghc-8.10.2/rts/eventlog/EventLog.c:1377: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).
    StgWord label_len = strlen(label);
data/ghc-8.10.2/rts/eventlog/EventLog.c:1396: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).
    StgWord label_len = strlen(label);
data/ghc-8.10.2/rts/eventlog/EventLog.c:1397: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).
    StgWord module_len = strlen(module);
data/ghc-8.10.2/rts/eventlog/EventLog.c:1398: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).
    StgWord srcloc_len = strlen(srcloc);
data/ghc-8.10.2/rts/eventlog/EventLog.c:1559: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).
    const int desclen = strlen(et->desc);
data/ghc-8.10.2/rts/eventlog/EventLogWriter.c:42:37:  [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 *prog = stgMallocBytes(strlen(prog_name) + 1,
data/ghc-8.10.2/rts/eventlog/EventLogWriter.c:55:41:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        char *filename = stgMallocBytes(strlen(prog)
data/ghc-8.10.2/rts/linker/LoadArchive.c:121:44:  [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 memberLen = pathlen(dirName) + 1 + strlen(fileName) + 1;
data/ghc-8.10.2/rts/linker/LoadArchive.c:409:36:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                thisFileNameSize = strlen(fileName);
data/ghc-8.10.2/rts/linker/PEi386.c:382:21:  [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).
    const int len = wcslen(ms_dll);
data/ghc-8.10.2/rts/linker/PEi386.c:810:9:  [1] (buffer) wcscat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Risk is low because the source is a constant
  character.
        wcscat(newPath, L";");
data/ghc-8.10.2/rts/linker/PEi386.c:946:21:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    int symLen    = strlen(symbol) + 1;
data/ghc-8.10.2/rts/linker/PEi386.c:950:21:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    dllName       = strncpy(dllName, image + symLen, nameLen);
data/ghc-8.10.2/rts/linker/PEi386.c:996:7:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
      strncpy ((char*)dst,
data/ghc-8.10.2/rts/linker/PEi386.c:1033:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
   strncpy (newstr, (char*)name,8);
data/ghc-8.10.2/rts/linker/PEi386.c:1051:21:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        int len   = strlen(str);
data/ghc-8.10.2/rts/linker/PEi386.c:1054:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(newstr, str, len + 1);
data/ghc-8.10.2/rts/linker/PEi386.c:1061:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(newstr,(char*)name,8);
data/ghc-8.10.2/rts/linker/PEi386.c:1695: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).
          if (strlen(dllName) == 0 || dllName[0] == 0 || has_code_section)
data/ghc-8.10.2/rts/linker/PEi386.c:1727: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 size  = strlen(sname)+1;
data/ghc-8.10.2/rts/linker/PEi386.c:1730:11:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
          strncpy (tmp, sname, size);
data/ghc-8.10.2/rts/posix/itimer/Pthread.c:124:25:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            ssize_t r = read(timerfd, &nticks, sizeof(nticks));
data/ghc-8.10.2/rts/posix/itimer/Pthread.c:138:17:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
            if (usleep(TimeToUS(itimer_interval)) != 0 && errno != EINTR) {
data/ghc-8.10.2/rts/win32/GetEnv.c:40:42:  [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 (envp = env; *envp != 0; envp += strlen(envp) + 1) {
data/ghc-8.10.2/rts/win32/GetEnv.c:47:42:  [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 (envp = env; *envp != 0; envp += strlen(envp) + 1) {
data/ghc-8.10.2/rts/win32/IOManager.c:119:31:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                        len = read(work->workData.ioData.fd,
data/ghc-8.10.2/utils/fs/fs.c:68:26:  [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).
  for (size_t i = 0; i < wcslen (result); i++)
data/ghc-8.10.2/utils/fs/fs.c:84:42:  [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).
          result = memcpy (result, temp, wcslen (temp));
data/ghc-8.10.2/utils/fs/fs.c:98:38:  [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).
      result = memcpy (result, temp, wcslen (temp));
data/ghc-8.10.2/utils/fs/fs.c:121:14:  [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).
  int bLen = wcslen (result) + wcslen (ns) + 1 - startOffset;
data/ghc-8.10.2/utils/fs/fs.c:121:32:  [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).
  int bLen = wcslen (result) + wcslen (ns) + 1 - startOffset;
data/ghc-8.10.2/utils/fs/fs.c:297:13:  [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).
  int len = wcslen (mode);
data/ghc-8.10.2/utils/hp2ps/AuxFile.c:114:14:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        ch = getc(auxfp);
data/ghc-8.10.2/utils/hp2ps/Dimensions.c:47: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).
	bflag = strlen(jobstring) > SMALL_JOB_STRING_WIDTH; 
data/ghc-8.10.2/utils/hp2ps/HpFile.c:289:14:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        ch = getc(infp);
data/ghc-8.10.2/utils/hp2ps/HpFile.c:354:14:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        ch = getc(infp);
data/ghc-8.10.2/utils/hp2ps/HpFile.c:388:14:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        ch = getc(infp);
data/ghc-8.10.2/utils/hp2ps/HpFile.c:414:10:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    ch = getc(infp);    /* skip the '\"' that begins the string */
data/ghc-8.10.2/utils/hp2ps/HpFile.c:425:18:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            ch = getc(infp);
data/ghc-8.10.2/utils/hp2ps/HpFile.c:432:14:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        ch = getc(infp);
data/ghc-8.10.2/utils/hp2ps/Key.c:85:42:  [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 *escaped_name = (char*) xmalloc(strlen(name) * 2 + 1);
data/ghc-8.10.2/utils/hp2ps/Main.c:226:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    i = strlen(wstr) - 2;
data/ghc-8.10.2/utils/hp2ps/Utilities.c:107: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).
    r = (char*) xmalloc(strlen(s)+1);
data/ghc-8.10.2/utils/hp2ps/Utilities.c:117: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).
    r = (char*) xmalloc(strlen(s)+strlen(t)+1);
data/ghc-8.10.2/utils/hp2ps/Utilities.c:117:35:  [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).
    r = (char*) xmalloc(strlen(s)+strlen(t)+1);
data/ghc-8.10.2/utils/lndir/lndir.c:282: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).
    p = buf + strlen (buf);
data/ghc-8.10.2/utils/lndir/lndir.c:286:24:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        if (dp->d_name[strlen(dp->d_name) - 1] == '~')
data/ghc-8.10.2/utils/unlit/unlit.c:136:9:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    c = getc(istream);
data/ghc-8.10.2/utils/unlit/unlit.c:341:49:  [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).
	    prefix_str = (char*)malloc(sizeof(char)*(1+strlen(*argv)));

ANALYSIS SUMMARY:

Hits = 401
Lines analyzed = 112565 in approximately 3.21 seconds (35057 lines/second)
Physical Source Lines of Code (SLOC) = 73221
Hits@level = [0] 463 [1] 122 [2] 139 [3]  34 [4] 102 [5]   4
Hits@level+ = [0+] 864 [1+] 401 [2+] 279 [3+] 140 [4+] 106 [5+]   4
Hits/KSLOC@level+ = [0+] 11.7999 [1+] 5.47657 [2+] 3.81038 [3+] 1.91202 [4+] 1.44767 [5+] 0.0546291
Dot directories skipped = 7 (--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.