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/rdiff-backup-fs-1.0.0/errors.c
Examining data/rdiff-backup-fs-1.0.0/errors.h
Examining data/rdiff-backup-fs-1.0.0/parse.h
Examining data/rdiff-backup-fs-1.0.0/initialize.h
Examining data/rdiff-backup-fs-1.0.0/operations.h
Examining data/rdiff-backup-fs-1.0.0/headers.h
Examining data/rdiff-backup-fs-1.0.0/constants.h
Examining data/rdiff-backup-fs-1.0.0/layout/core.c
Examining data/rdiff-backup-fs-1.0.0/layout/core.h
Examining data/rdiff-backup-fs-1.0.0/layout/all.c
Examining data/rdiff-backup-fs-1.0.0/layout/all.h
Examining data/rdiff-backup-fs-1.0.0/layout/versions.c
Examining data/rdiff-backup-fs-1.0.0/layout/versions.h
Examining data/rdiff-backup-fs-1.0.0/structure/core.c
Examining data/rdiff-backup-fs-1.0.0/structure/core.h
Examining data/rdiff-backup-fs-1.0.0/structure/full.c
Examining data/rdiff-backup-fs-1.0.0/structure/full.h
Examining data/rdiff-backup-fs-1.0.0/structure/necessary.c
Examining data/rdiff-backup-fs-1.0.0/structure/necessary.h
Examining data/rdiff-backup-fs-1.0.0/structure/support.c
Examining data/rdiff-backup-fs-1.0.0/structure/support.h
Examining data/rdiff-backup-fs-1.0.0/retriever/retriever.c
Examining data/rdiff-backup-fs-1.0.0/retriever/retriever.h
Examining data/rdiff-backup-fs-1.0.0/retriever/simple.c
Examining data/rdiff-backup-fs-1.0.0/retriever/simple.h
Examining data/rdiff-backup-fs-1.0.0/retriever/support.c
Examining data/rdiff-backup-fs-1.0.0/retriever/support.h
Examining data/rdiff-backup-fs-1.0.0/retriever/limit.c
Examining data/rdiff-backup-fs-1.0.0/retriever/limit.h
Examining data/rdiff-backup-fs-1.0.0/support/gstring.c
Examining data/rdiff-backup-fs-1.0.0/support/gstring.h
Examining data/rdiff-backup-fs-1.0.0/support/gpath.c
Examining data/rdiff-backup-fs-1.0.0/support/gpath.h
Examining data/rdiff-backup-fs-1.0.0/support/grdiff.c
Examining data/rdiff-backup-fs-1.0.0/support/grdiff.h
Examining data/rdiff-backup-fs-1.0.0/support/gstats.c
Examining data/rdiff-backup-fs-1.0.0/support/gstats.h
Examining data/rdiff-backup-fs-1.0.0/support/gtree.c
Examining data/rdiff-backup-fs-1.0.0/support/gtree.h
Examining data/rdiff-backup-fs-1.0.0/support/gutils.c
Examining data/rdiff-backup-fs-1.0.0/support/gutils.h
Examining data/rdiff-backup-fs-1.0.0/operations.c
Examining data/rdiff-backup-fs-1.0.0/externs.h
Examining data/rdiff-backup-fs-1.0.0/initialize.c
Examining data/rdiff-backup-fs-1.0.0/parse.c
Examining data/rdiff-backup-fs-1.0.0/rdiff-backup-fs.c

FINAL RESULTS:

data/rdiff-backup-fs-1.0.0/errors.c:51:10:  [4] (shell) execlp:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
    	if (execlp("rm", "rm", "-r", "-f", data_dir, NULL) == -1)
data/rdiff-backup-fs-1.0.0/initialize.c:107: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(tmp_template, *tmp_dir);
data/rdiff-backup-fs-1.0.0/initialize.c:108:5:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
   	strcpy(tmp_template + strlen(*tmp_dir), "/" TMP_DIR_NAME);
