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/jesred-1.2pl1/config.h
Examining data/jesred-1.2pl1/main.h
Examining data/jesred-1.2pl1/util.h
Examining data/jesred-1.2pl1/version.h
Examining data/jesred-1.2pl1/path.h
Examining data/jesred-1.2pl1/config.c
Examining data/jesred-1.2pl1/log.c
Examining data/jesred-1.2pl1/log.h
Examining data/jesred-1.2pl1/util.c
Examining data/jesred-1.2pl1/pattern_list.c
Examining data/jesred-1.2pl1/pattern_list.h
Examining data/jesred-1.2pl1/main.c
Examining data/jesred-1.2pl1/rewrite.h
Examining data/jesred-1.2pl1/ip_list.c
Examining data/jesred-1.2pl1/ip_list.h
Examining data/jesred-1.2pl1/rewrite.c

FINAL RESULTS:

data/jesred-1.2pl1/config.c:87: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,DEFAULT_PATH);
data/jesred-1.2pl1/ip_list.c:143: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.
		response=p->access;
data/jesred-1.2pl1/ip_list.c:162: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.
		response=p->access;
data/jesred-1.2pl1/ip_list.h:112:19:  [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.
   ip_access_type access;
data/jesred-1.2pl1/log.c:75: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.
    if(vsnprintf(msg, BUFSIZE, format, args) > (BUFSIZE - 1)) {
data/jesred-1.2pl1/pattern_list.c:83:14:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
    stored = sscanf(pattern, "%s %s %s %s %s", type, arg1, arg2, arg3, arg4);
data/jesred-1.2pl1/pattern_list.c:178: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(rpattern.pattern, rgxurl);
data/jesred-1.2pl1/pattern_list.c:185: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(rpattern.replacement, repurl);
data/jesred-1.2pl1/pattern_list.c:212: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(rpattern.urlgroup, urlgroup);
data/jesred-1.2pl1/pattern_list.c:247:5:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
    strcpy(new_accel,accel);
data/jesred-1.2pl1/rewrite.c:254:8:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
			    strcpy(newurl,curr->replacement);
data/jesred-1.2pl1/rewrite.c:271:4:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
			strcpy(newurl,curr->replacement);
data/jesred-1.2pl1/util.c:157:13:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
            strcpy(save, str);
data/jesred-1.2pl1/main.c:215:17:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
    while ((c = getopt(argc, argv, "hv")) != -1) {
data/jesred-1.2pl1/config.c:55: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[BUFSIZE];
data/jesred-1.2pl1/config.c:58: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).
    fd = fopen(*file, "r");
data/jesred-1.2pl1/config.c:83: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[BUFSIZE];
data/jesred-1.2pl1/config.c:89:5:  [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(buff,"jesred.conf");
data/jesred-1.2pl1/config.c:90:14:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if ( (fd=fopen(buff,"r")) == NULL) {
data/jesred-1.2pl1/config.c: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 buff[BUFSIZE];
data/jesred-1.2pl1/config.c:177:27:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if ( ! *file || (fd = fopen(*file, "rt")) == NULL ) {
data/jesred-1.2pl1/ip_list.c:126: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 addrbuffer[INET6_ADDRSTRLEN];
data/jesred-1.2pl1/ip_list.c:203:13:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
    masklen=atoi(++masklenp);
data/jesred-1.2pl1/log.c:58:15:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if ((fd = fopen(file, "a+")) == NULL) {
data/jesred-1.2pl1/log.c:69: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 msg[BUFSIZE];
data/jesred-1.2pl1/main.c:77: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[BUFSIZE];
data/jesred-1.2pl1/main.c:78: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 redirect_url[BUFSIZE];
data/jesred-1.2pl1/pattern_list.c:67: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 type[BUFSIZE];
data/jesred-1.2pl1/pattern_list.c:68: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 arg1[BUFSIZE];
data/jesred-1.2pl1/pattern_list.c:69: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 arg2[BUFSIZE];
data/jesred-1.2pl1/pattern_list.c:70: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 arg3[BUFSIZE];
data/jesred-1.2pl1/pattern_list.c:71: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 arg4[BUFSIZE];
data/jesred-1.2pl1/rewrite.c:389: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 l_accel[BUFSIZE];
data/jesred-1.2pl1/config.c:88:5:  [1] (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 character.
    strcat(buff,"/");
data/jesred-1.2pl1/config.c:150:15:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (token[strlen(line)-1] == '\n')
data/jesred-1.2pl1/config.c:151: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).
	token[strlen(line)-1] = '\0';
data/jesred-1.2pl1/config.c:157: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).
    for(i= strlen(token) -1 ; i >= 0; i--) {
data/jesred-1.2pl1/ip_list.c:160:11:  [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.
	     if (equal)
data/jesred-1.2pl1/pattern_list.c:119:15:  [1] (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 character.
	             strcpy(repurl, "");
data/jesred-1.2pl1/pattern_list.c:172:55:  [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).
    rpattern.pattern = (char *)malloc(sizeof(char) * (strlen(rgxurl) +1));
data/jesred-1.2pl1/pattern_list.c:179: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).
    rpattern.replacement = (char *)malloc(sizeof(char) * (strlen(repurl) +1));
data/jesred-1.2pl1/pattern_list.c:206:60:  [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).
        rpattern.urlgroup = (char *)malloc(sizeof(char) * (strlen(urlgroup) +1));
data/jesred-1.2pl1/pattern_list.c:237: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(accel);
data/jesred-1.2pl1/pattern_list.c:246: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).
    new_accel = (char *)malloc(sizeof(char) * strlen(accel));
data/jesred-1.2pl1/pattern_list.c:329: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).
    for (i = 0; i < strlen (pattern); i++) {
data/jesred-1.2pl1/rewrite.c:147: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(*url) <= 7) {
data/jesred-1.2pl1/rewrite.c:148:45:  [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).
	mylog(ERROR, "strlen url to short (%d)\n", strlen(*url));
data/jesred-1.2pl1/rewrite.c:217: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).
	    len = strlen(curr->pattern);
data/jesred-1.2pl1/rewrite.c:218: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).
	    pos = strlen(url) - len; /* this is dangerous */
data/jesred-1.2pl1/rewrite.c:412: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).
	accel_len = strlen(accel);
data/jesred-1.2pl1/rewrite.c:413: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).
	url_len = strlen(url);
data/jesred-1.2pl1/rewrite.c:431: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).
	accel_len = strlen(accel);
data/jesred-1.2pl1/rewrite.c:432: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).
	url_len = strlen(url);
data/jesred-1.2pl1/util.c:151: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).
        save = (char *)malloc(strlen(str) + 1);

ANALYSIS SUMMARY:

Hits = 54
Lines analyzed = 2331 in approximately 0.11 seconds (20305 lines/second)
Physical Source Lines of Code (SLOC) = 1362
Hits@level = [0]  30 [1]  21 [2]  19 [3]   1 [4]  13 [5]   0
Hits@level+ = [0+]  84 [1+]  54 [2+]  33 [3+]  14 [4+]  13 [5+]   0
Hits/KSLOC@level+ = [0+] 61.674 [1+] 39.6476 [2+] 24.2291 [3+] 10.279 [4+] 9.54479 [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.