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/lua5.4-5.4.1/src/ldblib.c
Examining data/lua5.4-5.4.1/src/lmathlib.c
Examining data/lua5.4-5.4.1/src/loslib.c
Examining data/lua5.4-5.4.1/src/lvm.c
Examining data/lua5.4-5.4.1/src/ldo.h
Examining data/lua5.4-5.4.1/src/lua.h
Examining data/lua5.4-5.4.1/src/lgc.h
Examining data/lua5.4-5.4.1/src/ltm.h
Examining data/lua5.4-5.4.1/src/loadlib.c
Examining data/lua5.4-5.4.1/src/lmem.c
Examining data/lua5.4-5.4.1/src/lstate.h
Examining data/lua5.4-5.4.1/src/lzio.h
Examining data/lua5.4-5.4.1/src/lopcodes.c
Examining data/lua5.4-5.4.1/src/lua.c
Examining data/lua5.4-5.4.1/src/lundump.h
Examining data/lua5.4-5.4.1/src/ljumptab.h
Examining data/lua5.4-5.4.1/src/lbaselib.c
Examining data/lua5.4-5.4.1/src/ltable.c
Examining data/lua5.4-5.4.1/src/ldump.c
Examining data/lua5.4-5.4.1/src/liolib.c
Examining data/lua5.4-5.4.1/src/llimits.h
Examining data/lua5.4-5.4.1/src/lfunc.h
Examining data/lua5.4-5.4.1/src/lualib.h
Examining data/lua5.4-5.4.1/src/lzio.c
Examining data/lua5.4-5.4.1/src/lopnames.h
Examining data/lua5.4-5.4.1/src/lctype.c
Examining data/lua5.4-5.4.1/src/lmem.h
Examining data/lua5.4-5.4.1/src/llex.h
Examining data/lua5.4-5.4.1/src/ltable.h
Examining data/lua5.4-5.4.1/src/lstring.c
Examining data/lua5.4-5.4.1/src/ldebug.h
Examining data/lua5.4-5.4.1/src/lprefix.h
Examining data/lua5.4-5.4.1/src/llex.c
Examining data/lua5.4-5.4.1/src/linit.c
Examining data/lua5.4-5.4.1/src/lobject.h
Examining data/lua5.4-5.4.1/src/lapi.h
Examining data/lua5.4-5.4.1/src/ldebug.c
Examining data/lua5.4-5.4.1/src/ldo.c
Examining data/lua5.4-5.4.1/src/lvm.h
Examining data/lua5.4-5.4.1/src/lauxlib.c
Examining data/lua5.4-5.4.1/src/luac.c
Examining data/lua5.4-5.4.1/src/lctype.h
Examining data/lua5.4-5.4.1/src/lstring.h
Examining data/lua5.4-5.4.1/src/lcorolib.c
Examining data/lua5.4-5.4.1/src/lutf8lib.c
Examining data/lua5.4-5.4.1/src/lgc.c
Examining data/lua5.4-5.4.1/src/lstate.c
Examining data/lua5.4-5.4.1/src/lundump.c
Examining data/lua5.4-5.4.1/src/ltablib.c
Examining data/lua5.4-5.4.1/src/lauxlib.h
Examining data/lua5.4-5.4.1/src/ltm.c
Examining data/lua5.4-5.4.1/src/lparser.c
Examining data/lua5.4-5.4.1/src/lcode.h
Examining data/lua5.4-5.4.1/src/lobject.c
Examining data/lua5.4-5.4.1/src/lcode.c
Examining data/lua5.4-5.4.1/src/lopcodes.h
Examining data/lua5.4-5.4.1/src/lfunc.c
Examining data/lua5.4-5.4.1/src/lapi.c
Examining data/lua5.4-5.4.1/src/lparser.h
Examining data/lua5.4-5.4.1/src/lua.hpp
Examining data/lua5.4-5.4.1/src/lstrlib.c
Examining data/lua5.4-5.4.1/src/luaconf.h

FINAL RESULTS:

data/lua5.4-5.4.1/src/lauxlib.h:246:10:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
        (fprintf(stderr, (s), (p)), fflush(stderr))
