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/zsync-0.6.2/zlib/zutil.h
Examining data/zsync-0.6.2/zlib/deflate.c
Examining data/zsync-0.6.2/zlib/inffixed.h
Examining data/zsync-0.6.2/zlib/inftrees.h
Examining data/zsync-0.6.2/zlib/zlib.h
Examining data/zsync-0.6.2/zlib/inflate.h
Examining data/zsync-0.6.2/zlib/adler32.c
Examining data/zsync-0.6.2/zlib/inflate.c
Examining data/zsync-0.6.2/zlib/zconf.h
Examining data/zsync-0.6.2/zlib/compress.c
Examining data/zsync-0.6.2/zlib/trees.c
Examining data/zsync-0.6.2/zlib/zutil.c
Examining data/zsync-0.6.2/zlib/inftrees.c
Examining data/zsync-0.6.2/zlib/trees.h
Examining data/zsync-0.6.2/zlib/crc32.c
Examining data/zsync-0.6.2/zlib/crc32.h
Examining data/zsync-0.6.2/zlib/deflate.h
Examining data/zsync-0.6.2/progress.c
Examining data/zsync-0.6.2/zsglobal.h
Examining data/zsync-0.6.2/client.c
Examining data/zsync-0.6.2/format_string.h
Examining data/zsync-0.6.2/url.c
Examining data/zsync-0.6.2/librcksum/internal.h
Examining data/zsync-0.6.2/librcksum/state.c
Examining data/zsync-0.6.2/librcksum/rsum.c
Examining data/zsync-0.6.2/librcksum/rcksum.h
Examining data/zsync-0.6.2/librcksum/md4test.c
Examining data/zsync-0.6.2/librcksum/md4.h
Examining data/zsync-0.6.2/librcksum/md4.c
Examining data/zsync-0.6.2/librcksum/range.c
Examining data/zsync-0.6.2/librcksum/hash.c
Examining data/zsync-0.6.2/http.h
Examining data/zsync-0.6.2/url.h
Examining data/zsync-0.6.2/makegz.c
Examining data/zsync-0.6.2/getaddrinfo.c
Examining data/zsync-0.6.2/make.c
Examining data/zsync-0.6.2/http.c
Examining data/zsync-0.6.2/progress.h
Examining data/zsync-0.6.2/base64.c
Examining data/zsync-0.6.2/libzsync/sha1.h
Examining data/zsync-0.6.2/libzsync/sha1.c
Examining data/zsync-0.6.2/libzsync/zmap.c
Examining data/zsync-0.6.2/libzsync/zsync.c
Examining data/zsync-0.6.2/libzsync/sha1test.c
Examining data/zsync-0.6.2/libzsync/zmap.h
Examining data/zsync-0.6.2/libzsync/zsync.h
Examining data/zsync-0.6.2/getaddrinfo.h
Examining data/zsync-0.6.2/makegz.h

FINAL RESULTS:

