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/htp-1.19/src/htp-files.c
Examining data/htp-1.19/src/jpeg.c
Examining data/htp-1.19/src/ver.c
Examining data/htp-1.19/src/varstore.h
Examining data/htp-1.19/src/msg.c
Examining data/htp-1.19/src/html.c
Examining data/htp-1.19/src/image-proc.c
Examining data/htp-1.19/src/macro.h
Examining data/htp-1.19/src/varstore.c
Examining data/htp-1.19/src/def-proc.c
Examining data/htp-1.19/src/image-proc.h
Examining data/htp-1.19/src/suballoc.h
Examining data/htp-1.19/src/gif.c
Examining data/htp-1.19/src/option.c
Examining data/htp-1.19/src/file-proc.c
Examining data/htp-1.19/src/snprintf.h
Examining data/htp-1.19/src/png.c
Examining data/htp-1.19/src/file-proc.h
Examining data/htp-1.19/src/util.c
Examining data/htp-1.19/src/use-proc.h
Examining data/htp-1.19/src/png.h
Examining data/htp-1.19/src/misc-proc.h
Examining data/htp-1.19/src/def-proc.h
Examining data/htp-1.19/src/streams.c
Examining data/htp-1.19/src/jpeg.h
Examining data/htp-1.19/src/suballoc.c
Examining data/htp-1.19/src/while-proc.h
Examining data/htp-1.19/src/set-proc.c
Examining data/htp-1.19/src/os.h
Examining data/htp-1.19/src/ver.h
Examining data/htp-1.19/src/misc-proc.c
Examining data/htp-1.19/src/htp.c
Examining data/htp-1.19/src/htp-files.h
Examining data/htp-1.19/src/textfile.h
Examining data/htp-1.19/src/set-proc.h
Examining data/htp-1.19/src/msg.h
Examining data/htp-1.19/src/bool-proc.h
Examining data/htp-1.19/src/html.h
Examining data/htp-1.19/src/defs.c
Examining data/htp-1.19/src/htp.h
Examining data/htp-1.19/src/image.h
Examining data/htp-1.19/src/image.c
Examining data/htp-1.19/src/bool-proc.c
Examining data/htp-1.19/src/use-proc.c
Examining data/htp-1.19/src/defs.h
Examining data/htp-1.19/src/macro.c
Examining data/htp-1.19/src/textfile.c
Examining data/htp-1.19/src/option.h
Examining data/htp-1.19/src/streams.h
Examining data/htp-1.19/src/gif.h
Examining data/htp-1.19/src/while-proc.c
Examining data/htp-1.19/src/snprintf.c

FINAL RESULTS:

data/htp-1.19/src/file-proc.c:226:9:  [5] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings. Risk is high; the length parameter
  appears to be a constant, instead of computing the number of characters
  left.
        strncat(newCmdline, " > ", MAX_PATHNAME_LEN);
data/htp-1.19/src/file-proc.c:227:9:  [5] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings. Risk is high; the length parameter
  appears to be a constant, instead of computing the number of characters
  left.
        strncat(newCmdline, tempFilename, MAX_PATHNAME_LEN);
data/htp-1.19/src/option.c:162:13:  [5] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings. Risk is high; the length parameter
  appears to be a constant, instead of computing the number of characters
  left.
            strncat(buff, "=", sizeof(buff) - 1);
data/htp-1.19/src/option.c:163:13:  [5] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings. Risk is high; the length parameter
  appears to be a constant, instead of computing the number of characters
  left.
            strncat(buff, attrib->value, sizeof(buff) - 1);
