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/gap-4.11.0/hpcgap/demo/sumliouville2.c
Examining data/gap-4.11.0/hpcgap/demo/sumliouville.c
Examining data/gap-4.11.0/src/plist.c
Examining data/gap-4.11.0/src/permutat.cc
Examining data/gap-4.11.0/src/finfield.c
Examining data/gap-4.11.0/src/compiler.h
Examining data/gap-4.11.0/src/integer.c
Examining data/gap-4.11.0/src/scanner.c
Examining data/gap-4.11.0/src/objpcgel.h
Examining data/gap-4.11.0/src/pperm.h
Examining data/gap-4.11.0/src/scanner.h
Examining data/gap-4.11.0/src/cyclotom.c
Examining data/gap-4.11.0/src/streams.h
Examining data/gap-4.11.0/src/objpcgel.cc
Examining data/gap-4.11.0/src/system.c
Examining data/gap-4.11.0/src/macfloat.c
Examining data/gap-4.11.0/src/rational.h
Examining data/gap-4.11.0/src/gapw95.c
Examining data/gap-4.11.0/src/macfloat.h
Examining data/gap-4.11.0/src/stringobj.h
Examining data/gap-4.11.0/src/vars.c
Examining data/gap-4.11.0/src/sysenv.h
Examining data/gap-4.11.0/src/ariths.c
Examining data/gap-4.11.0/src/compiler.c
Examining data/gap-4.11.0/src/objccoll.h
Examining data/gap-4.11.0/src/hookintrprtr.c
Examining data/gap-4.11.0/src/sysmem.h
Examining data/gap-4.11.0/src/vecffe.c
Examining data/gap-4.11.0/src/sysfiles.h
Examining data/gap-4.11.0/src/set.h
Examining data/gap-4.11.0/src/ffdata.c
Examining data/gap-4.11.0/src/listoper.h
Examining data/gap-4.11.0/src/objcftl.c
Examining data/gap-4.11.0/src/ffdata.h
Examining data/gap-4.11.0/src/boehm_gc.c
Examining data/gap-4.11.0/src/saveload.h
Examining data/gap-4.11.0/src/bool.c
Examining data/gap-4.11.0/src/finfield_conway.h
Examining data/gap-4.11.0/src/sctable.h
Examining data/gap-4.11.0/src/dt.h
Examining data/gap-4.11.0/src/c_oper1.c
Examining data/gap-4.11.0/src/bags.c
Examining data/gap-4.11.0/src/funcs.c
Examining data/gap-4.11.0/src/iostream.c
Examining data/gap-4.11.0/src/range.c
Examining data/gap-4.11.0/src/records.h
Examining data/gap-4.11.0/src/io.h
Examining data/gap-4.11.0/src/error.h
Examining data/gap-4.11.0/src/bool.h
Examining data/gap-4.11.0/src/syntaxtree.h
Examining data/gap-4.11.0/src/gaputils.h
Examining data/gap-4.11.0/src/permutat.h
Examining data/gap-4.11.0/src/sysopt.h
Examining data/gap-4.11.0/src/weakptr.h
Examining data/gap-4.11.0/src/hpc/atomic.h
Examining data/gap-4.11.0/src/hpc/tlsconfig.h
Examining data/gap-4.11.0/src/hpc/threadapi.c
Examining data/gap-4.11.0/src/hpc/c_oper1.c
Examining data/gap-4.11.0/src/hpc/misc.c
Examining data/gap-4.11.0/src/hpc/region.h
Examining data/gap-4.11.0/src/hpc/thread.c
Examining data/gap-4.11.0/src/hpc/region.c
Examining data/gap-4.11.0/src/hpc/tls.c
Examining data/gap-4.11.0/src/hpc/serialize.c
Examining data/gap-4.11.0/src/hpc/threadapi.h
Examining data/gap-4.11.0/src/hpc/thread.h
Examining data/gap-4.11.0/src/hpc/tls.h
Examining data/gap-4.11.0/src/hpc/misc.h
Examining data/gap-4.11.0/src/hpc/c_type1.c
Examining data/gap-4.11.0/src/hpc/aobjects.c
Examining data/gap-4.11.0/src/hpc/serialize.h
Examining data/gap-4.11.0/src/hpc/traverse.c
Examining data/gap-4.11.0/src/hpc/guards.h
Examining data/gap-4.11.0/src/hpc/traverse.h
Examining data/gap-4.11.0/src/hpc/aobjects.h
Examining data/gap-4.11.0/src/sctable.c
Examining data/gap-4.11.0/src/objects.h
Examining data/gap-4.11.0/src/saveload.c
Examining data/gap-4.11.0/src/modules_builtin.c
Examining data/gap-4.11.0/src/streams.c
Examining data/gap-4.11.0/src/gasman_intern.h
Examining data/gap-4.11.0/src/gap_all.h
Examining data/gap-4.11.0/src/set.c
Examining data/gap-4.11.0/src/pperm.cc
Examining data/gap-4.11.0/src/vecgf2.c
Examining data/gap-4.11.0/src/read.h
Examining data/gap-4.11.0/src/exprs.h
Examining data/gap-4.11.0/src/code.h
Examining data/gap-4.11.0/src/compiled.h
Examining data/gap-4.11.0/src/integer.h
Examining data/gap-4.11.0/src/stats.c
Examining data/gap-4.11.0/src/records.c
Examining data/gap-4.11.0/src/code.c
Examining data/gap-4.11.0/src/hookintrprtr.h
Examining data/gap-4.11.0/src/objfgelm.h
Examining data/gap-4.11.0/src/blister.h
Examining data/gap-4.11.0/src/compstat.h
Examining data/gap-4.11.0/src/modules.c
Examining data/gap-4.11.0/src/opers.h
Examining data/gap-4.11.0/src/sortbase.h
Examining data/gap-4.11.0/src/vec8bit.c
Examining data/gap-4.11.0/src/gapstate.h
Examining data/gap-4.11.0/src/info.c
Examining data/gap-4.11.0/src/collectors.h
Examining data/gap-4.11.0/src/gap.c
Examining data/gap-4.11.0/src/profile.h
Examining data/gap-4.11.0/src/exprs.c
Examining data/gap-4.11.0/src/funcs.h
Examining data/gap-4.11.0/src/vec8bit.h
Examining data/gap-4.11.0/src/dteval.h
Examining data/gap-4.11.0/src/syntaxtree.c
Examining data/gap-4.11.0/src/opers.c
Examining data/gap-4.11.0/src/gvars.h
Examining data/gap-4.11.0/src/objset.c
Examining data/gap-4.11.0/src/stringobj.c
Examining data/gap-4.11.0/src/trans.h
Examining data/gap-4.11.0/src/calls.c
Examining data/gap-4.11.0/src/range.h
Examining data/gap-4.11.0/src/listfunc.h
Examining data/gap-4.11.0/src/trans.cc
Examining data/gap-4.11.0/src/listoper.c
Examining data/gap-4.11.0/src/compstat.c
Examining data/gap-4.11.0/src/dt.c
Examining data/gap-4.11.0/src/julia_gc.h
Examining data/gap-4.11.0/src/info.h
Examining data/gap-4.11.0/src/debug.h
Examining data/gap-4.11.0/src/vecffe.h
Examining data/gap-4.11.0/src/iostream.h
Examining data/gap-4.11.0/src/libgap-api.c
Examining data/gap-4.11.0/src/sysfiles.c
Examining data/gap-4.11.0/src/calls.h
Examining data/gap-4.11.0/src/c_type1.c
Examining data/gap-4.11.0/src/intrprtr.h
Examining data/gap-4.11.0/src/blister.c
Examining data/gap-4.11.0/src/libgap-api.h
Examining data/gap-4.11.0/src/rational.c
Examining data/gap-4.11.0/src/precord.c
Examining data/gap-4.11.0/src/gasman.h
Examining data/gap-4.11.0/src/lists.h
Examining data/gap-4.11.0/src/vector.h
Examining data/gap-4.11.0/src/modules.h
Examining data/gap-4.11.0/src/julia_gc.c
Examining data/gap-4.11.0/src/bits_intern.h
Examining data/gap-4.11.0/src/gap.h
Examining data/gap-4.11.0/src/finfield.h
Examining data/gap-4.11.0/src/objcftl.h
Examining data/gap-4.11.0/src/weakptr.c
Examining data/gap-4.11.0/src/objfgelm.cc
Examining data/gap-4.11.0/src/debug.c
Examining data/gap-4.11.0/src/ariths.h
Examining data/gap-4.11.0/src/intobj.h
Examining data/gap-4.11.0/src/intrprtr.c
Examining data/gap-4.11.0/src/plist.h
Examining data/gap-4.11.0/src/listfunc.c
Examining data/gap-4.11.0/src/tietze.h
Examining data/gap-4.11.0/src/baltree.h
Examining data/gap-4.11.0/src/vars.h
Examining data/gap-4.11.0/src/fibhash.h
Examining data/gap-4.11.0/src/read.c
Examining data/gap-4.11.0/src/error.c
Examining data/gap-4.11.0/src/objset.h
Examining data/gap-4.11.0/src/libgap_intern.h
Examining data/gap-4.11.0/src/objects.c
Examining data/gap-4.11.0/src/gvars.c
Examining data/gap-4.11.0/src/intfuncs.h
Examining data/gap-4.11.0/src/intfuncs.c
Examining data/gap-4.11.0/src/tietze.c
Examining data/gap-4.11.0/src/system.h
Examining data/gap-4.11.0/src/precord.h
Examining data/gap-4.11.0/src/vector.c
Examining data/gap-4.11.0/src/sysmem.c
Examining data/gap-4.11.0/src/modules_builtin.h
Examining data/gap-4.11.0/src/lists.c
Examining data/gap-4.11.0/src/costab.h
Examining data/gap-4.11.0/src/dteval.c
Examining data/gap-4.11.0/src/profile.c
Examining data/gap-4.11.0/src/stats.h
Examining data/gap-4.11.0/src/cyclotom.h
Examining data/gap-4.11.0/src/collectors.cc
Examining data/gap-4.11.0/src/boehm_gc.h
Examining data/gap-4.11.0/src/vecgf2.h
Examining data/gap-4.11.0/src/dynarray.h
Examining data/gap-4.11.0/src/io.c
Examining data/gap-4.11.0/src/costab.c
Examining data/gap-4.11.0/src/gasman.c
Examining data/gap-4.11.0/tst/test-compile/and_filter.g.static.c
Examining data/gap-4.11.0/tst/test-compile/callfunc.g.static.c
Examining data/gap-4.11.0/tst/test-compile/assert.g.static.c
Examining data/gap-4.11.0/tst/test-compile/print_various.g.dynamic.c
Examining data/gap-4.11.0/tst/test-compile/callfunc.g.dynamic.c
Examining data/gap-4.11.0/tst/test-compile/assert.g.dynamic.c
Examining data/gap-4.11.0/tst/test-compile/basics.g.dynamic.c
Examining data/gap-4.11.0/tst/test-compile/info.g.static.c
Examining data/gap-4.11.0/tst/test-compile/print_various.g.static.c
Examining data/gap-4.11.0/tst/test-compile/basics.g.static.c
Examining data/gap-4.11.0/tst/test-compile/plus.g.dynamic.c
Examining data/gap-4.11.0/tst/test-compile/function_types.g.dynamic.c
Examining data/gap-4.11.0/tst/test-compile/and_filter.g.dynamic.c
Examining data/gap-4.11.0/tst/test-compile/ranges.g.static.c
Examining data/gap-4.11.0/tst/test-compile/info.g.dynamic.c
Examining data/gap-4.11.0/tst/test-compile/ranges.g.dynamic.c
Examining data/gap-4.11.0/tst/test-compile/function_types.g.static.c
Examining data/gap-4.11.0/tst/test-compile/plus.g.static.c
Examining data/gap-4.11.0/tst/testkernel/dstruct.c
Examining data/gap-4.11.0/tst/testlibgap/wscreate.c
Examining data/gap-4.11.0/tst/testlibgap/common.c
Examining data/gap-4.11.0/tst/testlibgap/wsload.c
Examining data/gap-4.11.0/tst/testlibgap/api.c
Examining data/gap-4.11.0/tst/testlibgap/common.h
Examining data/gap-4.11.0/tst/testlibgap/basic.c