data/lua5.4-5.4.1/src/liolib.c:65:40:  [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.
#define l_popen(L,c,m)		(fflush(NULL), popen(c,m))
data/lua5.4-5.4.1/src/liolib.c:661:19:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
                ? fprintf(f, LUA_INTEGER_FMT,
data/lua5.4-5.4.1/src/liolib.c:663:19:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
                : fprintf(f, LUA_NUMBER_FMT,
data/lua5.4-5.4.1/src/lobject.c:263: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(buff, s);  /* copy string to buffer */
data/lua5.4-5.4.1/src/loslib.c:124:9:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
        strcpy(b, LUA_TMPNAMTEMPLATE); \
data/lua5.4-5.4.1/src/loslib.c:146:10:  [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.
  stat = system(cmd);
data/lua5.4-5.4.1/src/lstrlib.c:1218:3:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
  strcpy(form + l - 1, lenmod);
data/lua5.4-5.4.1/src/luac.c:312:2:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
	sprintf(buff,LUA_NUMBER_FMT,fltvalue(o));
data/lua5.4-5.4.1/src/luac.c:318:2:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	printf(LUA_INTEGER_FMT,ivalue(o));
data/lua5.4-5.4.1/src/luac.c:369:2:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	printf(COMMENT); PrintConstant(f,bx);
data/lua5.4-5.4.1/src/luac.c:373:2:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	printf(COMMENT); PrintConstant(f,EXTRAARG);
data/lua5.4-5.4.1/src/luac.c:386:2:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	printf(COMMENT "%d out",b+1);
data/lua5.4-5.4.1/src/luac.c:390:2:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	printf(COMMENT "%s",UPVALNAME(b));
data/lua5.4-5.4.1/src/luac.c:394:2:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	printf(COMMENT "%s",UPVALNAME(b));
data/lua5.4-5.4.1/src/luac.c:398:2:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	printf(COMMENT "%s",UPVALNAME(b));
data/lua5.4-5.4.1/src/luac.c:409:2:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	printf(COMMENT); PrintConstant(f,c);
data/lua5.4-5.4.1/src/luac.c:413:2:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	printf(COMMENT "%s",UPVALNAME(a));
data/lua5.4-5.4.1/src/luac.c:419:13:  [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.
	if (isk) { printf(COMMENT); PrintConstant(f,c); }
data/lua5.4-5.4.1/src/luac.c:423:13:  [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.
	if (isk) { printf(COMMENT); PrintConstant(f,c); }
data/lua5.4-5.4.1/src/luac.c:427:2:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	printf(COMMENT); PrintConstant(f,b);
data/lua5.4-5.4.1/src/luac.c:432:2:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	printf(COMMENT "%d",c+EXTRAARGC);
data/lua5.4-5.4.1/src/luac.c:436:13:  [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.
	if (isk) { printf(COMMENT); PrintConstant(f,c); }
data/lua5.4-5.4.1/src/luac.c:443:2:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	printf(COMMENT); PrintConstant(f,c);
data/lua5.4-5.4.1/src/luac.c:447:2:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	printf(COMMENT); PrintConstant(f,c);
data/lua5.4-5.4.1/src/luac.c:451:2:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	printf(COMMENT); PrintConstant(f,c);
data/lua5.4-5.4.1/src/luac.c:455:2:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	printf(COMMENT); PrintConstant(f,c);
data/lua5.4-5.4.1/src/luac.c:459:2:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	printf(COMMENT); PrintConstant(f,c);
data/lua5.4-5.4.1/src/luac.c:463:2:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	printf(COMMENT); PrintConstant(f,c);
data/lua5.4-5.4.1/src/luac.c:467:2:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	printf(COMMENT); PrintConstant(f,c);
data/lua5.4-5.4.1/src/luac.c:471:2:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	printf(COMMENT); PrintConstant(f,c);
data/lua5.4-5.4.1/src/luac.c:475:2:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	printf(COMMENT); PrintConstant(f,c);
data/lua5.4-5.4.1/src/luac.c:479:2:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	printf(COMMENT); PrintConstant(f,c);
data/lua5.4-5.4.1/src/luac.c:525:2:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	printf(COMMENT "%s",eventname(c));
data/lua5.4-5.4.1/src/luac.c:529:2:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	printf(COMMENT "%s",eventname(c));
data/lua5.4-5.4.1/src/luac.c:534:2:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	printf(COMMENT "%s ",eventname(c)); PrintConstant(f,b);
data/lua5.4-5.4.1/src/luac.c:560:2:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	printf(COMMENT "to %d",GETARG_sJ(i)+pc+2);
data/lua5.4-5.4.1/src/luac.c:573:2:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	printf(COMMENT); PrintConstant(f,b);
data/lua5.4-5.4.1/src/luac.c:598:2:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	printf(COMMENT);
data/lua5.4-5.4.1/src/luac.c:604:2:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	printf(COMMENT "%d in",b-1);
data/lua5.4-5.4.1/src/luac.c:608:2:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	printf(COMMENT);
data/lua5.4-5.4.1/src/luac.c:618:2:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	printf(COMMENT "to %d",pc-bx+2);
data/lua5.4-5.4.1/src/luac.c:622:2:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	printf(COMMENT "to %d",pc+bx+2);
data/lua5.4-5.4.1/src/luac.c:626:2:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	printf(COMMENT "to %d",pc+bx+2);
data/lua5.4-5.4.1/src/luac.c:633:2:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	printf(COMMENT "to %d",pc-bx+2);
data/lua5.4-5.4.1/src/luac.c:637:11:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	if (isk) printf(COMMENT "%d",c+EXTRAARGC);
data/lua5.4-5.4.1/src/luac.c:641:2:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	printf(COMMENT "%p",VOID(f->p[bx]));
data/lua5.4-5.4.1/src/luac.c:645:2:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	printf(COMMENT);
data/lua5.4-5.4.1/src/luac.c:657:2:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	printf(COMMENT "not handled");
data/lua5.4-5.4.1/src/luaconf.h:612:29:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
#define l_sprintf(s,sz,f,i)	snprintf(s,sz,f,i)
data/lua5.4-5.4.1/src/luaconf.h:614:42:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
#define l_sprintf(s,sz,f,i)	((void)(sz), sprintf(s,f,i))
data/lua5.4-5.4.1/src/loadlib.c:300:22:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
  const char *path = getenv(nver);  /* try versioned name */
data/lua5.4-5.4.1/src/loadlib.c:302:12:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    path = getenv(envname);  /* try unversioned name */
data/lua5.4-5.4.1/src/loslib.c:133:33:  [3] (tmpfile) tmpnam:
  Temporary file race condition (CWE-377).
#define lua_tmpnam(b,e)		{ e = (tmpnam(b) == NULL); }
data/lua5.4-5.4.1/src/loslib.c:181:21:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
  lua_pushstring(L, getenv(luaL_checkstring(L, 1)));  /* if NULL push nil */
data/lua5.4-5.4.1/src/lua.c:330:22:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
  const char *init = getenv(name + 1);
data/lua5.4-5.4.1/src/lua.c:333:12:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    init = getenv(name + 1);  /* try alternative name */
data/lua5.4-5.4.1/src/lauxlib.c:554: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(newbuff, B->b, B->n * sizeof(char));  /* copy original content */
data/lua5.4-5.4.1/src/lauxlib.c:573: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(b, s, l * sizeof(char));
data/lua5.4-5.4.1/src/lauxlib.c:614: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(b, s, len * sizeof(char));
data/lua5.4-5.4.1/src/lauxlib.c:689: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 buff[BUFSIZ];  /* area for reading file */
data/lua5.4-5.4.1/src/lauxlib.c:766:12:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    lf.f = fopen(filename, "r");
data/lua5.4-5.4.1/src/lauxlib.h:173: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 b[LUAL_BUFFERSIZE];  /* initial buffer */
data/lua5.4-5.4.1/src/ldblib.c:389: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 buff[5];
data/lua5.4-5.4.1/src/ldblib.c:413: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[250];
data/lua5.4-5.4.1/src/ldebug.c:744: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 buff[LUA_IDSIZE];
data/lua5.4-5.4.1/src/ldo.c:170:50:  [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).
  for (up = L->openupval; up != NULL; up = up->u.open.next)
data/lua5.4-5.4.1/src/lfunc.c:71:9:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  uv->u.open.next = next;  /* link it to list of open upvalues */
data/lua5.4-5.4.1/src/lfunc.c:72:9:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  uv->u.open.previous = prev;
data/lua5.4-5.4.1/src/lfunc.c:74: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).
    next->u.open.previous = &uv->u.open.next;
data/lua5.4-5.4.1/src/lfunc.c:74:36:  [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).
    next->u.open.previous = &uv->u.open.next;
data/lua5.4-5.4.1/src/lfunc.c:96: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).
    pp = &p->u.open.next;
data/lua5.4-5.4.1/src/lfunc.c:217:10:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  *uv->u.open.previous = uv->u.open.next;
data/lua5.4-5.4.1/src/lfunc.c:217:32:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  *uv->u.open.previous = uv->u.open.next;
data/lua5.4-5.4.1/src/lfunc.c:218: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).
  if (uv->u.open.next)
data/lua5.4-5.4.1/src/lfunc.c:219:11:  [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).
    uv->u.open.next->u.open.previous = uv->u.open.previous;
data/lua5.4-5.4.1/src/lfunc.c:219:24:  [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).
    uv->u.open.next->u.open.previous = uv->u.open.previous;
data/lua5.4-5.4.1/src/lfunc.c:219:46:  [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).
    uv->u.open.next->u.open.previous = uv->u.open.previous;
data/lua5.4-5.4.1/src/lgc.c:375:59:  [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).
      for (uv = thread->openupval; uv != NULL; uv = uv->u.open.next) {
data/lua5.4-5.4.1/src/lgc.c:633:51:  [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).
  for (uv = th->openupval; uv != NULL; uv = uv->u.open.next)
data/lua5.4-5.4.1/src/liolib.c:257: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).
  p->f = fopen(fname, mode);
data/lua5.4-5.4.1/src/liolib.c:269: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).
  p->f = fopen(filename, mode);
data/lua5.4-5.4.1/src/liolib.c:297:10:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
  p->f = tmpfile();
data/lua5.4-5.4.1/src/liolib.c:425: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 buff[L_MAXLENNUM + 1];  /* +1 for ending '\0' */
data/lua5.4-5.4.1/src/liolib.c:475: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 decp[2];
data/lua5.4-5.4.1/src/llex.c:358: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 buff[UTF8BUFFSZ];
data/lua5.4-5.4.1/src/loadlib.c:176: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 buff[MAX_PATH + 1];
data/lua5.4-5.4.1/src/loadlib.c:194:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buffer[128];
data/lua5.4-5.4.1/src/loadlib.c:433:13:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  FILE *f = fopen(filename, "r");  /* try to open file */
data/lua5.4-5.4.1/src/lobject.c:259: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 buff[L_MAXLENNUM + 1];
data/lua5.4-5.4.1/src/lobject.c:375: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 buff[MAXNUMBER2STR];
data/lua5.4-5.4.1/src/lobject.c:397: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 space[BUFVFS];  /* holds last part of the result */
data/lua5.4-5.4.1/src/lobject.c:446: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(bf, str, slen);  /* add string to buffer */
data/lua5.4-5.4.1/src/lobject.c:516: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 bf[UTF8BUFFSZ];
data/lua5.4-5.4.1/src/lobject.c:555: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.
#define addstr(a,b,l)	( memcpy(a,b,(l) * sizeof(char)), a += (l) )
data/lua5.4-5.4.1/src/lobject.c:561: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(out, source + 1, srclen * sizeof(char));
data/lua5.4-5.4.1/src/lobject.c:569: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(out, source + 1, srclen * sizeof(char));
data/lua5.4-5.4.1/src/lobject.c:573: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(out, source + 1 + srclen - bufflen, bufflen * sizeof(char));
data/lua5.4-5.4.1/src/lobject.c:589: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(out, POS, (LL(POS) + 1) * sizeof(char));
data/lua5.4-5.4.1/src/lobject.h:371: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 contents[1];
data/lua5.4-5.4.1/src/lobject.h:612:7:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    } open;
data/lua5.4-5.4.1/src/loslib.c:125:13:  [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).
        e = mkstemp(b); \
data/lua5.4-5.4.1/src/loslib.c:170: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 buff[LUA_TMPNAMBUFSIZE];
data/lua5.4-5.4.1/src/loslib.c:282: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(buff, conv, oplen);  /* copy valid option to buffer */
data/lua5.4-5.4.1/src/loslib.c:324: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 cc[4];  /* buffer for individual conversion specifiers */
data/lua5.4-5.4.1/src/lstate.c:69: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(b + p, &t, sizeof(t)); p += sizeof(t); }
data/lua5.4-5.4.1/src/lstate.c:72: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 buff[3 * sizeof(size_t)];
data/lua5.4-5.4.1/src/lstate.c:344: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(lua_getextraspace(L1), lua_getextraspace(g->mainthread),
data/lua5.4-5.4.1/src/lstring.c:221: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(getstr(ts), str, l * sizeof(char));
data/lua5.4-5.4.1/src/lstring.c:241: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(getstr(ts), str, l * sizeof(char));
data/lua5.4-5.4.1/src/lstrlib.c:163: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(p, s, l * sizeof(char)); p += l;
data/lua5.4-5.4.1/src/lstrlib.c:165: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(p, sep, lsep * sizeof(char));
data/lua5.4-5.4.1/src/lstrlib.c:169: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(p, s, l * sizeof(char));  /* last copy (not followed by separator) */
data/lua5.4-5.4.1/src/lstrlib.c:1109:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      char buff[10];
data/lua5.4-5.4.1/src/lstrlib.c:1204: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(form, strfrmt, ((p - strfrmt) + 1) * sizeof(char));
data/lua5.4-5.4.1/src/lstrlib.c:1238:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      char form[MAX_FORMAT];  /* to store the format ('%...') */
data/lua5.4-5.4.1/src/lstrlib.c:1368: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 buff[5 * sizeof(lua_Number)];  /* enough for any float type */
data/lua5.4-5.4.1/src/ltablib.c:249: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(buff, &c, sof(c) * sizeof(unsigned int));
data/lua5.4-5.4.1/src/ltablib.c:250: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(buff + sof(c), &t, sof(t) * sizeof(unsigned int));
data/lua5.4-5.4.1/src/ltm.c:30: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.
LUAI_DDEF const char *const luaT_typenames_[LUA_TOTALTYPES] = {
data/lua5.4-5.4.1/src/ltm.h:71: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.
LUAI_DDEC(const char *const luaT_typenames_[LUA_TOTALTYPES];)
data/lua5.4-5.4.1/src/lua.c:456:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buffer[LUA_MAXINPUT];
data/lua5.4-5.4.1/src/lua.h:485: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 short_src[LUA_IDSIZE]; /* (S) */
data/lua5.4-5.4.1/src/luac.c:186:38:  [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* D= (output==NULL) ? stdout : fopen(output,"wb");
data/lua5.4-5.4.1/src/luac.c:311:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buff[100];
data/lua5.4-5.4.1/src/lundump.c:117: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 buff[LUAI_MAXSHORTLEN];
data/lua5.4-5.4.1/src/lundump.c:274: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 buff[sizeof(LUA_SIGNATURE) + sizeof(LUAC_DATA)]; /* larger than both */
data/lua5.4-5.4.1/src/lvm.c:626: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(buff + tl, svalue(s2v(top - n)), l * sizeof(char));
data/lua5.4-5.4.1/src/lvm.c:662: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 buff[LUAI_MAXSHORTLEN];
data/lua5.4-5.4.1/src/lvm.c:1743: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(ra + 4, ra, 3 * sizeof(*ra));
data/lua5.4-5.4.1/src/lzio.c:60: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(b, z->p, m);
data/lua5.4-5.4.1/src/lauxlib.c:413: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).
      *len = (def ? strlen(def) : 0);
data/lua5.4-5.4.1/src/lauxlib.c:580:25:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  luaL_addlstring(B, s, strlen(s));
data/lua5.4-5.4.1/src/lauxlib.c:725:9:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    c = getc(lf->f);
data/lua5.4-5.4.1/src/lauxlib.c:730:10:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  return getc(lf->f);  /* return next character */
data/lua5.4-5.4.1/src/lauxlib.c:745:11:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      c = getc(lf->f);
data/lua5.4-5.4.1/src/lauxlib.c:747:11:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    *cp = getc(lf->f);  /* skip end-of-line, if present */
data/lua5.4-5.4.1/src/lauxlib.c:816: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).
  return luaL_loadbuffer(L, s, strlen(s), s);
data/lua5.4-5.4.1/src/lauxlib.c:968:14:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  size_t l = strlen(p);
data/lua5.4-5.4.1/src/ldblib.c:418: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 (luaL_loadbuffer(L, buffer, strlen(buffer), "=(debug command)") ||
data/lua5.4-5.4.1/src/liolib.c:43:38:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
         (strspn(mode, L_MODEEXT) == strlen(mode)));  /* check extensions */
data/lua5.4-5.4.1/src/liolib.c:96:20:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
#define l_getc(f)		getc(f)
data/lua5.4-5.4.1/src/liolib.c:506:11:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  int c = getc(f);
data/lua5.4-5.4.1/src/loadlib.c:308:18:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    size_t len = strlen(path);
data/lua5.4-5.4.1/src/lobject.c:261: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(s) > L_MAXLENNUM || pdot == NULL)
data/lua5.4-5.4.1/src/lobject.c:481: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).
        addstr2buff(&buff, s, strlen(s));