data/zsync-0.6.2/client.c:72:19:  [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.
        FILE* f = popen(cmd, "r");
data/zsync-0.6.2/client.c:494:17:  [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(PACKAGE " v" VERSION " (compiled " __DATE__ " " __TIME__
data/zsync-0.6.2/client.c:539: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_file, filename);
data/zsync-0.6.2/client.c:548:14:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
        if (!access(filename, R_OK)) {
data/zsync-0.6.2/client.c:556:14:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
        if (!access(temp_file, R_OK)) {
data/zsync-0.6.2/client.c:644: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(oldfile_backup, filename);
data/zsync-0.6.2/client.c:647:14:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
        if (!access(filename, F_OK)) {
data/zsync-0.6.2/getaddrinfo.c:486:6:  [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(head_res->ai_canonname, canonname);
data/zsync-0.6.2/getaddrinfo.c:546:6:  [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(serv, servent->s_name);
data/zsync-0.6.2/getaddrinfo.c:568:6:  [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(node, hostent->h_name);
data/zsync-0.6.2/getaddrinfo.c:579:6:  [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(node, ntoa_address);
data/zsync-0.6.2/http.c:231: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.
            snprintf(header, l, auth_header_tmpl, b);
data/zsync-0.6.2/http.c:275: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(fname, tfname);
data/zsync-0.6.2/http.c:437:17:  [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. If the scanf format is influenceable by an
  attacker, it's exploitable.
                sscanf(buf, "Content-Length: " SIZE_T_PF, &len);
data/zsync-0.6.2/http.c:772:9:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
        snprintf(request + l, sizeof(request) - l, OFF_T_PF "-" OFF_T_PF "%s",
data/zsync-0.6.2/libzsync/zsync.c:672:9:  [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.
    g = popen(cmd, "r");
data/zsync-0.6.2/make.c:508:21:  [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.
                p = popen(cmd, "r");
data/zsync-0.6.2/make.c:542:17:  [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(opts, o);
data/zsync-0.6.2/make.c:546:13:  [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(opts, noname);
data/zsync-0.6.2/make.c:630:17:  [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(PACKAGE " v" VERSION " (zsyncmake compiled " __DATE__ " "
data/zsync-0.6.2/make.c:687:17:  [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(newfname, tryfname);
data/zsync-0.6.2/make.c:800:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(outfname, "%s.zsync", fname);
data/zsync-0.6.2/make.c:858:38:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
        if (zmapentries && fname && !access(fname, R_OK)) {
data/zsync-0.6.2/url.c:117: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(newurl + l, url);
data/zsync-0.6.2/url.c:143: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(newurl + l, url);
data/zsync-0.6.2/zlib/zutil.h:184:18:  [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 !defined(vsnprintf) && !defined(NO_vsnprintf)
data/zsync-0.6.2/zlib/zutil.h:185: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.
#      define vsnprintf _vsnprintf
data/zsync-0.6.2/zlib/zutil.h:235:39:  [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.
#  define Trace(x) {if (z_verbose>=0) fprintf x ;}
data/zsync-0.6.2/zlib/zutil.h:236:39:  [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.
#  define Tracev(x) {if (z_verbose>0) fprintf x ;}
data/zsync-0.6.2/zlib/zutil.h:237:40:  [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.
#  define Tracevv(x) {if (z_verbose>1) fprintf x ;}
data/zsync-0.6.2/zlib/zutil.h:238:48:  [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.
#  define Tracec(c,x) {if (z_verbose>0 && (c)) fprintf x ;}
data/zsync-0.6.2/zlib/zutil.h:239:49:  [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.
#  define Tracecv(c,x) {if (z_verbose>1 && (c)) fprintf x ;}
data/zsync-0.6.2/client.c:459:5:  [3] (random) srand:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
    srand(getpid());
data/zsync-0.6.2/client.c:463:23:  [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 ((opt = getopt(argc, argv, "A:k:o:i:Vsqu:")) != -1) {
data/zsync-0.6.2/client.c:525:20:  [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 *pr = getenv("http_proxy");
data/zsync-0.6.2/make.c:588:23:  [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 ((opt = getopt(argc, argv, "b:Ceo:f:u:U:vVzZ")) != -1) {
data/zsync-0.6.2/client.c:56: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(cmd, "zcat ");
data/zsync-0.6.2/client.c:108:19:  [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(fname, "r");
data/zsync-0.6.2/client.c:176:9:  [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).
    f = fopen(p, "r");
data/zsync-0.6.2/client.c:540: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(temp_file, ".part");
data/zsync-0.6.2/client.c:645:9:  [2] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant string.
        strcat(oldfile_backup, ".zs-old");
data/zsync-0.6.2/getaddrinfo.c:109: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.
#define memcpy(d, s, n) bcopy((s), (d), (n))
data/zsync-0.6.2/getaddrinfo.c:109:25:  [2] (buffer) bcopy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
#define memcpy(d, s, n) bcopy((s), (d), (n))
data/zsync-0.6.2/getaddrinfo.c:363: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).
	    port = htons(atoi(servname));
data/zsync-0.6.2/getaddrinfo.c:474:2:  [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(&sa_in->sin_addr, *ap, sizeof(struct in_addr));
data/zsync-0.6.2/getaddrinfo.c:552:6:  [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(serv, "%d", ntohs(sa_in->sin_port));
data/zsync-0.6.2/http.c:92:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buf[256];
data/zsync-0.6.2/http.c:102: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).
    *code = atoi(++p);
data/zsync-0.6.2/http.c:114:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buf[1024];
data/zsync-0.6.2/http.c:263: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 ifrange[200] = { "" };
data/zsync-0.6.2/http.c:276:9:  [2] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant string.
        strcat(fname, ".part");
data/zsync-0.6.2/http.c:282: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 buf[50];
data/zsync-0.6.2/http.c:291: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 buf[50];
data/zsync-0.6.2/http.c:308: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 hostn[256];
data/zsync-0.6.2/http.c:333: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.
                char buf[1024];
data/zsync-0.6.2/http.c:382:29:  [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).
                g = fname ? fopen(fname, "w+") : tmpfile();
data/zsync-0.6.2/http.c:382:50:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
                g = fname ? fopen(fname, "w+") : tmpfile();
data/zsync-0.6.2/http.c:386:21:  [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).
                g = fopen(fname, "a+");
data/zsync-0.6.2/http.c:390:21:  [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).
                g = fopen(tfname, "r");
data/zsync-0.6.2/http.c:430: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 buf[512];
data/zsync-0.6.2/http.c:451: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.
                char buf[1024];
data/zsync-0.6.2/http.c:505: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 hosth[256];
data/zsync-0.6.2/http.c:521:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buf[4096];
data/zsync-0.6.2/http.c:544: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 hostn[sizeof(rf->hosth)];
data/zsync-0.6.2/http.c:650: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(buf, bufstart, len);
data/zsync-0.6.2/http.c:710: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(nr, &(rf->ranges_todo[2 * rf->rangesdone]),
data/zsync-0.6.2/http.c:721: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(&nr[2 * existing_ranges], ranges, 2 * sizeof(*ranges) * nranges);
data/zsync-0.6.2/http.c:737: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 request[2048];
data/zsync-0.6.2/http.c:824:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buf[512];
data/zsync-0.6.2/http.c:839: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).
        status = atoi(p + 1);
data/zsync-0.6.2/http.c:1051: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 buf[512];
data/zsync-0.6.2/http.c:1144:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(data, &(rf->buf[rf->buf_start]), rl);
data/zsync-0.6.2/librcksum/hash.c:44: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(e->checksum, checksum, z->checksum_bytes);
data/zsync-0.6.2/librcksum/internal.h:28:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char checksum[CHECKSUM_SIZE];
data/zsync-0.6.2/librcksum/md4.c:90:4:  [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(ctx->buffer + have, input, need);
data/zsync-0.6.2/librcksum/md4.c:107: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(ctx->buffer + have, input, len);
data/zsync-0.6.2/librcksum/md4.c:136:19:  [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.
MD4Final(unsigned char digest[MD4_DIGEST_LENGTH], MD4_CTX *ctx)
data/zsync-0.6.2/librcksum/md4test.c:24: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 correct_checksum[MD4_DIGEST_LENGTH] = {0xd7, 0x9e, 0x1c, 0x30, 0x8a, 0xa5, 0xbb, 0xcd, 0xee, 0xa8, 0xed, 0x63, 0xdf, 0x41, 0x2d, 0xa9 };
data/zsync-0.6.2/librcksum/rsum.c:143:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char md4sum[CHECKSUM_SIZE];
data/zsync-0.6.2/librcksum/rsum.c:181:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char md4sum[2][CHECKSUM_SIZE];
data/zsync-0.6.2/librcksum/rsum.c:455: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(buf, buf + (bufsize - z->context), z->context);
data/zsync-0.6.2/librcksum/state.c:74:17:  [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).
        z->fd = mkstemp(z->filename);
data/zsync-0.6.2/libzsync/sha1.c:73:8:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	(void)memcpy(block, buffer, SHA1_BLOCK_LENGTH);
data/zsync-0.6.2/libzsync/sha1.c:144: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.
		(void)memcpy(&context->buffer[j], data, (i = 64-j));
data/zsync-0.6.2/libzsync/sha1.c:152:8:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	(void)memcpy(&context->buffer[j], &data[i], len - i);
data/zsync-0.6.2/libzsync/sha1test.c:24: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 correct_checksum[SHA1_DIGEST_LENGTH] = {0xA9, 0x99, 0x3E, 0x36, 0x47, 0x06, 0x81, 0x6A, 0xBA, 0x3E, 0x25, 0x71, 0x78, 0x50, 0xC2, 0x6C, 0x9C, 0xD0, 0xD8, 0x9D};
data/zsync-0.6.2/libzsync/zsync.c:163:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char buf[1024];
data/zsync-0.6.2/libzsync/zsync.c:212:33:  [2] (integer) atol:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
                zs->blocksize = atol(p);
data/zsync-0.6.2/libzsync/zsync.c:234:28:  [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).
                nzblocks = atoi(p);
data/zsync-0.6.2/libzsync/zsync.c:339:18:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        unsigned char checksum[CHECKSUM_SIZE];
data/zsync-0.6.2/libzsync/zsync.c:604:18:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        unsigned char buf[4096];
data/zsync-0.6.2/libzsync/zsync.c:618:18:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        unsigned char digest[SHA1_DIGEST_LENGTH];
data/zsync-0.6.2/libzsync/zsync.c:653: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 cmd[1024];
data/zsync-0.6.2/libzsync/zsync.c:674: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 zoname[1024];
data/zsync-0.6.2/libzsync/zsync.c:677:16:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        zout = fopen(zoname, "w");
data/zsync-0.6.2/libzsync/zsync.c:691: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.
                char buf[1024];
data/zsync-0.6.2/libzsync/zsync.c:779:18:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        unsigned char wbuf[32768];
data/zsync-0.6.2/libzsync/zsync.c:868: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(zr->outbuf + offset % blocksize, buf, x);
data/zsync-0.6.2/libzsync/zsync.c:900: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(zr->outbuf, buf, len);
data/zsync-0.6.2/make.c:70:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char checksum[CHECKSUM_SIZE];
data/zsync-0.6.2/make.c:207:17:  [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(zhead + 2 * i, "%02x", (unsigned char)bufsofar[i]);
data/zsync-0.6.2/make.c:218: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(inbuf, p, got);
data/zsync-0.6.2/make.c:230:12:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
    zmap = tmpfile();
data/zsync-0.6.2/make.c:383:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char buf[4096];
data/zsync-0.6.2/make.c:404:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char buf[20];
data/zsync-0.6.2/make.c:462: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 orig[SAMPLE];
data/zsync-0.6.2/make.c:464:19:  [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 *s = fopen(f, "r");
data/zsync-0.6.2/make.c:500: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.
                char cmd[1024];
data/zsync-0.6.2/make.c:515: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.
                char samp[SAMPLE];
data/zsync-0.6.2/make.c:584:16:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
    FILE *tf = tmpfile();
data/zsync-0.6.2/make.c:611: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).
                blocksize = atoi(optarg);
data/zsync-0.6.2/make.c:646:24:  [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).
            instream = fopen(infname, "rb");
data/zsync-0.6.2/make.c:688:17:  [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(newfname, ".gz");
data/zsync-0.6.2/make.c:795:17:  [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(p, ".tar");
data/zsync-0.6.2/make.c:805:16:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        fout = fopen(outfname, "wb");
data/zsync-0.6.2/make.c:831: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 buf[32];
data/zsync-0.6.2/make.c:867:18:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        unsigned char digest[SHA1_DIGEST_LENGTH];
data/zsync-0.6.2/makegz.c:76:19:  [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 *ffout = fopen(fout, "wb+");
data/zsync-0.6.2/progress.c:35:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buf[21];
data/zsync-0.6.2/url.c:63: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(hostn, q, p - q);
data/zsync-0.6.2/url.c:75: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(*port, q + 1, l);
data/zsync-0.6.2/url.c:116: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(newurl, base, l);
data/zsync-0.6.2/url.c:142: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(newurl, base, l);
data/zsync-0.6.2/zlib/crc32.c:136: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).
        out = fopen("crc32.h", "w");
data/zsync-0.6.2/zlib/inflate.c:556:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char hbuf[4];      /* buffer for gzip header crc calculation */
data/zsync-0.6.2/zlib/inflate.c:1180:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char buf[4];       /* to restore bit buffer to byte string */
data/zsync-0.6.2/zlib/trees.c:332: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).
    FILE *header = fopen("trees.h", "w");
data/zsync-0.6.2/zlib/zutil.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 * const z_errmsg[10] = {
data/zsync-0.6.2/zlib/zutil.h:41:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
extern const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
data/zsync-0.6.2/zlib/zutil.h:99:6:  [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).
     fopen((name), (mode), "mbc=60", "ctx=stm", "rfm=fix", "mrs=512")
data/zsync-0.6.2/zlib/zutil.h:158:30:  [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).
#  define F_OPEN(name, mode) fopen((name), (mode))
data/zsync-0.6.2/zlib/zutil.h:219:21:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
#    define zmemcpy memcpy
data/zsync-0.6.2/base64.c:47:6:  [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(src);
data/zsync-0.6.2/client.c:52:28:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    char *cmd = malloc(6 + strlen(fname) * 2);
data/zsync-0.6.2/client.c:86: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).
    if (zsync_hint_decompress(z) && strlen(fname) > 3
data/zsync-0.6.2/client.c:87:28:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        && !strcmp(fname + strlen(fname) - 3, ".gz")) {
data/zsync-0.6.2/client.c:249: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 (t && !memcmp(p, t, strlen(t)))
data/zsync-0.6.2/client.c:538: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).
    temp_file = malloc(strlen(filename) + 6);
data/zsync-0.6.2/client.c:641: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).
        char *oldfile_backup = malloc(strlen(filename) + 8);
data/zsync-0.6.2/getaddrinfo.c:484:42:  [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).
	head_res->ai_canonname = (char *)malloc(strlen(canonname) + 1);
data/zsync-0.6.2/getaddrinfo.c:542:21:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	    if (servlen <= strlen(servent->s_name)) {
data/zsync-0.6.2/getaddrinfo.c:564:21:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	    if (nodelen <= strlen(hostent->h_name)) {
data/zsync-0.6.2/getaddrinfo.c:575:21:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	    if (nodelen <= strlen(ntoa_address)) {
data/zsync-0.6.2/http.c:164: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).
    if (!memcmp(s, http_scheme, strlen(http_scheme))) {
data/zsync-0.6.2/http.c:223: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).
            size_t l = strlen(u) + strlen(p) + 2;
data/zsync-0.6.2/http.c:223: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).
            size_t l = strlen(u) + strlen(p) + 2;
data/zsync-0.6.2/http.c:229:17:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            l = strlen(b) + strlen(auth_header_tmpl) + 1;
data/zsync-0.6.2/http.c:229: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).
            l = strlen(b) + strlen(auth_header_tmpl) + 1;
data/zsync-0.6.2/http.c:274: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).
        fname = malloc(strlen(tfname) + 6);
data/zsync-0.6.2/http.c:342: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 (send(sfd, buf, strlen(buf), 0) == -1) {
data/zsync-0.6.2/http.c:603:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            n = read(rf->sd, &(rf->buf[rf->buf_end]),
data/zsync-0.6.2/http.c:767: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).
        l = strlen(request);
data/zsync-0.6.2/http.c:783: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).
    l = strlen(request);
data/zsync-0.6.2/http.c:792: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).
        size_t len = strlen(request);
data/zsync-0.6.2/http.c:933: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).
                q = rf->boundary + strlen(rf->boundary) - 1;
data/zsync-0.6.2/http.c:1062: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 (memcmp(&buf[2], rf->boundary, strlen(rf->boundary))) {
data/zsync-0.6.2/http.c:1069: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).
            if (buf[2 + strlen(rf->boundary)] == '-') {
data/zsync-0.6.2/libzsync/zmap.h:55: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).
        q += strlen(q)+1;
data/zsync-0.6.2/libzsync/zsync.c:170:17:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            l = strlen(buf) - 1;
data/zsync-0.6.2/libzsync/zsync.c:254:21:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                if (strlen(p) != SHA1_DIGEST_LENGTH * 2) {
data/zsync-0.6.2/libzsync/zsync.c:271:42:  [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).
                        q = zs->gzhead + strlen(zs->gzhead);
data/zsync-0.6.2/libzsync/zsync.c:608:26:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        while (0 < (rc = read(fh, buf, sizeof buf))) {
data/zsync-0.6.2/libzsync/zsync.c:658: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 j = strlen(cmd);
data/zsync-0.6.2/make.c:437:28:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    char *cmd = malloc(2 + strlen(fname) * 2);
data/zsync-0.6.2/make.c:540: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).
            char* opts = malloc(strlen(o)+strlen(noname)+2);
data/zsync-0.6.2/make.c:540:43:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            char* opts = malloc(strlen(o)+strlen(noname)+2);
data/zsync-0.6.2/make.c:543:17:  [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(opts, " ");
data/zsync-0.6.2/make.c:684: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).
                newfname = malloc(strlen(tryfname) + 4);
data/zsync-0.6.2/make.c:799: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).
        outfname = malloc(strlen(fname) + 10);
data/zsync-0.6.2/url.c:43: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).
    if (memcmp(url, http_scheme, strlen(http_scheme)))
data/zsync-0.6.2/url.c:46: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).
    q = url + strlen(http_scheme);
data/zsync-0.6.2/url.c:71:40:  [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 = p ? (size_t) (p - q - 1) : strlen(q) - 1;
data/zsync-0.6.2/url.c:106:17:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            l = strlen(base);
data/zsync-0.6.2/url.c:115: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).
        newurl = malloc(l + strlen(url) + 1);
data/zsync-0.6.2/url.c:132: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).
            p = base + strlen(base);
data/zsync-0.6.2/url.c:141: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).
        newurl = malloc(l + strlen(url) + 1);

ANALYSIS SUMMARY:

Hits = 176
Lines analyzed = 15677 in approximately 0.55 seconds (28634 lines/second)
Physical Source Lines of Code (SLOC) = 9536
Hits@level = [0] 162 [1]  44 [2]  96 [3]   4 [4]  32 [5]   0
Hits@level+ = [0+] 338 [1+] 176 [2+] 132 [3+]  36 [4+]  32 [5+]   0
Hits/KSLOC@level+ = [0+] 35.4446 [1+] 18.4564 [2+] 13.8423 [3+] 3.77517 [4+] 3.3557 [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.