data/rdiff-backup-fs-1.0.0/initialize.c:113: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((*tmp_file), tmp_template);
data/rdiff-backup-fs-1.0.0/operations.c:81:2:  [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(buf, stats->link);		
data/rdiff-backup-fs-1.0.0/parse.c:112:3:  [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(PROGRAM_NAME " - filesystem in userspace for rdiff-backup repositories; version %s\n", PACKAGE_VERSION);
data/rdiff-backup-fs-1.0.0/parse.c:155:3:  [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(PROGRAM_NAME " - filesystem in userspace for rdiff-backup repositories; version %s\n", PACKAGE_VERSION);
data/rdiff-backup-fs-1.0.0/retriever/support.c:87:7:  [4] (shell) execlp:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
		if (execlp("rdiff-backup", "rdiff-backup", "--force", "-r", revision, file, tmp_path, NULL) == -1)
data/rdiff-backup-fs-1.0.0/support/gpath.c:21: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((*dest), source + i + 1);
data/rdiff-backup-fs-1.0.0/support/gpath.c:41: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(temp, source + i + 1);
data/rdiff-backup-fs-1.0.0/support/gpath.c:48: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((*dest), temp);
data/rdiff-backup-fs-1.0.0/support/grdiff.c:155:5:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
    sprintf(result, ARCHFS_DIR_FORMAT, rev_tm->tm_year + 1900, 
data/rdiff-backup-fs-1.0.0/support/gstring.c:110:5:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
    strcat(temp, source);
data/rdiff-backup-fs-1.0.0/support/gstring.c:113:3:  [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(temp, other_source);
data/rdiff-backup-fs-1.0.0/support/gstring.c:174: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(temp, (*main));
data/rdiff-backup-fs-1.0.0/support/gstring.c:175:5:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
    strcat(temp, sufix);
data/rdiff-backup-fs-1.0.0/support/gstring.c:178:3:  [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(temp, other_sufix);
data/rdiff-backup-fs-1.0.0/support/gstring.c:238: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(*line, temp);
data/rdiff-backup-fs-1.0.0/support/gutils.h:16:9:  [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("[%s, %d, %s] " format, __FILE__, __LINE__, __FUNCTION__, ##__VA_ARGS__);                  \
data/rdiff-backup-fs-1.0.0/initialize.c:96:26:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    char *tmpdirprefix = getenv("TMPDIR");
data/rdiff-backup-fs-1.0.0/initialize.c:105:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char tmp_template[length + 1];
data/rdiff-backup-fs-1.0.0/layout/versions.c:106: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 ((file = fopen(path, "r")) == NULL)
data/rdiff-backup-fs-1.0.0/layout/versions.c:146: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 ((file = fopen(path, "r")) == NULL)
data/rdiff-backup-fs-1.0.0/operations.c:127:23:  [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 ((descriptor = open(tmp_path, O_RDONLY)) == -1)
data/rdiff-backup-fs-1.0.0/parse.c:38:16:  [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).
	cache_limit = atoi(argv[*index + 1]);
data/rdiff-backup-fs-1.0.0/parse.c:51:20:  [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).
	necessary_limit = atoi(argv[*index + 1]);
data/rdiff-backup-fs-1.0.0/parse.c:64:19:  [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).
    debug_level = atoi(argv[*index + 1]);
data/rdiff-backup-fs-1.0.0/rdiff-backup-fs.c:23:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char *args[3];
data/rdiff-backup-fs-1.0.0/retriever/limit.c:82:2:  [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(revision, "%dB", stats->rev);
data/rdiff-backup-fs-1.0.0/retriever/support.c:46:2:  [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(revision, "%dB", stats->rev);
data/rdiff-backup-fs-1.0.0/retriever/support.c:110:12:  [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).
    desc = mkstemp(tmp_template);
data/rdiff-backup-fs-1.0.0/structure/full.c:125:17:  [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 = fopen(file_path, "r")) == NULL)
data/rdiff-backup-fs-1.0.0/structure/necessary.c:313:17:  [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 = fopen(snapshot, "r")) == NULL)
data/rdiff-backup-fs-1.0.0/structure/necessary.c:352:26:  [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).
    if ((snapshot_desc = mkstemp(temp_snapshot)) == -1)
data/rdiff-backup-fs-1.0.0/structure/necessary.c:359:26:  [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 ((revision_desc = open(snapshot, O_RDONLY)) == -1)
data/rdiff-backup-fs-1.0.0/structure/necessary.c:370:30:  [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 ((revision_desc = open(snapshot, O_RDONLY)) == -1)
data/rdiff-backup-fs-1.0.0/support/gpath.c:40:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char temp[source_length - i];
data/rdiff-backup-fs-1.0.0/support/grdiff.c:58: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).
            	if ((descriptor = open(mirror, O_WRONLY | O_CREAT, S_IRWXU)) == -1)
data/rdiff-backup-fs-1.0.0/support/grdiff.c:193:18:  [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).
			stats->size = atoi(line + 7);
data/rdiff-backup-fs-1.0.0/support/grdiff.c:223:19:  [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).
			stats->ctime = atoi(line + 10);
data/rdiff-backup-fs-1.0.0/support/grdiff.c:291: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 buffer[1024];
data/rdiff-backup-fs-1.0.0/support/grdiff.c:298:23:  [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 ((snapshot_desc = open(snapshot, O_WRONLY | O_CREAT, S_IRWXU)) == -1)
data/rdiff-backup-fs-1.0.0/support/grdiff.c:300:23:  [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 ((revision_desc = open(path, O_RDONLY)) == -1){
data/rdiff-backup-fs-1.0.0/support/grdiff.c:318: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 buffer[1024];
data/rdiff-backup-fs-1.0.0/support/grdiff.c:324:23:  [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 ((snapshot_desc = open(snapshot, O_WRONLY | O_APPEND)) == -1)
data/rdiff-backup-fs-1.0.0/support/grdiff.c:326:23:  [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 ((revision_desc = open(path, O_RDONLY)) == -1){
data/rdiff-backup-fs-1.0.0/support/grdiff.c:374: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[1024];
data/rdiff-backup-fs-1.0.0/support/grdiff.c:386:17:  [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 = fopen(target, "w")) == NULL)
data/rdiff-backup-fs-1.0.0/support/gstats.c:9: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((*dest), source, sizeof(stats_t));
data/rdiff-backup-fs-1.0.0/support/gstring.c:12:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char temp[dest_length + sufix_length + 1];
data/rdiff-backup-fs-1.0.0/support/gtree.c:76: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(node->stats, stats, sizeof(struct stats));
data/rdiff-backup-fs-1.0.0/support/gtree.c:136:14:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	if ((file = open(path, O_WRONLY | O_CREAT, S_IRWXU)) == -1)
data/rdiff-backup-fs-1.0.0/support/gutils.c:6: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 buffer[1024];
data/rdiff-backup-fs-1.0.0/initialize.c:104:18:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    int length = strlen(*tmp_dir) + strlen("/" TMP_DIR_NAME);
data/rdiff-backup-fs-1.0.0/initialize.c:104:37:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    int length = strlen(*tmp_dir) + strlen("/" TMP_DIR_NAME);
data/rdiff-backup-fs-1.0.0/initialize.c:108: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).
   	strcpy(tmp_template + strlen(*tmp_dir), "/" TMP_DIR_NAME);
data/rdiff-backup-fs-1.0.0/operations.c:131:16:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	if ((result = read(descriptor, buf, size)) == -1)
data/rdiff-backup-fs-1.0.0/structure/full.c:152:37:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    stats->internal = stats->path + strlen(prefix) + strlen("/");
data/rdiff-backup-fs-1.0.0/structure/full.c:152:54:  [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).
    stats->internal = stats->path + strlen(prefix) + strlen("/");
data/rdiff-backup-fs-1.0.0/structure/full.c:175:33:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		stats.name = stats.path + 1 + strlen(repository) + 1;
data/rdiff-backup-fs-1.0.0/structure/necessary.c:319: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).
        stats.internal = stats.path + strlen(prefix) + strlen("/");        
data/rdiff-backup-fs-1.0.0/structure/necessary.c:319:56:  [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).
        stats.internal = stats.path + strlen(prefix) + strlen("/");        
data/rdiff-backup-fs-1.0.0/support/gpath.c:8: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).
    int source_length = strlen(source);
data/rdiff-backup-fs-1.0.0/support/gpath.c:23:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy((*dest), source + i + 1, source_length - i - 2);
data/rdiff-backup-fs-1.0.0/support/gpath.c:30: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).
    int source_length = strlen(source);
data/rdiff-backup-fs-1.0.0/support/gpath.c:50:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy((*dest), temp, source_length - i - 2);
data/rdiff-backup-fs-1.0.0/support/gpath.c:78: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).
    int i = strlen(path) - 1;
data/rdiff-backup-fs-1.0.0/support/gpath.c:103:18:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    int length = strlen((*path));
data/rdiff-backup-fs-1.0.0/support/gpath.c:104: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).
    if (length < strlen("*.gz"))
data/rdiff-backup-fs-1.0.0/support/gpath.c:130:23:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    int path_length = strlen(path);
data/rdiff-backup-fs-1.0.0/support/gpath.c:131:24:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    int entry_length = strlen(entry);
data/rdiff-backup-fs-1.0.0/support/gpath.c:169:23:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    int path_length = strlen(path);
data/rdiff-backup-fs-1.0.0/support/gpath.c:170:24:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    int entry_length = strlen(entry);
data/rdiff-backup-fs-1.0.0/support/gpath.c:208:21:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    int path_size = strlen(path);
data/rdiff-backup-fs-1.0.0/support/gpath.c:330: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).
    for (i = strlen(path) - 1; i >= 0 && path[i] != '.'; i--);
data/rdiff-backup-fs-1.0.0/support/gpath.c:332:23:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        return path + strlen(path) - 1; // returning pointer to an empty string
data/rdiff-backup-fs-1.0.0/support/gpath.c:368: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).
	length = strlen(source);
data/rdiff-backup-fs-1.0.0/support/gpath.h:31: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).
	    new_len = strlen(dest);									\
data/rdiff-backup-fs-1.0.0/support/grdiff.c:119:30:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    char *current = mirror + strlen(MIRROR_PREFIX);
data/rdiff-backup-fs-1.0.0/support/grdiff.c:153:30:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    char *result = gstralloc(strlen(ARCHFS_DIR_FORMAT_LENGTH));
data/rdiff-backup-fs-1.0.0/support/grdiff.c:304:19:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	while ((result = read(revision_desc, buffer, 1024)) != 0)
data/rdiff-backup-fs-1.0.0/support/grdiff.c:332:19:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	while ((result = read(revision_desc, buffer, 1024)) != 0)
data/rdiff-backup-fs-1.0.0/support/gstring.c:9:23:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    int dest_length = strlen((*dest));
data/rdiff-backup-fs-1.0.0/support/gstring.c:10:24:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    int sufix_length = strlen(sufix);
data/rdiff-backup-fs-1.0.0/support/gstring.c:60:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy((*dest), source, count);
data/rdiff-backup-fs-1.0.0/support/gstring.c:73:18:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    int length = strlen(source);
data/rdiff-backup-fs-1.0.0/support/gstring.c:84:18:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    int length = strlen(source);
data/rdiff-backup-fs-1.0.0/support/gstring.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).
    length += strlen(source);
data/rdiff-backup-fs-1.0.0/support/gstring.c:107: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).
		length += strlen(other_source);
data/rdiff-backup-fs-1.0.0/support/gstring.c:124:23:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    int main_length = strlen(main);
data/rdiff-backup-fs-1.0.0/support/gstring.c:125: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).
    int sub_length = strlen(sub);
data/rdiff-backup-fs-1.0.0/support/gstring.c:165: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).
		length = strlen((*main));
data/rdiff-backup-fs-1.0.0/support/gstring.c:166: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).
    length += strlen(sufix);
data/rdiff-backup-fs-1.0.0/support/gstring.c:169: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).
		length += strlen(other_sufix);
data/rdiff-backup-fs-1.0.0/support/gstring.c:226:17:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		next = (char) getc(file);
data/rdiff-backup-fs-1.0.0/support/gtree.c:184: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).
	length = strlen(path);
data/rdiff-backup-fs-1.0.0/support/gtree.c:295: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).
	write(desc, result, strlen(result));
data/rdiff-backup-fs-1.0.0/support/gutils.c:8:19:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	while ((result = read(source, buffer, 1024)) > 0){

ANALYSIS SUMMARY:

Hits = 98
Lines analyzed = 4127 in approximately 0.12 seconds (35547 lines/second)
Physical Source Lines of Code (SLOC) = 2941
Hits@level = [0]  14 [1]  45 [2]  33 [3]   1 [4]  19 [5]   0
Hits@level+ = [0+] 112 [1+]  98 [2+]  53 [3+]  20 [4+]  19 [5+]   0
Hits/KSLOC@level+ = [0+] 38.0823 [1+] 33.322 [2+] 18.0211 [3+] 6.80041 [4+] 6.46039 [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.