FINAL RESULTS:

data/gap-4.11.0/src/sysfiles.c:465:23:  [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.
        ssize_t ret = readlink("/proc/self/exe", locBuf, sizeof(locBuf));
data/gap-4.11.0/src/sysfiles.c:472:23:  [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.
        ssize_t ret = readlink("/proc/curproc/file", locBuf, sizeof(locBuf));
data/gap-4.11.0/src/sysfiles.c:479:23:  [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.
        ssize_t ret = readlink("/proc/curproc/exe", locBuf, sizeof(locBuf));
data/gap-4.11.0/src/hpc/thread.c:52:23:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
    int               system;
data/gap-4.11.0/src/hpc/thread.c:1008:33:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
            if (!thread_data[i].system)
data/gap-4.11.0/src/hpc/thread.c:1229:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(buffer, "No %s access to object %llu of type %s\n"
data/gap-4.11.0/src/hpc/threadapi.c:1806:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(buf, "<thread #%ld: %s>", (long)thread->id, status_message);
data/gap-4.11.0/src/intrprtr.h:281:34:  [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.
void IntrQualifiedExprBegin(UInt access);
data/gap-4.11.0/src/iostream.c:451:9:  [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(prg, args);
data/gap-4.11.0/src/macfloat.c:73:9:  [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(buf, bufsize, "%.*" PRINTFFORMAT, precision, val);
data/gap-4.11.0/src/profile.c:354:18:  [4] (shell) popen:
  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.
    ps->Stream = popen(popen_buf, "w");
data/gap-4.11.0/src/read.c:1835:44:  [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.
  TRY_IF_NO_ERROR { IntrQualifiedExprBegin(access); }
data/gap-4.11.0/src/saveload.c:522: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(SyKernelDescription, SyKernelVersion);
data/gap-4.11.0/src/sysfiles.c:414:41:  [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.
        if (realpath(argv0, result) && !access(result, F_OK)) {
data/gap-4.11.0/src/sysfiles.c:424:42:  [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.
        if (realpath(tmpbuf, result) && !access(result, F_OK)) {
data/gap-4.11.0/src/sysfiles.c:437:46:  [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.
            if (realpath(tmpbuf, result) && !access(result, F_OK)) {
data/gap-4.11.0/src/sysfiles.c:3212:11:  [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.
    res = access( name, F_OK );
data/gap-4.11.0/src/sysfiles.c:3232:11:  [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.
    res = access( name, R_OK );
data/gap-4.11.0/src/sysfiles.c:3239:15:  [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.
        res = access(xname, R_OK);
data/gap-4.11.0/src/sysfiles.c:3261:11:  [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.
    res = access( name, W_OK );
data/gap-4.11.0/src/sysfiles.c:3281:11:  [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.
    res = access( name, X_OK );
data/gap-4.11.0/src/system.c:505: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/gap-4.11.0/src/system.h:398:27:  [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.
    __attribute__((format(printf, 3, 4)))
data/gap-4.11.0/src/boehm_gc.c:283:10:  [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 (!getenv("GC_MARKERS")) {
data/gap-4.11.0/src/objects.c:2209:24:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    ReadOnlyDatObjs = (getenv("GAP_READONLY_DATOBJS") != 0);
data/gap-4.11.0/src/sysfiles.c:414:13:  [3] (buffer) realpath:
  This function does not protect against buffer overflows, and some
  implementations can overflow internally (CWE-120/CWE-785!). Ensure that the
  destination buffer is at least of size MAXPATHLEN, andto protect against
  implementation problems, the input argument should also be checked to
  ensure it is no larger than MAXPATHLEN.
        if (realpath(argv0, result) && !access(result, F_OK)) {
data/gap-4.11.0/src/sysfiles.c:424:13:  [3] (buffer) realpath:
  This function does not protect against buffer overflows, and some
  implementations can overflow internally (CWE-120/CWE-785!). Ensure that the
  destination buffer is at least of size MAXPATHLEN, andto protect against
  implementation problems, the input argument should also be checked to
  ensure it is no larger than MAXPATHLEN.
        if (realpath(tmpbuf, result) && !access(result, F_OK)) {
data/gap-4.11.0/src/sysfiles.c:431:26:  [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.
        strlcpy(pathenv, getenv("PATH"), sizeof(pathenv));
data/gap-4.11.0/src/sysfiles.c:437:17:  [3] (buffer) realpath:
  This function does not protect against buffer overflows, and some
  implementations can overflow internally (CWE-120/CWE-785!). Ensure that the
  destination buffer is at least of size MAXPATHLEN, andto protect against
  implementation problems, the input argument should also be checked to
  ensure it is no larger than MAXPATHLEN.
            if (realpath(tmpbuf, result) && !access(result, F_OK)) {
data/gap-4.11.0/src/sysfiles.c:490:10:  [3] (buffer) realpath:
  This function does not protect against buffer overflows, and some
  implementations can overflow internally (CWE-120/CWE-785!). Ensure that the
  destination buffer is at least of size MAXPATHLEN, andto protect against
  implementation problems, the input argument should also be checked to
  ensure it is no larger than MAXPATHLEN.
    if (!realpath(locBuf, GAPExecLocation))
data/gap-4.11.0/src/sysfiles.c:1244:19:  [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 ((sp = getenv("TERM")) != NULL && tgetent(bp,sp) == 1) {
data/gap-4.11.0/src/sysfiles.c:3456:23:  [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 * env_tmpdir = getenv("TMPDIR");
data/gap-4.11.0/src/system.c:1224:10:  [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 ( getenv("HOME") != 0 ) {
data/gap-4.11.0/src/system.c:1225:29:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
        strxcpy(DotGapPath, getenv("HOME"), sizeof(DotGapPath));
data/gap-4.11.0/src/system.c:1234:29:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
        strxcpy(DotGapPath, getenv("HOME"), sizeof(DotGapPath));
data/gap-4.11.0/src/system.c:1250:27:  [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.
        strxcpy(userhome, getenv("HOME"), sizeof(userhome));
data/gap-4.11.0/hpcgap/demo/sumliouville.c:60:11:  [2] (integer) atol:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
  begin = atol(argv[1]);
data/gap-4.11.0/hpcgap/demo/sumliouville.c:61:9:  [2] (integer) atol:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
  end = atol(argv[2]);
data/gap-4.11.0/hpcgap/demo/sumliouville2.c:52:14:  [2] (integer) atol:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
  beginall = atol(argv[1]);
data/gap-4.11.0/hpcgap/demo/sumliouville2.c:53:12:  [2] (integer) atol:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
  endall = atol(argv[2]);
data/gap-4.11.0/hpcgap/demo/sumliouville2.c:54:12:  [2] (integer) atol:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
  intlen = atol(argv[3]);
data/gap-4.11.0/src/bits_intern.h:91: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(toblock, fromblock, sizeof(UInt) * wholeblocks);
data/gap-4.11.0/src/blister.c:217: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(ADDR_OBJ(copy), CONST_ADDR_OBJ(list),
data/gap-4.11.0/src/boehm_gc.c:49: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 DSInfoBags[NUM_TYPES];
data/gap-4.11.0/src/boehm_gc.c:157:17:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static unsigned char TLAllocatorSeg[TL_GC_SIZE / GRANULE_SIZE + 1];
data/gap-4.11.0/src/boehm_gc.c:290:16:  [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 marker_env_str[32];
data/gap-4.11.0/src/boehm_gc.c:300:9:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
        sprintf(marker_env_str, "GC_MARKERS=%u", num_markers);
data/gap-4.11.0/src/boehm_gc.c:366: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(new_mem, old_mem, size);
data/gap-4.11.0/src/boehm_gc.c:531: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(DATA(header), src, old_size < new_size ? old_size : new_size);
data/gap-4.11.0/src/debug.h:43: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.
    typedef char _intern_CONCAT(static_assertion_, __LINE__)[(cond)? 1 : -1]
data/gap-4.11.0/src/dynarray.h:73: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(items, arr->items, sizeof(ELEM_TYPE) * arr->len);
data/gap-4.11.0/src/dynarray.h:83: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(items, arr->items, sizeof(ELEM_TYPE) * arr->len);
data/gap-4.11.0/src/dynarray.h:94: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(clone->items, arr->items, sizeof(ELEM_TYPE) * arr->len);
data/gap-4.11.0/src/dynarray.h: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(in, arr->items, sizeof(ELEM_TYPE) * len);
data/gap-4.11.0/src/error.c:277: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((void *)&readJmpError, (void *)&STATE(ReadJmpError),
data/gap-4.11.0/src/error.c:327: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((void *)&STATE(ReadJmpError), (void *)&readJmpError,
data/gap-4.11.0/src/error.c:569: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 msgbuf[1024] = { 0 };
data/gap-4.11.0/src/ffdata.c:7:16:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
const unsigned char DegrFF[NUM_SHORT_FINITE_FIELDS+1] = {
data/gap-4.11.0/src/ffdata.h:9:23:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
extern const unsigned char DegrFF[NUM_SHORT_FINITE_FIELDS+1];
data/gap-4.11.0/src/gap.c:134: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( readJmpError, STATE(ReadJmpError), sizeof(syJmp_buf) );
data/gap-4.11.0/src/gap.c:144: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( STATE(ReadJmpError), readJmpError, sizeof(syJmp_buf) );
data/gap-4.11.0/src/gap.c:740: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( ptr, CONST_CSTR_STRING( ELM_LIST(args,1) ), 3 + 1 );
data/gap-4.11.0/src/gap.c:1680: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.
                    char    buf[41];
data/gap-4.11.0/src/gvars.c:262: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, &val, sizeof(GVarFlagInfo));
data/gap-4.11.0/src/gvars.c:271: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(&val, &info, sizeof(GVarFlagInfo));
data/gap-4.11.0/src/gvars.c:1606: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 cookies[6][GVAR_BUCKETS][10];
data/gap-4.11.0/src/gvars.c:1609:7:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
      sprintf((cookies[0][i]), "Vgv%d", i);
data/gap-4.11.0/src/gvars.c:1610:7:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
      sprintf((cookies[1][i]), "Ngv%d", i);
data/gap-4.11.0/src/gvars.c:1611:7:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
      sprintf((cookies[2][i]), "Wgv%d", i);
data/gap-4.11.0/src/gvars.c:1612:7:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
      sprintf((cookies[3][i]), "Egv%d", i);
data/gap-4.11.0/src/gvars.c:1613:7:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
      sprintf((cookies[4][i]), "Cgv%d", i);
data/gap-4.11.0/src/gvars.c:1614:7:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
      sprintf((cookies[5][i]), "Fgv%d", i);
data/gap-4.11.0/src/hpc/aobjects.c:534: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(newtable + TLR_DATA, table + TLR_DATA,
data/gap-4.11.0/src/hpc/aobjects.c:954: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(ADDR_OBJ(copy), CONST_ADDR_OBJ(obj), SIZE_BAG(obj));
data/gap-4.11.0/src/hpc/aobjects.c:957: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(ADDR_OBJ(innerCopy), CONST_ADDR_OBJ(inner), SIZE_BAG(inner));
data/gap-4.11.0/src/hpc/aobjects.c:1157: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(ADDR_OBJ(result), CONST_ADDR_OBJ(defrec), SIZE_BAG(defrec));
data/gap-4.11.0/src/hpc/aobjects.c:1365: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(PTR_BAG(newlist), PTR_BAG(list),
data/gap-4.11.0/src/hpc/aobjects.c:1460: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(PTR_BAG(newlist), PTR_BAG(list), sizeof(AtomicObj)*(2+len));
data/gap-4.11.0/src/hpc/misc.c:70: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(to, from1, width);
data/gap-4.11.0/src/hpc/misc.c:75: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(to, from2, width);
data/gap-4.11.0/src/hpc/misc.c:82: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(to, from1, size1 * width);
data/gap-4.11.0/src/hpc/misc.c:84: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(to, from2, size2 * width);
data/gap-4.11.0/src/hpc/misc.c:97: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(aux, data, width);
data/gap-4.11.0/src/hpc/misc.c:98: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(data, data + width, width);
data/gap-4.11.0/src/hpc/misc.c:99: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(data + width, aux, width);
data/gap-4.11.0/src/hpc/misc.c:110: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(aux, data, count * width);
data/gap-4.11.0/src/hpc/serialize.c:77: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(CSTR_STRING(target) + size, addr, count);
data/gap-4.11.0/src/hpc/serialize.c:133: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(addr, CONST_CSTR_STRING(str) + off, size);
data/gap-4.11.0/src/hpc/serialize.c:1014: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[16];
data/gap-4.11.0/src/hpc/serialize.c:1017:9:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
        sprintf(buf, "<%d>", (int)TNUM_OBJ(obj));
data/gap-4.11.0/src/hpc/serialize.c:1036: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(readJmpError, STATE(ReadJmpError), sizeof(syJmp_buf));
data/gap-4.11.0/src/hpc/serialize.c:1038: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(STATE(ReadJmpError), readJmpError, sizeof(syJmp_buf));
data/gap-4.11.0/src/hpc/serialize.c:1046: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(STATE(ReadJmpError), readJmpError, sizeof(syJmp_buf));
data/gap-4.11.0/src/hpc/serialize.c:1062: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(readJmpError, STATE(ReadJmpError), sizeof(syJmp_buf));
data/gap-4.11.0/src/hpc/serialize.c:1064: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(STATE(ReadJmpError), readJmpError, sizeof(syJmp_buf));
data/gap-4.11.0/src/hpc/serialize.c:1070: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(STATE(ReadJmpError), readJmpError, sizeof(syJmp_buf));
data/gap-4.11.0/src/hpc/thread.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(CSTR_STRING(result), cstr1, len1);
data/gap-4.11.0/src/hpc/thread.c:304: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(CSTR_STRING(result) + len1, cstr2, len2);
data/gap-4.11.0/src/hpc/thread.c:329: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[8];
data/gap-4.11.0/src/hpc/thread.c:330:9:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
        sprintf(buf, "%d", TLS(threadID));
data/gap-4.11.0/src/hpc/threadapi.c:254: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.
        if ((char *)(monitors[i - 1]) > (char *)(monitors[i]))
data/gap-4.11.0/src/hpc/threadapi.c:254:42:  [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 ((char *)(monitors[i - 1]) > (char *)(monitors[i]))
data/gap-4.11.0/src/hpc/threadapi.c:840: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(readJmpError, STATE(ReadJmpError), sizeof(jmp_buf));
data/gap-4.11.0/src/hpc/threadapi.c:851: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(STATE(ReadJmpError), readJmpError, sizeof(jmp_buf));
data/gap-4.11.0/src/hpc/threadapi.c:859: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(readJmpError, STATE(ReadJmpError), sizeof(jmp_buf));
data/gap-4.11.0/src/hpc/threadapi.c:870: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(STATE(ReadJmpError), readJmpError, sizeof(jmp_buf));
data/gap-4.11.0/src/hpc/threadapi.c:928: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(readJmpError, STATE(ReadJmpError), sizeof(syJmp_buf));
data/gap-4.11.0/src/hpc/threadapi.c:930: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(STATE(ReadJmpError), readJmpError, sizeof(syJmp_buf));
data/gap-4.11.0/src/hpc/threadapi.c:936: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(STATE(ReadJmpError), readJmpError, sizeof(syJmp_buf));
data/gap-4.11.0/src/hpc/threadapi.c:1785: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/gap-4.11.0/src/hpc/threadapi.c:1815: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        buffer[100];
data/gap-4.11.0/src/hpc/threadapi.c:1819: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(buffer, "<semaphore %p: count = %ld>", (void *)sem, (long)count);
data/gap-4.11.0/src/hpc/threadapi.c:1827: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      buffer[20];
data/gap-4.11.0/src/hpc/threadapi.c:1829: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(buffer, "%p: ", (void *)channel);
data/gap-4.11.0/src/hpc/threadapi.c:1851: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      buffer[20];
data/gap-4.11.0/src/hpc/threadapi.c:1853: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(buffer, "%p: ", (void *)barrier);
data/gap-4.11.0/src/hpc/threadapi.c:1865: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      buffer[20];
data/gap-4.11.0/src/hpc/threadapi.c:1874: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(buffer, "%p>", (void *)syncvar);
data/gap-4.11.0/src/hpc/threadapi.c:1880: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     buffer[32];
data/gap-4.11.0/src/hpc/traverse.c:265: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(ptr, CONST_ADDR_OBJ(original), size);
data/gap-4.11.0/src/integer.c:724: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(ADDR_INT(obj), limbs, size * sizeof(mp_limb_t));
data/gap-4.11.0/src/integer.c:977: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 LogTable256[256] = {
data/gap-4.11.0/src/integer.c:1353: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( ADDR_INT(inv), CONST_ADDR_INT(op), SIZE_OBJ(op) );
data/gap-4.11.0/src/integer.c:1383: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( ADDR_INT(a), CONST_ADDR_INT(op), SIZE_OBJ(op) );
data/gap-4.11.0/src/intfuncs.c:310: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(&val, p + i, sizeof(uint64_t));
data/gap-4.11.0/src/io.c:1314: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(CHARS_STRING(str) + lstr, line, len);
data/gap-4.11.0/src/iostream.c:202:14:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    *slave = open(ptsname(*master), O_RDWR, 0);
data/gap-4.11.0/src/iostream.c:396: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).
    oldwd = open(".", O_RDONLY | O_DIRECTORY | O_CLOEXEC);
data/gap-4.11.0/src/julia_gc.c:935: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(header, BAG_HEADER(bag), sizeof(BagHeader) + old_size);
data/gap-4.11.0/src/listfunc.c:269: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(ADDR_OBJ(list1) + 1 + len1, CONST_ADDR_OBJ(list2) + 1,
data/gap-4.11.0/src/listfunc.c:1275:21:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                    memcpy( (char *)(ADDR_OBJ(comp)) + sizeof(Obj),
data/gap-4.11.0/src/macfloat.c:64: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, "nan");
data/gap-4.11.0/src/macfloat.c:68:13:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
            strcpy(buf, "inf");
data/gap-4.11.0/src/macfloat.c:70:13:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
            strcpy(buf, "-inf");
data/gap-4.11.0/src/macfloat.h:35: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(&val, CONST_ADDR_OBJ(obj), sizeof(Double));
data/gap-4.11.0/src/macfloat.h:41: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(ADDR_OBJ(obj), &val, sizeof(Double));
data/gap-4.11.0/src/modules.c:596: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 buffer[512];
data/gap-4.11.0/src/modules.c:598: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(buffer, cookie, len);
data/gap-4.11.0/src/modules.c:837: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(NextLoadedModuleFilename, filename, len + 1);
data/gap-4.11.0/src/objects.c:82: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.
static const char * NameOfType[NUM_TYPES];
data/gap-4.11.0/src/objects.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(n, o, SIZE_OBJ(obj) );
data/gap-4.11.0/src/objects.c:643: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(ADDR_OBJ(copy), CONST_ADDR_OBJ(obj), SIZE_OBJ(obj));
data/gap-4.11.0/src/objects.c:701: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(ADDR_OBJ(copy), CONST_ADDR_OBJ(obj), SIZE_OBJ(obj));
data/gap-4.11.0/src/objects.c:864: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(buffer, "%p", (void *)region);
data/gap-4.11.0/src/objects.c:1831: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(pdst, psrc, SIZE_OBJ(src));
data/gap-4.11.0/src/opers.c:1650:25:  [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, cache + i,
data/gap-4.11.0/src/opers.c:1655:25:  [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(cache + target, buf,
data/gap-4.11.0/src/opers.c:2533: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( ptr, addon, addon_len );
data/gap-4.11.0/src/opers.c:2536: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( ptr, CONST_CSTR_STRING(name), name_len );
data/gap-4.11.0/src/opers.c:2552: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( ptr, prefix, prefix_len );
data/gap-4.11.0/src/opers.c:2554: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( ptr, CONST_CSTR_STRING(name), name_len );
data/gap-4.11.0/src/opers.c:2943: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(ADDR_OBJ(oper), CONST_ADDR_OBJ(func), SIZE_OBJ(func));
data/gap-4.11.0/src/permutat.cc:2632: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(ptR, ptG, sizeof(TG) * dg);
data/gap-4.11.0/src/plist.c:802: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(ADDR_OBJ(new), CONST_ADDR_OBJ(list), (len + 1) * sizeof(Obj));
data/gap-4.11.0/src/plist.h:324: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(BASE_PTR_PLIST(o), list, length * sizeof(Obj));
data/gap-4.11.0/src/precord.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(ADDR_OBJ(copy), CONST_ADDR_OBJ(rec), SIZE_OBJ(rec));
data/gap-4.11.0/src/precord.c:516: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(ADDR_OBJ(rec) + 2, CONST_ADDR_OBJ(space) + 2,
data/gap-4.11.0/src/profile.c:127: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 filename[GAP_PATH_MAX];
data/gap-4.11.0/src/profile.c:189:11:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    const char timeTypeNames[3][10] = { "WallTime", "CPUTime", "Memory" };
data/gap-4.11.0/src/profile.c:347: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 popen_buf[4096];
data/gap-4.11.0/src/profile.c:360:16:  [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).
  ps->Stream = fopen(name, "w");
data/gap-4.11.0/src/profile.c:384: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 filenamecpy[GAP_PATH_MAX];
data/gap-4.11.0/src/read.c:2557: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( readJmpError, STATE(ReadJmpError), sizeof(syJmp_buf) );
data/gap-4.11.0/src/read.c:2622: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( STATE(ReadJmpError), readJmpError, sizeof(syJmp_buf) );
data/gap-4.11.0/src/read.c:2684: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( readJmpError, STATE(ReadJmpError), sizeof(syJmp_buf) );
data/gap-4.11.0/src/read.c:2742: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( STATE(ReadJmpError), readJmpError, sizeof(syJmp_buf) );
data/gap-4.11.0/src/read.c:2803: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( s->readJmpError, STATE(ReadJmpError), sizeof(syJmp_buf) );
data/gap-4.11.0/src/read.c:2819: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( STATE(ReadJmpError), s->readJmpError, sizeof(syJmp_buf) );
data/gap-4.11.0/src/records.c:167: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( namx, name, len );
data/gap-4.11.0/src/saveload.c:446: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 = fopen((Char *)CHARS_STRING(filename),"w");
data/gap-4.11.0/src/saveload.c:524:9:  [2] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant string.
        strcat(SyKernelDescription, " with readline");
data/gap-4.11.0/src/scanner.c:159: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(s, buf, bufsize);
data/gap-4.11.0/src/scanner.c:420: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(s->Value, CONST_CSTR_STRING(s->ValueObj), MAX_VALUE_LEN);
data/gap-4.11.0/src/streams.c:734: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( readJmpError, STATE(ReadJmpError), sizeof(syJmp_buf) );
data/gap-4.11.0/src/streams.c:741: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( STATE(ReadJmpError), readJmpError, sizeof(syJmp_buf) );
data/gap-4.11.0/src/streams.c:744: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( STATE(ReadJmpError), readJmpError, sizeof(syJmp_buf) );
data/gap-4.11.0/src/streams.c:791: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(readJmpError, STATE(ReadJmpError), sizeof(syJmp_buf));
data/gap-4.11.0/src/streams.c:810: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( STATE(ReadJmpError), readJmpError, sizeof(syJmp_buf) );
data/gap-4.11.0/src/streams.c:813: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(STATE(ReadJmpError), readJmpError, sizeof(syJmp_buf));
data/gap-4.11.0/src/streams.c:1447: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( cstr, buf, buflen+1 );
data/gap-4.11.0/src/streams.c:1525: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(CHARS_STRING(str)+len, buf, lstr);
data/gap-4.11.0/src/stringobj.c:514: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(ADDR_OBJ(copy)+1, CONST_ADDR_OBJ(list)+1,
data/gap-4.11.0/src/stringobj.c:547: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  PrStrBuf[10007]; /* 7 for a \c\123 at the end */
data/gap-4.11.0/src/stringobj.c:1103: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(ADDR_OBJ(list), CONST_ADDR_OBJ(tmp), SIZE_OBJ(tmp));
data/gap-4.11.0/src/stringobj.c:1171: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(CHARS_STRING(copy), CONST_CHARS_STRING(string),
data/gap-4.11.0/src/stringobj.c:1239: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(ADDR_OBJ(string), CONST_ADDR_OBJ(tmp), SIZE_OBJ(tmp));
data/gap-4.11.0/src/stringobj.c:1623: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.
  unsigned char table[1<<(8*sizeof(char))];
data/gap-4.11.0/src/stringobj.h:237: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(CHARS_STRING(str), pnt, n);
data/gap-4.11.0/src/stringobj.h:335: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(CHARS_STRING(result), buf, len);
data/gap-4.11.0/src/sysfiles.c:410: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 tmpbuf[GAP_PATH_MAX];
data/gap-4.11.0/src/sysfiles.c:430: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 pathenv[GAP_PATH_MAX], *saveptr, *pathitem;
data/gap-4.11.0/src/sysfiles.c:447:1:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
char GAPExecLocation[GAP_PATH_MAX] = "";
data/gap-4.11.0/src/sysfiles.c:453: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 locBuf[GAP_PATH_MAX] = "";
data/gap-4.11.0/src/sysfiles.c:851:21:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    syBuf[fid].fp = open(name,flags, 0644);
data/gap-4.11.0/src/sysfiles.c:1242: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 bp[1024];
data/gap-4.11.0/src/sysfiles.c:1516: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(ptr, syBuffers[bufno].buf + syBuffers[bufno].bufstart,
data/gap-4.11.0/src/sysfiles.c:2011: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(line, bufstart, newlinepos - bufstart);
data/gap-4.11.0/src/sysfiles.c:2476: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(line,CONST_CHARS_STRING(linestr),len);
data/gap-4.11.0/src/sysfiles.c:2481: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(yank,CONST_CHARS_STRING(yankstr),len);
data/gap-4.11.0/src/sysfiles.c:3004:15:  [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).
        tin = open( "/dev/null", O_RDONLY );
data/gap-4.11.0/src/sysfiles.c:3012:16:  [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).
        tout = open( "/dev/null", O_WRONLY );
data/gap-4.11.0/src/sysfiles.c:3109:11:  [2] (race) vfork:
  On some old systems, vfork() permits race conditions, and it's very
  difficult to use correctly (CWE-362). Use fork() instead.
    pid = vfork();
data/gap-4.11.0/src/sysfiles.c:3151:19:  [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).
            tin = open( "/dev/null", O_RDONLY );
data/gap-4.11.0/src/sysfiles.c:3162:20:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
            tout = open( "/dev/null", O_WRONLY );
data/gap-4.11.0/src/sysfiles.c:3428:10:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  static char name[1024];
data/gap-4.11.0/src/sysfiles.c:3430:9:  [2] (tmpfile) mkstemp:
  Potential for temporary file vulnerability in some circumstances. Some
  older Unix-like systems create temp files with permission to write by all
  by default, so be sure to set the umask to override this. Also, some older
  Unix systems might fail to use O_EXCL when opening the file, so make sure
  that O_EXCL is used by the library (CWE-377).
  close(mkstemp(name));
data/gap-4.11.0/src/sysfiles.c:3454:10:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  static char name[1024];
data/gap-4.11.0/src/sysfiles.c:3495: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( CHARS_STRING(str)+lstr, buf, ret );
data/gap-4.11.0/src/sysfiles.c:3583: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(dst, src, size);
data/gap-4.11.0/src/sysfiles.c:3678:29:  [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).
            syBuf[0].echo = open(ttyname(fileno(stdin)), O_WRONLY);
data/gap-4.11.0/src/sysfiles.c:3697:27:  [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).
            syBuf[2].fp = open(ttyname(fileno(stderr)), O_RDONLY);
data/gap-4.11.0/src/sysfiles.h:67:8:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
extern char GAPExecLocation[GAP_PATH_MAX];
data/gap-4.11.0/src/sysmem.c:255:14:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    int fd = open("/dev/shm/gapmem", O_RDWR | O_CREAT | O_EXCL, 0600);
data/gap-4.11.0/src/system.c:778: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 pathbuf[GAP_PATH_MAX];
data/gap-4.11.0/src/system.c:779: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 initgbuf[GAP_PATH_MAX];
data/gap-4.11.0/src/system.c:1259: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(SyGapRootPaths[i], userhome, userhomelen);
data/gap-4.11.0/src/vars.c:2023: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(1+ADDR_OBJ(values), 3+CONST_ADDR_OBJ(lvars), len*sizeof(Obj));
data/gap-4.11.0/src/vars.c:2161: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 cookies[count][24];
data/gap-4.11.0/src/vec8bit.c:1048: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(BYTES_VEC8BIT(copy), CONST_BYTES_VEC8BIT(list),
data/gap-4.11.0/src/vecgf2.c:1052: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(ptrD, ptrS, NUMBER_BLOCKS_GF2VEC(vec) * sizeof(UInt));
data/gap-4.11.0/src/vecgf2.c:3203: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(BLOCKS_GF2VEC(vc), CONST_BLOCKS_GF2VEC(v),
data/gap-4.11.0/src/vecgf2.c:3755: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(BLOCKS_GF2VEC(remv), CONST_BLOCKS_GF2VEC(vec1),
data/gap-4.11.0/tst/testlibgap/wsload.c:8: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[50];
data/gap-4.11.0/tst/testlibgap/wsload.c:9: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 lpar[3] = "-L";
data/gap-4.11.0/tst/testlibgap/wsload.c:10: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 wsname[16] = "/tmp/libgap.ws"; /* the name must match the one used in wscreate.c */
data/gap-4.11.0/tst/testlibgap/wsload.c:11: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(args, argv, argc*sizeof(char*));
data/gap-4.11.0/src/cyclotom.c:851:9:  [1] (obsolete) ulimit:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name, which is NOT obsolete) (CWE-676). Use getrlimit(2),
  setrlimit(2), and sysconf(3) instead.
    if (ulimit < CyclotomicsLimit) {
data/gap-4.11.0/src/cyclotom.c:857:9:  [1] (obsolete) ulimit:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name, which is NOT obsolete) (CWE-676). Use getrlimit(2),
  setrlimit(2), and sysconf(3) instead.
    if (ulimit >= (1L << 32)) {
data/gap-4.11.0/src/cyclotom.c:863:24:  [1] (obsolete) ulimit:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name, which is NOT obsolete) (CWE-676). Use getrlimit(2),
  setrlimit(2), and sysconf(3) instead.
    CyclotomicsLimit = ulimit;
data/gap-4.11.0/src/gap.c:773: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).
  inptr = SyWinCmd( qtr, strlen(qtr) );
data/gap-4.11.0/src/gap.c:774: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(inptr);
data/gap-4.11.0/src/gvars.c:651:15:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        len = strlen(name);
data/gap-4.11.0/src/hpc/thread.c:301: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).
    size_t len1 = strlen(cstr1), len2 = strlen(cstr2);
data/gap-4.11.0/src/hpc/thread.c:301: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).
    size_t len1 = strlen(cstr1), len2 = strlen(cstr2);
data/gap-4.11.0/src/hpc/thread.c:1240: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).
    char * buffer = alloca(strlen(file) + strlen(func) + strlen(expr) + 200);
data/gap-4.11.0/src/hpc/thread.c:1240: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).
    char * buffer = alloca(strlen(file) + strlen(func) + strlen(expr) + 200);
data/gap-4.11.0/src/hpc/thread.c:1240:58:  [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 * buffer = alloca(strlen(file) + strlen(func) + strlen(expr) + 200);
data/gap-4.11.0/src/hpc/thread.c:1255: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).
    char * buffer = alloca(strlen(file) + strlen(func) + strlen(expr) + 200);
data/gap-4.11.0/src/hpc/thread.c:1255: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).
    char * buffer = alloca(strlen(file) + strlen(func) + strlen(expr) + 200);
data/gap-4.11.0/src/hpc/thread.c:1255:58:  [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 * buffer = alloca(strlen(file) + strlen(func) + strlen(expr) + 200);
data/gap-4.11.0/src/integer.c:827:18:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  int real_len = strlen( CONST_CSTR_STRING(res) );
data/gap-4.11.0/src/intfuncs.c:469:54:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
Int HASHKEY_MEM_NC(const void * ptr, UInt4 seed, Int read)
data/gap-4.11.0/src/intfuncs.c:473:30:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    MurmurHash3_x64_128(ptr, read, seed, (void *)hashout);
data/gap-4.11.0/src/intfuncs.c:477:29:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    MurmurHash3_x86_32(ptr, read, seed, (void *)&hashout);
data/gap-4.11.0/src/intfuncs.c:482:55:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
Int HASHKEY_BAG_NC(Obj obj, UInt4 seed, Int skip, int read)
data/gap-4.11.0/src/intfuncs.c:485:27:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                          read);
data/gap-4.11.0/src/intfuncs.h:42:54:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
Int HASHKEY_MEM_NC(const void * ptr, UInt4 seed, Int read);
data/gap-4.11.0/src/intfuncs.h:49:55:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
Int HASHKEY_BAG_NC(Obj obj, UInt4 seed, Int skip, int read);
data/gap-4.11.0/src/io.c:1282: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).
            PutLine2(IO()->InputLog, STATE(In), strlen(STATE(In)));
data/gap-4.11.0/src/iostream.c:579:19:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            ret = read(PtyIOStreams[stream].ptyFD, buf, maxlen);
data/gap-4.11.0/src/macfloat.c:82:13:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        if (strlen(buf) + 2 <= bufsize) {
data/gap-4.11.0/src/macfloat.c:85: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).
                memmove(loc + 1, loc, strlen(loc) + 1);
data/gap-4.11.0/src/modules.c:831: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).
    len = strlen(filename);
data/gap-4.11.0/src/opers.c:2528:22:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    UInt addon_len = strlen(addon);
data/gap-4.11.0/src/opers.c:2547: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).
    UInt prefix_len = strlen(prefix);
data/gap-4.11.0/src/profile.c:349: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).
  if(endsWithgz(name) && strlen(name) < sizeof(popen_buf) - 8 - 4 - 1)
data/gap-4.11.0/src/profile.c:387: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).
        if(strlen(profileState.filename) > SUPPORTED_PATH_LEN) {
data/gap-4.11.0/src/records.c:108: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).
    return RNamNameWithLen(name, strlen(name));
data/gap-4.11.0/src/scanner.c:65: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).
        const UInt len = strlen(line);
data/gap-4.11.0/src/streams.c:1444:16:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      buflen = strlen(buf);
data/gap-4.11.0/src/streams.c:1509:22:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
              lstr = strlen(buf);
data/gap-4.11.0/src/stringobj.h:341: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).
    return MakeStringWithLen(cstr, strlen(cstr));
data/gap-4.11.0/src/sysfiles.c:494: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).
    length = strlen(GAPExecLocation);
data/gap-4.11.0/src/sysfiles.c:559: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).
    echoandcheck( fid, cmd, strlen(cmd) );
data/gap-4.11.0/src/sysfiles.c:634:15:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        len = read( 0, b, i );
data/gap-4.11.0/src/sysfiles.c:643:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        while ( read( 0, b, 1 ) != 1 )  ;
data/gap-4.11.0/src/sysfiles.c:652:15:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        len = read( 0, b, i );
data/gap-4.11.0/src/sysfiles.c:660:15:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        len = read( 0, b, i );
data/gap-4.11.0/src/sysfiles.c:827:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (strlen(name) <= sizeof(cmd) - 10 - 4 - 1) {
data/gap-4.11.0/src/sysfiles.c:846:8:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if(strlen(mode) >= 2 && mode[1] == 'b')
data/gap-4.11.0/src/sysfiles.c:1332: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).
        echoandcheck(fid, str, strlen(str) );
data/gap-4.11.0/src/sysfiles.c:1368:13:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        i = strlen(line);
data/gap-4.11.0/src/sysfiles.c:1498:16:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        return read(syBuf[fid].fp, ptr, len);
data/gap-4.11.0/src/sysfiles.c:2133:23:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            if (max < strlen(strs[i])) max = strlen(strs[i]);
data/gap-4.11.0/src/sysfiles.c:2133:46:  [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 (max < strlen(strs[i])) max = strlen(strs[i]);
data/gap-4.11.0/src/sysfiles.c:2142: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).
         dlen = strlen(CSTR_STRING(data));
data/gap-4.11.0/src/sysfiles.c:2589: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).
                if (strlen(yank) + strlen(line) - 2 > length) {
data/gap-4.11.0/src/sysfiles.c:2589: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).
                if (strlen(yank) + strlen(line) - 2 > length) {
data/gap-4.11.0/src/system.c:417: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).
    return (dst - orig_dst) + strlen(src);
data/gap-4.11.0/src/system.c:463:3:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
  usleep( (unsigned int) msecs );
data/gap-4.11.0/src/system.c:694:22:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    else if( string[ strlen(string) - 1 ] == ';' ) {
data/gap-4.11.0/src/system.c:873: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).
  Char symbol =  s[strlen(s)-1];
data/gap-4.11.0/src/system.c:1130:16:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
          if ( strlen(argv[1]) != 2 && argv[1][1] != '-') {
data/gap-4.11.0/src/system.c:1245: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).
        DotGapPath[strlen(DotGapPath)-1] = '\0';
data/gap-4.11.0/src/system.c:1251: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).
        const UInt userhomelen = strlen(userhome);
data/gap-4.11.0/src/system.c:1253: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).
            const UInt pathlen = strlen(SyGapRootPaths[i]);
data/gap-4.11.0/src/tietze.c:1015:25:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
    Int                 equal;          /* flag                            */
data/gap-4.11.0/src/tietze.c:1080:14:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
         || (equal && ( INT_INTOBJ( ptLens[pos1] ) < 4
data/gap-4.11.0/src/tietze.c:1092:14:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
    lmax = ( equal ) ? lmin : lmin + 1;
data/gap-4.11.0/src/tietze.c:1095:17:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
    newflag = ( equal ) ? 1 : 2;
data/gap-4.11.0/src/tietze.c:1103:12:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
    mlen = equal ? ( lmin + 1 ) / 2 : lmin / 2 + 1;
data/gap-4.11.0/src/tietze.c:1171:44:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
         && (ylen < len1 || yflag > 1 || (!equal && !(yflag + flag1)) ) )
data/gap-4.11.0/src/tietze.c:1199:37:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
                  || xflag > 1 || (!equal && !( xflag + yflag )) )
data/gap-4.11.0/tst/testlibgap/api.c:93: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).
    assert(GAP_LenString(r) == strlen(ts));
data/gap-4.11.0/tst/testlibgap/api.c:98:33:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    assert(GAP_LenString(r2) == strlen(ts));

ANALYSIS SUMMARY:

Hits = 295
Lines analyzed = 188894 in approximately 4.79 seconds (39433 lines/second)
Physical Source Lines of Code (SLOC) = 116306
Hits@level = [0]  64 [1]  69 [2] 190 [3]  13 [4]  20 [5]   3
Hits@level+ = [0+] 359 [1+] 295 [2+] 226 [3+]  36 [4+]  23 [5+]   3
Hits/KSLOC@level+ = [0+] 3.08669 [1+] 2.53641 [2+] 1.94315 [3+] 0.309528 [4+] 0.197754 [5+] 0.025794
Dot directories skipped = 1 (--followdotdir overrides)
Minimum risk level = 1
Not every hit is necessarily a security vulnerability.
There may be other security vulnerabilities; review your code!
See 'Secure Programming HOWTO'
(https://dwheeler.com/secure-programs) for more information.