data/lua5.4-5.4.1/src/lobject.c:532:27:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  addstr2buff(&buff, fmt, strlen(fmt));  /* rest of 'fmt' */
data/lua5.4-5.4.1/src/lstring.c:265: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).
  p[0] = luaS_newlstr(L, str, strlen(str));
data/lua5.4-5.4.1/src/lstrlib.c:748: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).
    upto += strlen(p + upto) + 1;  /* may have more after \0 */
data/lua5.4-5.4.1/src/lstrlib.c:1215:14:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  size_t l = strlen(form);
data/lua5.4-5.4.1/src/lstrlib.c:1216: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).
  size_t lm = strlen(lenmod);
data/lua5.4-5.4.1/src/lstrlib.c:1276: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).
            form[strlen(form) - 1] = 's';  /* format it as a string */
data/lua5.4-5.4.1/src/lstrlib.c:1293:35:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            luaL_argcheck(L, l == strlen(s), arg, "string contains zeros");
data/lua5.4-5.4.1/src/lstrlib.c:1622: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).
        luaL_argcheck(L, strlen(s) == len, arg, "string contains zeros");
data/lua5.4-5.4.1/src/lstrlib.c:1741:27:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        size_t len = (int)strlen(data + pos);
data/lua5.4-5.4.1/src/lua.c:147: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).
  lua_writestring(LUA_COPYRIGHT, strlen(LUA_COPYRIGHT));