data/htp-1.19/src/file-proc.c:233:16:  [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.
    exitCode = system(cmdline);
data/htp-1.19/src/file-proc.c:304:20:  [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.
        exitCode = system(cmdline);
data/htp-1.19/src/htp.c:355: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(newDirectory, resp);
data/htp-1.19/src/htp.c:359: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(defResp, newDirectory);
data/htp-1.19/src/htp.c:360:9:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
        strcat(defResp, DIR_DELIMITER_STRING);
data/htp-1.19/src/htp.c:361:9:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
        strcat(defResp, DEFAULT_RESPONSE_FILE);
data/htp-1.19/src/msg.c:45:5:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
    vsnprintf(str, 1024, format, argptr);
data/htp-1.19/src/msg.c:117:5:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
    vsnprintf(str, 1024, format, argptr);
data/htp-1.19/src/msg.c:128:5:  [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(str);
data/htp-1.19/src/snprintf.c:100: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.
#define snprintf  portable_snprintf
data/htp-1.19/src/snprintf.c:101:9:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
#define vsnprintf portable_vsnprintf
data/htp-1.19/src/snprintf.c:826:6:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
 int vsnprintf (char *str, size_t count, const char *fmt, va_list args)
data/htp-1.19/src/snprintf.c:839:5:  [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.
int snprintf(char *str,size_t count,const char *fmt,...)
data/htp-1.19/src/snprintf.c:845:8:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
	ret = vsnprintf(str, count, fmt, ap);
data/htp-1.19/src/snprintf.c:862:8:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
	ret = vsnprintf(NULL, 0, format, ap2);
data/htp-1.19/src/snprintf.c:870:8:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
	ret = vsnprintf(*ptr, ret+1, format, ap2);
data/htp-1.19/src/snprintf.c:895:6:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
 int sprintf(char *str,const char *fmt,...);
data/htp-1.19/src/snprintf.c:958:13:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
			int l1 = snprintf(NULL, 0, fp_fmt[x], fp_nums[y]);
data/htp-1.19/src/snprintf.c:959:13:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
			int l2 = snprintf(buf1, sizeof(buf1), fp_fmt[x], fp_nums[y]);
data/htp-1.19/src/snprintf.c:960:4:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
			sprintf (buf2, fp_fmt[x], fp_nums[y]);
data/htp-1.19/src/snprintf.c:976:13:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
			int l1 = snprintf(NULL, 0, int_fmt[x], int_nums[y]);
data/htp-1.19/src/snprintf.c:977:13:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
			int l2 = snprintf(buf1, sizeof(buf1), int_fmt[x], int_nums[y]);
data/htp-1.19/src/snprintf.c:978:4:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
			sprintf (buf2, int_fmt[x], int_nums[y]);
data/htp-1.19/src/snprintf.c:994:13:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
			int l1 = snprintf(NULL, 0, str_fmt[x], str_vals[y]);
data/htp-1.19/src/snprintf.c:995:13:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
			int l2 = snprintf(buf1, sizeof(buf1), str_fmt[x], str_vals[y]);
data/htp-1.19/src/snprintf.c:996:4:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
			sprintf (buf2, str_fmt[x], str_vals[y]);
data/htp-1.19/src/snprintf.h:10:12:  [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.
extern int snprintf(char *, size_t, const char *, /*args*/ ...);
data/htp-1.19/src/snprintf.h:11:12:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
extern int vsnprintf(char *, size_t, const char *, va_list);
data/htp-1.19/src/snprintf.h:17: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.
#define snprintf  portable_snprintf
data/htp-1.19/src/snprintf.h:18:9:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
#define vsnprintf portable_vsnprintf
data/htp-1.19/src/streams.c:284:11:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
    len = vsnprintf(str, sizeof(buffer), format, argptr);
data/htp-1.19/src/streams.c:290:15:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
        len = vsnprintf(str, len + 1, format, argptr);
data/htp-1.19/src/htp-files.c:31: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((defFile = getenv("HTPDEF")) == NULL)
data/htp-1.19/src/util.c:60: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.
        if((tempDir = getenv("TEMP")) == NULL)
data/htp-1.19/src/util.c:62: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.
            if((tempDir = getenv("TMP")) == NULL)
data/htp-1.19/src/util.c:70:19:  [3] (tmpfile) tempnam:
  Temporary file race condition (CWE-377).
    if((tmpName = tempnam(tempDir, (char *) PROGRAM_NAME)) != NULL)
data/htp-1.19/src/varstore.c:212:14:  [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((value = getenv(name)) != NULL)
data/htp-1.19/src/varstore.c:317:5:  [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(name) != NULL)
data/htp-1.19/src/varstore.c:383:9:  [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(name) != NULL) {
data/htp-1.19/src/defs.c:51: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 searchPath[SEARCH_PATH_SIZE] = { 0, };
data/htp-1.19/src/defs.h:160: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 searchPath[SEARCH_PATH_SIZE];
data/htp-1.19/src/file-proc.c:65:29:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
                precision = atoi(pattrib->value);
data/htp-1.19/src/file-proc.c:175: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 newCmdline[MAX_CMDLINE_LEN];
data/htp-1.19/src/file-proc.c:176:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char tempFilename[MAX_PATHNAME_LEN];
data/htp-1.19/src/file-proc.c:250:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            char *argv[4];
data/htp-1.19/src/file-proc.c:396: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 fullPathname[MAX_PATHNAME_LEN];
data/htp-1.19/src/htp-files.c:202: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 open_markup[3];
data/htp-1.19/src/htp-files.c:203: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 tag_specials[3];
data/htp-1.19/src/htp-files.c:362: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 title[MAX_PATHNAME_LEN];
data/htp-1.19/src/htp.c:23: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 globalFilename[MAX_PATHNAME_LEN];
data/htp-1.19/src/htp.c:24: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 projectFilename[MAX_PATHNAME_LEN];
data/htp-1.19/src/htp.c:323: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 textline[MAX_CMDLINE_LEN];
data/htp-1.19/src/htp.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 defResp[MAX_PATHNAME_LEN];
data/htp-1.19/src/htp.c:325: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 newDirectory[MAX_PATHNAME_LEN];
data/htp-1.19/src/htp.c:326: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 oldDirectory[MAX_PATHNAME_LEN];
data/htp-1.19/src/htp.c:336: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 nl_bitmap[3];
data/htp-1.19/src/htp.c:470:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            char tempFilename[MAX_PATHNAME_LEN];
data/htp-1.19/src/image-proc.c:25: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 str[32];
data/htp-1.19/src/image-proc.c:31: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 altFilename[MAX_FILENAME_LEN+8];
data/htp-1.19/src/image-proc.c:49: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(altFilename, "_htpalt_");
data/htp-1.19/src/image-proc.c:112: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 altName[MAX_FILENAME_LEN+8];
data/htp-1.19/src/image-proc.c:128:5:  [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(altName, "_htpalt_");
data/htp-1.19/src/image.c:170:23:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    imageFile->file = fopen(imageFile->name, "rb");
data/htp-1.19/src/jpeg.c:129: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 signature[8];
data/htp-1.19/src/macro.c:141: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(destText, text, len);
data/htp-1.19/src/macro.c:286: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(destText, *newText, copiedSoFar);
data/htp-1.19/src/macro.c:297: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(destText, expansion, expansionLength);
data/htp-1.19/src/macro.c:315: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(destText, text, textLength);
data/htp-1.19/src/msg.c:18:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
const char *severitySymbol[3] =
data/htp-1.19/src/msg.c:66:20:  [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).
    debugMsgFile = fopen(debugMsgFilename, "at");
data/htp-1.19/src/option.c:96: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(localOptions, globalOptions, sizeof(globalOptions));
data/htp-1.19/src/option.c:146: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[MAX_OPTION_LENGTH];
data/htp-1.19/src/set-proc.c:120: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 valueStr[MAX_INC_VALUE_LENGTH];
data/htp-1.19/src/set-proc.c:161:17:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
        value = atoi(expansion);
data/htp-1.19/src/set-proc.c:163:22:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
            value += atoi(attrib->value);
data/htp-1.19/src/snprintf.c:518: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 convert[20];
data/htp-1.19/src/snprintf.c:671: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 iconvert[311];
data/htp-1.19/src/snprintf.c:672: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 fconvert[311];
data/htp-1.19/src/snprintf.c:899: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 buf1[1024];
data/htp-1.19/src/snprintf.c:900: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 buf2[1024];
data/htp-1.19/src/snprintf.c:1019:4:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
			sprintf(buf2,                "%1.1f", r);
data/htp-1.19/src/streams.c:62: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(str, stream->u.buffer.buffer, stream->u.buffer.offset);
data/htp-1.19/src/streams.c:154:37:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
uint GetStreamBlock(STREAM *stream, char *buffer, uint size, char delim[3])
data/htp-1.19/src/streams.c:154:62:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
uint GetStreamBlock(STREAM *stream, char *buffer, uint size, char delim[3])
data/htp-1.19/src/streams.c:262: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 (stream->u.buffer.buffer + stream->u.buffer.offset, str, len);
data/htp-1.19/src/streams.c:277: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[4*KBYTE];
data/htp-1.19/src/streams.h:58:37:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
BOOL GetStreamBlock(STREAM *stream, char *buffer, uint size, char delims[3]);
data/htp-1.19/src/streams.h:58:62:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
BOOL GetStreamBlock(STREAM *stream, char *buffer, uint size, char delims[3]);
data/htp-1.19/src/suballoc.c:43: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            file[SUBALLOC_MAX_HEADER_FILE_SIZE];
data/htp-1.19/src/suballoc.c:126: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(startSignature, &endSignature, sizeof(DWORD));
data/htp-1.19/src/textfile.c:38:23:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    textFile->file  = fopen(os_filename, openFlags);
data/htp-1.19/src/util.c:263:12:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    return memcpy(new, src, size);
data/htp-1.19/src/util.c:286:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(new, src, len);
data/htp-1.19/src/file-proc.c:225:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(newCmdline, cmdline, MAX_PATHNAME_LEN);
data/htp-1.19/src/html.c:397: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).
        strlen(htmlMarkup->whitespace) : 0;
data/htp-1.19/src/html.c:403:12:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    size = strlen(htmlMarkup->tag) + wslen + 1;
data/htp-1.19/src/html.c:412: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).
            strlen(htmlAttribute->whitespace) : 0;
data/htp-1.19/src/html.c:419: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).
        attrSize = strlen(htmlAttribute->name) + wslen;
data/htp-1.19/src/html.c:435: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).
            attrSize += strlen(htmlAttribute->value) + 1;
data/htp-1.19/src/html.c:438: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).
            attrSize += 2 * strlen(quotes);
data/htp-1.19/src/htp-files.c:145:59:  [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(strchr(ALL_FILESYSTEM_DELIMITERS, fullPathname[strlen(fullPathname) - 1]) == NULL)
data/htp-1.19/src/htp-files.c:147:13:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings.
            strncat(fullPathname, DIR_DELIMITER_STRING, size);
data/htp-1.19/src/htp-files.c:151:9:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings.
        strncat(fullPathname, filename, size);
data/htp-1.19/src/htp.c:346:47:  [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(strchr(ALL_FILESYSTEM_DELIMITERS, resp[strlen(resp) - 1]) != NULL)
data/htp-1.19/src/htp.c:356: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).
        newDirectory[strlen(newDirectory) - 1] = NUL;
data/htp-1.19/src/image.c:103: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).
    urlsize = strlen(imageurl->url);
data/htp-1.19/src/image.c:104: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).
    srcsize = strlen(src);
data/htp-1.19/src/image.c:111: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).
    pathsize   = strlen(imageurl->path);
data/htp-1.19/src/image.c:113: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).
    suffixsize = strlen(suffix);
data/htp-1.19/src/jpeg.c:47:13:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    if((i = fgetc(file)) == EOF)
data/htp-1.19/src/macro.c:122: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).
    textLength = strlen(text);
data/htp-1.19/src/macro.c:251: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).
                expansionLength = strlen(expansion);
data/htp-1.19/src/macro.c:532: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).
                wildcardLength += strlen(attrib->name) + 1;
data/htp-1.19/src/macro.c:534: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).
                    wildcardLength += strlen(attrib->value) + 1;
data/htp-1.19/src/snprintf.c:414: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).
					max = strlen(strvalue);
data/htp-1.19/src/streams.c:244: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).
        ulong len = strlen(str);
data/htp-1.19/src/textfile.c:88:17:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    if((getCh = fgetc(textFile->file)) == EOF)
data/htp-1.19/src/util.c:99: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/htp-1.19/src/util.c:138: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(pathname);
data/htp-1.19/src/util.c:173:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(dest, src, size);
data/htp-1.19/src/util.c:191: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).
    findToken->lastChar = string + strlen(string);
data/htp-1.19/src/util.c:254:12:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    size = strlen(src) + 1;
data/htp-1.19/src/util.c:275: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).
    assert(src != NULL && len <= strlen(src));

ANALYSIS SUMMARY:

Hits = 127
Lines analyzed = 10153 in approximately 0.28 seconds (36414 lines/second)
Physical Source Lines of Code (SLOC) = 6645
Hits@level = [0]  70 [1]  30 [2]  54 [3]   7 [4]  32 [5]   4
Hits@level+ = [0+] 197 [1+] 127 [2+]  97 [3+]  43 [4+]  36 [5+]   4
Hits/KSLOC@level+ = [0+] 29.6464 [1+] 19.1121 [2+] 14.5974 [3+] 6.47103 [4+] 5.41761 [5+] 0.601956
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.