data/lua5.4-5.4.1/src/lua.c:185: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).
  return dochunk(L, luaL_loadbuffer(L, s, strlen(s), name));
data/lua5.4-5.4.1/src/lua.c:464:7:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  l = strlen(b);
data/lua5.4-5.4.1/src/lua.c:483:44:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  int status = luaL_loadbuffer(L, retline, strlen(retline), "=stdin");
data/lua5.4-5.4.1/src/lundump.c:275:16:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  size_t len = strlen(s);
data/lua5.4-5.4.1/src/lvm.c:388:20:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      size_t len = strlen(l);  /* index of first '\0' in both strings */

ANALYSIS SUMMARY:

Hits = 161
Lines analyzed = 29129 in approximately 0.78 seconds (37440 lines/second)
Physical Source Lines of Code (SLOC) = 19540
Hits@level = [0] 147 [1]  30 [2]  74 [3]   6 [4]  51 [5]   0
Hits@level+ = [0+] 308 [1+] 161 [2+] 131 [3+]  57 [4+]  51 [5+]   0
Hits/KSLOC@level+ = [0+] 15.7625 [1+] 8.23951 [2+] 6.7042 [3+] 2.91709 [4+] 2.61003 [5+]   0
Dot directories skipped = 1 (--followdotdir overrides)
Minimum risk level = 1
Not every hit is necessarily a security vulnerability.
There may be other security vulnerabilities; review your code!
See 'Secure Programming HOWTO'
(https://dwheeler.com/secure-programs) for more information.