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/memcached-1.6.9+dfsg/assoc.c
Examining data/memcached-1.6.9+dfsg/crc32c.h
Examining data/memcached-1.6.9+dfsg/openbsd_priv.c
Examining data/memcached-1.6.9+dfsg/stats_prefix.c
Examining data/memcached-1.6.9+dfsg/protocol_binary.h
Examining data/memcached-1.6.9+dfsg/itoa_ljust.h
Examining data/memcached-1.6.9+dfsg/items.c
Examining data/memcached-1.6.9+dfsg/hash.c
Examining data/memcached-1.6.9+dfsg/murmur3_hash.c
Examining data/memcached-1.6.9+dfsg/tls.h
Examining data/memcached-1.6.9+dfsg/sizes.c
Examining data/memcached-1.6.9+dfsg/storage.h
Examining data/memcached-1.6.9+dfsg/items.h
Examining data/memcached-1.6.9+dfsg/testapp.c
Examining data/memcached-1.6.9+dfsg/logger.h
Examining data/memcached-1.6.9+dfsg/authfile.c
Examining data/memcached-1.6.9+dfsg/restart.h
Examining data/memcached-1.6.9+dfsg/storage.c
Examining data/memcached-1.6.9+dfsg/cache.h
Examining data/memcached-1.6.9+dfsg/slabs.h
Examining data/memcached-1.6.9+dfsg/proto_bin.c
Examining data/memcached-1.6.9+dfsg/util.h
Examining data/memcached-1.6.9+dfsg/memcached.c
Examining data/memcached-1.6.9+dfsg/crc32c.c
Examining data/memcached-1.6.9+dfsg/proto_text.c
Examining data/memcached-1.6.9+dfsg/authfile.h
Examining data/memcached-1.6.9+dfsg/murmur3_hash.h
Examining data/memcached-1.6.9+dfsg/daemon.c
Examining data/memcached-1.6.9+dfsg/logger.c
Examining data/memcached-1.6.9+dfsg/freebsd_priv.c
Examining data/memcached-1.6.9+dfsg/jenkins_hash.h
Examining data/memcached-1.6.9+dfsg/slab_automove.c
Examining data/memcached-1.6.9+dfsg/timedrun.c
Examining data/memcached-1.6.9+dfsg/slab_automove.h
Examining data/memcached-1.6.9+dfsg/slabs.c
Examining data/memcached-1.6.9+dfsg/solaris_priv.c
Examining data/memcached-1.6.9+dfsg/assoc.h
Examining data/memcached-1.6.9+dfsg/trace.h
Examining data/memcached-1.6.9+dfsg/proto_text.h
Examining data/memcached-1.6.9+dfsg/extstore.c
Examining data/memcached-1.6.9+dfsg/crawler.c
Examining data/memcached-1.6.9+dfsg/thread.c
Examining data/memcached-1.6.9+dfsg/restart.c
Examining data/memcached-1.6.9+dfsg/hash.h
Examining data/memcached-1.6.9+dfsg/tls.c
Examining data/memcached-1.6.9+dfsg/cache.c
Examining data/memcached-1.6.9+dfsg/memcached.h
Examining data/memcached-1.6.9+dfsg/bipbuffer.c
Examining data/memcached-1.6.9+dfsg/util.c
Examining data/memcached-1.6.9+dfsg/itoa_ljust.c
Examining data/memcached-1.6.9+dfsg/crawler.h
Examining data/memcached-1.6.9+dfsg/slab_automove_extstore.h
Examining data/memcached-1.6.9+dfsg/stats_prefix.h
Examining data/memcached-1.6.9+dfsg/slab_automove_extstore.c
Examining data/memcached-1.6.9+dfsg/proto_bin.h
Examining data/memcached-1.6.9+dfsg/bipbuffer.h
Examining data/memcached-1.6.9+dfsg/linux_priv.c
Examining data/memcached-1.6.9+dfsg/sasl_defs.h
Examining data/memcached-1.6.9+dfsg/extstore.h
Examining data/memcached-1.6.9+dfsg/sasl_defs.c
Examining data/memcached-1.6.9+dfsg/jenkins_hash.c

FINAL RESULTS:

data/memcached-1.6.9+dfsg/extstore.c:25:9:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
        fprintf(stderr, __VA_ARGS__); \
data/memcached-1.6.9+dfsg/linux_priv.c:52: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(kill_msg, KILL_MSG_STR);
data/memcached-1.6.9+dfsg/linux_priv.c:102:62:  [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.
        rc |= seccomp_rule_add(ctx, SCMP_ACT_ALLOW, SCMP_SYS(access), 0);
data/memcached-1.6.9+dfsg/linux_priv.c:174:62:  [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.
        rc |= seccomp_rule_add(ctx, SCMP_ACT_ALLOW, SCMP_SYS(access), 0);
data/memcached-1.6.9+dfsg/logger.c:21:9:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
        fprintf(stderr, __VA_ARGS__); \
data/memcached-1.6.9+dfsg/logger.c:729:21:  [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.
            total = vsnprintf((char *) e->data, reqlen, d->format, ap);
data/memcached-1.6.9+dfsg/memcached.c:1659:12:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
    vlen = vsnprintf(val_str, sizeof(val_str) - 1, fmt, ap);
data/memcached-1.6.9+dfsg/memcached.c:1810:41:  [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.
    APPEND_STAT("umask", "%o", settings.access);
data/memcached-1.6.9+dfsg/memcached.c:1992:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(addr, "%s:%s:%u", protoname, addr_text, port);
data/memcached-1.6.9+dfsg/memcached.c:1994:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(addr, "%s:%s", protoname, addr_text);
data/memcached-1.6.9+dfsg/memcached.c:3772:5:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    printf(PACKAGE " " VERSION "\n");
data/memcached-1.6.9+dfsg/memcached.c:3779:22:  [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.
            settings.access);
data/memcached-1.6.9+dfsg/memcached.c:3944:5:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    printf(PACKAGE " " VERSION "\n\n");
data/memcached-1.6.9+dfsg/memcached.c:4016:9:  [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(pid_file, F_OK) == 0) {
data/memcached-1.6.9+dfsg/memcached.c:4805:13:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
            printf(PACKAGE " " VERSION "\n");
data/memcached-1.6.9+dfsg/memcached.c:5808:61:  [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 (server_socket_unix(settings.socketpath,settings.access)) {
data/memcached-1.6.9+dfsg/memcached.h:152:12:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
    klen = snprintf(key_str, STAT_KEY_LEN, name_fmt, num, name);    \
data/memcached-1.6.9+dfsg/memcached.h:153:12:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
    vlen = snprintf(val_str, STAT_VAL_LEN, fmt, val);               \
data/memcached-1.6.9+dfsg/memcached.h:415:9:  [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.
    int access;  /* access mask (a la chmod) for unix domain socket */
data/memcached-1.6.9+dfsg/proto_text.c:2059:9:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
    i = system("sleep 0");
data/memcached-1.6.9+dfsg/restart.c:274:16:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
    int vlen = vsnprintf(valbuf, SET_VAL_MAX-1, fmt, ap);
data/memcached-1.6.9+dfsg/sasl_defs.c:110:17:  [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(locations[i], F_OK) == 0) {
data/memcached-1.6.9+dfsg/sasl_defs.c:117:17:  [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(locations_file_path[i], F_OK) == 0) {
data/memcached-1.6.9+dfsg/sasl_defs.c:120:24:  [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.
            } else if (access(locations[i], F_OK) == 0) {
data/memcached-1.6.9+dfsg/stats_prefix.c:153:23:  [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.
            written = snprintf(buf + pos, size-pos, format,
data/memcached-1.6.9+dfsg/testapp.c:564:5:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
    system(coreadm);
data/memcached-1.6.9+dfsg/testapp.c:619:16:  [4] (shell) execv:
  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.
        assert(execv(argv[0], argv) != -1);
data/memcached-1.6.9+dfsg/testapp.c:625:12:  [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.
    while (access(filename, F_OK) == -1 && wait_timeout > 0) {
data/memcached-1.6.9+dfsg/testapp.c:630:9:  [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) == -1) {
data/memcached-1.6.9+dfsg/testapp.c:659:16:  [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.
        while (access(pid_file, F_OK) == -1) {
data/memcached-1.6.9+dfsg/timedrun.c:84:9:  [4] (shell) execvp:
  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.
        execvp(argv[0], argv);
data/memcached-1.6.9+dfsg/util.c:229:9:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
    if (vsnprintf(buf, sizeof(buf), fmt, ap) == -1) {
data/memcached-1.6.9+dfsg/util.h:43:33:  [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.
    __gcc_attribute__ ((format (printf, 1, 2)));
data/memcached-1.6.9+dfsg/assoc.c:269:17:  [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 *env = getenv("MEMCACHED_HASH_BULK_MOVE");
data/memcached-1.6.9+dfsg/memcached.c:4741:23:  [3] (buffer) getopt_long:
  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 (-1 != (c = getopt_long(argc, argv, shortopts,
data/memcached-1.6.9+dfsg/memcached.c:4744: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 (-1 != (c = getopt(argc, argv, shortopts))) {
data/memcached-1.6.9+dfsg/memcached.c:5816:43:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
        const char *portnumber_filename = getenv("MEMCACHED_PORT_FILENAME");
data/memcached-1.6.9+dfsg/sasl_defs.c:105:13:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    *path = getenv("SASL_CONF_PATH");
data/memcached-1.6.9+dfsg/sasl_defs.c:195:27:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    memcached_sasl_pwdb = getenv("MEMCACHED_SASL_PWDB");
data/memcached-1.6.9+dfsg/slabs.c:281:34:  [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 *t_initial_malloc = getenv("T_MEMD_INITIAL_MALLOC");
data/memcached-1.6.9+dfsg/testapp.c:2202: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((int)time(NULL));
data/memcached-1.6.9+dfsg/testapp.c:2225:9:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    if (getenv("SKIP_TEST_101") != NULL) {
data/memcached-1.6.9+dfsg/testapp.c:2385:9:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    if (getenv("SSL_TEST") != NULL) {
data/memcached-1.6.9+dfsg/assoc.c:271:26:  [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).
        hash_bulk_move = atoi(env);
data/memcached-1.6.9+dfsg/authfile.c:36: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 *pwfile = fopen(file, "r");
data/memcached-1.6.9+dfsg/authfile.c:98: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(main_auth_entries, auth_entries, sizeof(auth_entries));
data/memcached-1.6.9+dfsg/bipbuffer.c:117: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(me->data + me->b_end, data, size);
data/memcached-1.6.9+dfsg/bipbuffer.c:122: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(me->data + me->a_end, data, size);
data/memcached-1.6.9+dfsg/cache.c:113: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(((char*)ret) + cache->bufsize - (2 * sizeof(redzone_pattern)),
data/memcached-1.6.9+dfsg/crawler.c:240: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 keybuf[KEY_MAX_URI_ENCODED_LENGTH];
data/memcached-1.6.9+dfsg/crawler.c:272: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(cm->c.cbuf, "END\r\n", 5);
data/memcached-1.6.9+dfsg/crawler.c:294: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[1];
data/memcached-1.6.9+dfsg/daemon.c:67:31:  [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 (noclose == 0 && (fd = open("/dev/null", O_RDWR, 0)) != -1) {
data/memcached-1.6.9+dfsg/extstore.c:161: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(st, &e->stats, sizeof(struct extstore_stats));
data/memcached-1.6.9+dfsg/extstore.c:184: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(st->page_data, e->stats.page_data,
data/memcached-1.6.9+dfsg/extstore.c:256:17:  [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).
        f->fd = open(f->file, O_RDWR | O_CREAT, 0644);
data/memcached-1.6.9+dfsg/extstore.c:716: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(io->buf, wbuf->buf + (io->offset - wbuf->offset), io->len);
data/memcached-1.6.9+dfsg/extstore.c:723: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(iov->iov_base, wbuf->buf + off, iov->iov_len);
data/memcached-1.6.9+dfsg/extstore.c:980: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->stats.page_data, pd,
data/memcached-1.6.9+dfsg/items.c:251: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 suffix[40];
data/memcached-1.6.9+dfsg/items.c:326: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(ITEM_key(it), key, nkey);
data/memcached-1.6.9+dfsg/items.c:329: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(ITEM_suffix(it), &flags, sizeof(flags));
data/memcached-1.6.9+dfsg/items.c:367: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 prefix[40];
data/memcached-1.6.9+dfsg/items.c:600: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 key_temp[KEY_MAX_LENGTH + 1];
data/memcached-1.6.9+dfsg/items.c:601: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[512];
data/memcached-1.6.9+dfsg/items.c:630: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(buffer + bufcurr, temp, len);
data/memcached-1.6.9+dfsg/items.c:636: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(buffer + bufcurr, "END\r\n", 6);
data/memcached-1.6.9+dfsg/items.c:743: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 key_str[STAT_KEY_LEN];
data/memcached-1.6.9+dfsg/items.c:744: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 val_str[STAT_VAL_LEN];
data/memcached-1.6.9+dfsg/items.c:941: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 key[12];
data/memcached-1.6.9+dfsg/itoa_ljust.c:64: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.
static const char lut[201] =
data/memcached-1.6.9+dfsg/itoa_ljust.c:74:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(p, &((uint16_t *)lut)[d], 2);
data/memcached-1.6.9+dfsg/itoa_ljust.c:79:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(p, &in, 1);
data/memcached-1.6.9+dfsg/linux_priv.c:91:58:  [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).
    rc |= seccomp_rule_add(ctx, SCMP_ACT_ALLOW, SCMP_SYS(open), 0);
data/memcached-1.6.9+dfsg/linux_priv.c:175:62:  [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).
        rc |= seccomp_rule_add(ctx, SCMP_ACT_ALLOW, SCMP_SYS(open), 0);
data/memcached-1.6.9+dfsg/logger.c:189: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 keybuf[KEY_MAX_URI_ENCODED_LENGTH];
data/memcached-1.6.9+dfsg/logger.c:210: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 keybuf[KEY_MAX_URI_ENCODED_LENGTH];
data/memcached-1.6.9+dfsg/logger.c:224: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 keybuf[KEY_MAX_URI_ENCODED_LENGTH];
data/memcached-1.6.9+dfsg/logger.c:238: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 keybuf[KEY_MAX_URI_ENCODED_LENGTH];
data/memcached-1.6.9+dfsg/logger.c:356: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 scratch[LOGGER_PARSE_SCRATCH];
data/memcached-1.6.9+dfsg/logger.c:458: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[1];
data/memcached-1.6.9+dfsg/logger.c:639: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(le->key, ITEM_key(it), it->nkey);
data/memcached-1.6.9+dfsg/logger.c:655: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(le->key, ITEM_key(it), it->nkey);
data/memcached-1.6.9+dfsg/logger.c:670: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(le->key, key, nkey);
data/memcached-1.6.9+dfsg/logger.c:687: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(le->key, key, nkey);
data/memcached-1.6.9+dfsg/memcached.c:308: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[TIMEOUT_MSG_SIZE];
data/memcached-1.6.9+dfsg/memcached.c:345: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(&buf[1], &i, sizeof(int));
data/memcached-1.6.9+dfsg/memcached.c:449: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(tmp, c->rcurr, c->rbytes);
data/memcached-1.6.9+dfsg/memcached.c:1198: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(resp->wbuf, str, len);
data/memcached-1.6.9+dfsg/memcached.c:1199: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(resp->wbuf + len, "\r\n", 2);
data/memcached-1.6.9+dfsg/memcached.c:1246: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(buf, header.bytes, sizeof(header.response));
data/memcached-1.6.9+dfsg/memcached.c:1250: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(buf, key, klen);
data/memcached-1.6.9+dfsg/memcached.c:1254: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, val, vlen);
data/memcached-1.6.9+dfsg/memcached.c:1397: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(dch->data + dch->used, sch->data + copied, todo);
data/memcached-1.6.9+dfsg/memcached.c:1425: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(dch->data + dch->used, ITEM_data(s_it) + done, todo);
data/memcached-1.6.9+dfsg/memcached.c:1451: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(ITEM_data(new_it), ITEM_data(old_it), old_it->nbytes);
data/memcached-1.6.9+dfsg/memcached.c:1452: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(ITEM_data(new_it) + old_it->nbytes - 2 /* CRLF */, ITEM_data(add_it), add_it->nbytes);
data/memcached-1.6.9+dfsg/memcached.c:1462: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(ITEM_data(new_it), ITEM_data(add_it), add_it->nbytes);
data/memcached-1.6.9+dfsg/memcached.c:1463: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(ITEM_data(new_it) + add_it->nbytes - 2 /* CRLF */, ITEM_data(old_it), old_it->nbytes);
data/memcached-1.6.9+dfsg/memcached.c:1649: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 val_str[STAT_VAL_LEN];
data/memcached-1.6.9+dfsg/memcached.c:1924: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 addr_text[MAXPATHLEN];
data/memcached-1.6.9+dfsg/memcached.c:1988:9:  [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(addr_text, "<AF %d>", af);
data/memcached-1.6.9+dfsg/memcached.c:2000:9:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
        strcpy(addr, "<null>");
data/memcached-1.6.9+dfsg/memcached.c:2002:9:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
        strcpy(addr, "<closed>");
data/memcached-1.6.9+dfsg/memcached.c:2033: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 key_str[STAT_KEY_LEN];
data/memcached-1.6.9+dfsg/memcached.c:2034: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 val_str[STAT_VAL_LEN];
data/memcached-1.6.9+dfsg/memcached.c:2036: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 addr[MAXPATHLEN + extras_len];
data/memcached-1.6.9+dfsg/memcached.c:2037: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 svr_addr[MAXPATHLEN + extras_len];
data/memcached-1.6.9+dfsg/memcached.c:2188: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(ITEM_data(it), buf, res);
data/memcached-1.6.9+dfsg/memcached.c:2200: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(ITEM_data(new_it), buf, res);
data/memcached-1.6.9+dfsg/memcached.c:2201: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(ITEM_data(new_it) + res, "\r\n", 2);
data/memcached-1.6.9+dfsg/memcached.c:2490: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(&iovs[iovused], resp->iov, sizeof(struct iovec)*resp->iovcnt);
data/memcached-1.6.9+dfsg/memcached.c:2669: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 udp_hdr[UDP_HEADER_SIZE];
data/memcached-1.6.9+dfsg/memcached.c:3372: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 port_buf[NI_MAXSERV];
data/memcached-1.6.9+dfsg/memcached.c:4017: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).
        if ((fp = fopen(pid_file, "r")) != NULL) {
data/memcached-1.6.9+dfsg/memcached.c:4018: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 buffer[1024];
data/memcached-1.6.9+dfsg/memcached.c:4034: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_pid_file[1024];
data/memcached-1.6.9+dfsg/memcached.c:4037: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 ((fp = fopen(tmp_pid_file, "w")) == NULL) {
data/memcached-1.6.9+dfsg/memcached.c:4770:32:  [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).
            settings.udpport = atoi(optarg);
data/memcached-1.6.9+dfsg/memcached.c:4774: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).
            settings.port = atoi(optarg);
data/memcached-1.6.9+dfsg/memcached.c:4786:42:  [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).
            settings.maxbytes = ((size_t)atoi(optarg)) * 1024 * 1024;
data/memcached-1.6.9+dfsg/memcached.c:4792:33:  [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).
            settings.maxconns = atoi(optarg);
data/memcached-1.6.9+dfsg/memcached.c:4838:39:  [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).
            settings.reqs_per_event = atoi(optarg);
data/memcached-1.6.9+dfsg/memcached.c:4862:35:  [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).
            settings.chunk_size = atoi(optarg);
data/memcached-1.6.9+dfsg/memcached.c:4869:36:  [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).
            settings.num_threads = atoi(optarg);
data/memcached-1.6.9+dfsg/memcached.c:4906:32:  [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).
            settings.backlog = atoi(optarg);
data/memcached-1.6.9+dfsg/memcached.c:4928: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).
                size_max = atoi(buf);
data/memcached-1.6.9+dfsg/memcached.c:4935:42:  [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).
                settings.item_size_max = atoi(buf);
data/memcached-1.6.9+dfsg/memcached.c:4960:37:  [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).
            settings.num_napi_ids = atoi(optarg);
data/memcached-1.6.9+dfsg/memcached.c:4985:43:  [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).
                settings.hashpower_init = atoi(subopts_value);
data/memcached-1.6.9+dfsg/memcached.c:5008:42:  [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).
                settings.slab_automove = atoi(subopts_value);
data/memcached-1.6.9+dfsg/memcached.c:5030:49:  [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).
                settings.slab_automove_window = atoi(subopts_value);
data/memcached-1.6.9+dfsg/memcached.c:5041:45:  [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).
                settings.tail_repair_time = atoi(subopts_value);
data/memcached-1.6.9+dfsg/memcached.c:5069:46:  [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).
                settings.lru_crawler_sleep = atoi(subopts_value);
data/memcached-1.6.9+dfsg/memcached.c:5095:40:  [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).
                settings.hot_lru_pct = atoi(subopts_value);
data/memcached-1.6.9+dfsg/memcached.c:5106:41:  [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).
                settings.warm_lru_pct = atoi(subopts_value);
data/memcached-1.6.9+dfsg/memcached.c:5140:42:  [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).
                settings.temporary_ttl = atoi(subopts_value);
data/memcached-1.6.9+dfsg/memcached.c:5147:41:  [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).
                settings.idle_timeout = atoi(subopts_value);
data/memcached-1.6.9+dfsg/memcached.c:5828:31:  [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).
            portnumber_file = fopen(temp_portnumber_filename, "a");
data/memcached-1.6.9+dfsg/memcached.h:668: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 wbuf[WRITE_BUFFER_SIZE];
data/memcached-1.6.9+dfsg/memcached.h:716: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 data[120];
data/memcached-1.6.9+dfsg/proto_bin.c:113: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 extbuf[sizeof(c->binary_header) + BIN_MAX_EXTLEN+1];
data/memcached-1.6.9+dfsg/proto_bin.c:114: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(extbuf + sizeof(c->binary_header), c->rcurr + sizeof(c->binary_header),
data/memcached-1.6.9+dfsg/proto_bin.c:262: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 tmpbuf[INCR_MAX_STORAGE_LEN];
data/memcached-1.6.9+dfsg/proto_bin.c:323: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(ITEM_data(it), tmpbuf, res);
data/memcached-1.6.9+dfsg/proto_bin.c:324: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(ITEM_data(it) + res, "\r\n", 2);
data/memcached-1.6.9+dfsg/proto_bin.c:443: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(ofs, key, nkey);
data/memcached-1.6.9+dfsg/proto_bin.c:781: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 mech[nkey+1];
data/memcached-1.6.9+dfsg/proto_bin.c:782: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(mech, ITEM_key((item*)c->item), nkey);
data/memcached-1.6.9+dfsg/proto_text.c:44: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[2];
data/memcached-1.6.9+dfsg/proto_text.c:113:15:  [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(resp->wbuf, "OK ", 3);
data/memcached-1.6.9+dfsg/proto_text.c:120:15:  [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(resp->wbuf, "EX ", 3);
data/memcached-1.6.9+dfsg/proto_text.c:123:15:  [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(resp->wbuf, "NF ", 3);
data/memcached-1.6.9+dfsg/proto_text.c:126:15:  [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(resp->wbuf, "NS ", 3);
data/memcached-1.6.9+dfsg/proto_text.c:515:19:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                  memcpy(p, "VALUE ", 6);
data/memcached-1.6.9+dfsg/proto_text.c:517:19:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                  memcpy(p, ITEM_key(it), it->nkey);
data/memcached-1.6.9+dfsg/proto_text.c:768: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(resp->wbuf, "ME ", 3);
data/memcached-1.6.9+dfsg/proto_text.c:770: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(resp->wbuf + total, ITEM_key(it), it->nkey);
data/memcached-1.6.9+dfsg/proto_text.c:1039: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(ITEM_data(it), "\r\n", 2);
data/memcached-1.6.9+dfsg/proto_text.c:1050: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(p, "VA ", 3);
data/memcached-1.6.9+dfsg/proto_text.c:1053: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(p, "OK", 2);
data/memcached-1.6.9+dfsg/proto_text.c:1127: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.
                    memcpy(p, tokens[i].value, tokens[i].length);
data/memcached-1.6.9+dfsg/proto_text.c:1132: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.
                    memcpy(p, ITEM_key(it), it->nkey);
data/memcached-1.6.9+dfsg/proto_text.c:1319: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(p, tokens[i].value, tokens[i].length);
data/memcached-1.6.9+dfsg/proto_text.c:1324: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(p, key, nkey);
data/memcached-1.6.9+dfsg/proto_text.c:1415: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(resp->wbuf + resp->wbytes, "\r\n", 2);
data/memcached-1.6.9+dfsg/proto_text.c:1480: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(p, tokens[i].value, tokens[i].length);
data/memcached-1.6.9+dfsg/proto_text.c:1485: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(p, key, nkey);
data/memcached-1.6.9+dfsg/proto_text.c:1501: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(resp->wbuf, "EX ", 3);
data/memcached-1.6.9+dfsg/proto_text.c:1521: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(resp->wbuf, "OK ", 3);
data/memcached-1.6.9+dfsg/proto_text.c:1531: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(resp->wbuf, "OK ", 3);
data/memcached-1.6.9+dfsg/proto_text.c:1539: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(resp->wbuf, "NF ", 3);
data/memcached-1.6.9+dfsg/proto_text.c:1549: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(resp->wbuf + resp->wbytes, "\r\n", 2);
data/memcached-1.6.9+dfsg/proto_text.c:1624: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 tmpbuf[INCR_MAX_STORAGE_LEN];
data/memcached-1.6.9+dfsg/proto_text.c:1633: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(resp->wbuf, "OK ", 3);
data/memcached-1.6.9+dfsg/proto_text.c:1650: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(ITEM_data(it), tmpbuf, vlen);
data/memcached-1.6.9+dfsg/proto_text.c:1651: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(ITEM_data(it) + vlen, "\r\n", 2);
data/memcached-1.6.9+dfsg/proto_text.c:1656: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.
                    memcpy(resp->wbuf, "NS ", 3);
data/memcached-1.6.9+dfsg/proto_text.c:1671: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(p, "NF ", 3);
data/memcached-1.6.9+dfsg/proto_text.c:1677:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(p, "EX ", 3);
data/memcached-1.6.9+dfsg/proto_text.c:1688: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(p, "VA ", 3);
data/memcached-1.6.9+dfsg/proto_text.c:1691: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(p, "OK", 2);
data/memcached-1.6.9+dfsg/proto_text.c:1726: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.
                    memcpy(p, tokens[i].value, tokens[i].length);
data/memcached-1.6.9+dfsg/proto_text.c:1731: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.
                    memcpy(p, key, nkey);
data/memcached-1.6.9+dfsg/proto_text.c:1741: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(p, tmpbuf, vlen);
data/memcached-1.6.9+dfsg/proto_text.c:1757: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.
                    memcpy(p, tokens[i].value, tokens[i].length);
data/memcached-1.6.9+dfsg/proto_text.c:1762: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.
                    memcpy(p, key, nkey);
data/memcached-1.6.9+dfsg/proto_text.c:1772: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(resp->wbuf + resp->wbytes, "\r\n", 2);
data/memcached-1.6.9+dfsg/proto_text.c:1927: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[INCR_MAX_STORAGE_LEN];
data/memcached-1.6.9+dfsg/restart.c:20:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char tag[RESTART_TAG_MAXLEN];
data/memcached-1.6.9+dfsg/restart.c:82: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(metafile, file, flen);
data/memcached-1.6.9+dfsg/restart.c:83: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(metafile+flen, ext, strlen(ext));
data/memcached-1.6.9+dfsg/restart.c:85: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).
    FILE *f = fopen(metafile, "r");
data/memcached-1.6.9+dfsg/restart.c:228: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(metafile, file, flen);
data/memcached-1.6.9+dfsg/restart.c:229: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(metafile+flen, ext, extlen);
data/memcached-1.6.9+dfsg/restart.c:234: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).
    FILE *f = fopen(metafile, "w");
data/memcached-1.6.9+dfsg/restart.c:271: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 valbuf[SET_VAL_MAX];
data/memcached-1.6.9+dfsg/restart.c:303:15:  [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).
    mmap_fd = open(file, O_RDWR|O_CREAT, S_IRWXU);
data/memcached-1.6.9+dfsg/sasl_defs.c:8:1:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
char my_sasl_hostname[1025];
data/memcached-1.6.9+dfsg/sasl_defs.c:62: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 *pwfile = fopen(memcached_sasl_pwdb, "r");
data/memcached-1.6.9+dfsg/sasl_defs.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 buffer[MAX_ENTRY_LEN];
data/memcached-1.6.9+dfsg/sasl_defs.h:12:8:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
extern char my_sasl_hostname[1025];
data/memcached-1.6.9+dfsg/slab_automove.c:154: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(a->iam_before, a->iam_after,
data/memcached-1.6.9+dfsg/slab_automove.c:156: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(a->sam_before, a->sam_after,
data/memcached-1.6.9+dfsg/slab_automove_extstore.c:263: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(a->iam_before, a->iam_after,
data/memcached-1.6.9+dfsg/slab_automove_extstore.c:265: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(a->sam_before, a->sam_after,
data/memcached-1.6.9+dfsg/slabs.c:117: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).
    fp = fopen("/proc/meminfo", "r");
data/memcached-1.6.9+dfsg/slabs.c:119: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[64];
data/memcached-1.6.9+dfsg/slabs.c:570: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 key_str[STAT_KEY_LEN];
data/memcached-1.6.9+dfsg/slabs.c:571: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 val_str[STAT_VAL_LEN];
data/memcached-1.6.9+dfsg/slabs.c:809: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(ITEM_key(new_it), "deadbeef", 8);
data/memcached-1.6.9+dfsg/slabs.c:1000:25:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                        memcpy(new_it, it, ntotal);
data/memcached-1.6.9+dfsg/slabs.c:1020:25:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                        memcpy(ITEM_key(it), "deadbeef", 8);
data/memcached-1.6.9+dfsg/slabs.c:1029:25:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                        memcpy(nch, ch, ch->used + sizeof(item_chunk));
data/memcached-1.6.9+dfsg/slabs.c:1034:25:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                        memcpy(ITEM_key((item *)ch), "deadbeef", 8);
data/memcached-1.6.9+dfsg/slabs.c:1048:25:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                        memcpy(ITEM_key(it), "deadbeef", 8);
data/memcached-1.6.9+dfsg/slabs.c:1072: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(ITEM_key(it), "deadbeef", 8);
data/memcached-1.6.9+dfsg/stats_prefix.c:163: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(buf + pos, "END\r\n", 6);
data/memcached-1.6.9+dfsg/storage.c:64: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 key_str[STAT_KEY_LEN];
data/memcached-1.6.9+dfsg/storage.c:65: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 val_str[STAT_VAL_LEN];
data/memcached-1.6.9+dfsg/storage.c:519: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.
                    memcpy((char *)io.buf+STORE_OFFSET, (char *)it+STORE_OFFSET, hdrtotal - STORE_OFFSET);
data/memcached-1.6.9+dfsg/storage.c:524:25:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                        memcpy((char *)io.buf+copied, sch->data, sch->used);
data/memcached-1.6.9+dfsg/storage.c:531: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.
                    memcpy((char *)io.buf+STORE_OFFSET, (char *)it+STORE_OFFSET, io.len-STORE_OFFSET);
data/memcached-1.6.9+dfsg/storage.c:821:25:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                        memcpy(io.buf, it, io.len);
data/memcached-1.6.9+dfsg/storage.c:1057:17:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
    base_size = atoi(p);
data/memcached-1.6.9+dfsg/testapp.c:369: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[500];
data/memcached-1.6.9+dfsg/testapp.c:547: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 environment[80];
data/memcached-1.6.9+dfsg/testapp.c:551: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 pid_file[80];
data/memcached-1.6.9+dfsg/testapp.c:561: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 coreadm[128];
data/memcached-1.6.9+dfsg/testapp.c:571: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 *argv[24];
data/memcached-1.6.9+dfsg/testapp.c:573: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 tmo[24];
data/memcached-1.6.9+dfsg/testapp.c:635: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).
    FILE *fp = fopen(filename, "r");
data/memcached-1.6.9+dfsg/testapp.c:643: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[80];
data/memcached-1.6.9+dfsg/testapp.c:663: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).
        fp = fopen(pid_file, "r");
data/memcached-1.6.9+dfsg/testapp.c:700: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 service[NI_MAXSERV];
data/memcached-1.6.9+dfsg/testapp.c:793: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 tmpl[sizeof(TMP_TEMPLATE)+1];
data/memcached-1.6.9+dfsg/testapp.c:796:19:  [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).
    int newfile = mkstemp(tmpl);
data/memcached-1.6.9+dfsg/testapp.c:812: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[80] = { 0 };
data/memcached-1.6.9+dfsg/testapp.c:813: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 *efile = fopen(tmpl, "r");
data/memcached-1.6.9+dfsg/testapp.c:821: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 expected[80] = { 0 };
data/memcached-1.6.9+dfsg/testapp.c:881: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/memcached-1.6.9+dfsg/testapp.c:905: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[256];
data/memcached-1.6.9+dfsg/testapp.c:931: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[4096];
data/memcached-1.6.9+dfsg/testapp.c:958: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 rsp[80];
data/memcached-1.6.9+dfsg/testapp.c:1001: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/memcached-1.6.9+dfsg/testapp.c:1148: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(buf + key_offset, key, keylen);
data/memcached-1.6.9+dfsg/testapp.c:1150: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(buf + key_offset + keylen, dta, dtalen);
data/memcached-1.6.9+dfsg/testapp.c:1181: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(buf + ext_offset, ext, extlen);
data/memcached-1.6.9+dfsg/testapp.c:1184: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(buf + key_offset, key, keylen);
data/memcached-1.6.9+dfsg/testapp.c:1187: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(buf + dta_offset, dta, dtalen);
data/memcached-1.6.9+dfsg/testapp.c:1248: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(buf + key_offset, key, keylen);
data/memcached-1.6.9+dfsg/testapp.c:1276: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(buf + key_offset, key, keylen);
data/memcached-1.6.9+dfsg/testapp.c:1384: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 bytes[1024];
data/memcached-1.6.9+dfsg/testapp.c:1403: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 bytes[1024];
data/memcached-1.6.9+dfsg/testapp.c:1436: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 bytes[1024];
data/memcached-1.6.9+dfsg/testapp.c:1486: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 bytes[1024];
data/memcached-1.6.9+dfsg/testapp.c:1525: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 bytes[1024];
data/memcached-1.6.9+dfsg/testapp.c:1576: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 bytes[1024];
data/memcached-1.6.9+dfsg/testapp.c:1625: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 bytes[1024];
data/memcached-1.6.9+dfsg/testapp.c:1657: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 bytes[1024];
data/memcached-1.6.9+dfsg/testapp.c:1662: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(send.bytes + len, temp.bytes, l);
data/memcached-1.6.9+dfsg/testapp.c:1697: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 bytes[1024];
data/memcached-1.6.9+dfsg/testapp.c:1715: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(send.bytes + len, temp.bytes, len2);
data/memcached-1.6.9+dfsg/testapp.c:1721: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(send.bytes + len, temp.bytes, len2);
data/memcached-1.6.9+dfsg/testapp.c:1757: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 bytes[1024];
data/memcached-1.6.9+dfsg/testapp.c:1794: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 bytes[1024];
data/memcached-1.6.9+dfsg/testapp.c:1838: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 bytes[1024];
data/memcached-1.6.9+dfsg/testapp.c:1857: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 bytes[1024];
data/memcached-1.6.9+dfsg/testapp.c:1933: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 bytes[1024];
data/memcached-1.6.9+dfsg/testapp.c:2019: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 bytes[1024];
data/memcached-1.6.9+dfsg/testapp.c:2042: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 bytes[1024];
data/memcached-1.6.9+dfsg/testapp.c:2076: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 *key[256];
data/memcached-1.6.9+dfsg/testapp.c:2083: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 bytes[65 * 1024];
data/memcached-1.6.9+dfsg/testapp.c:2171: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(((char*)buffer) + offset, command.bytes, len);
data/memcached-1.6.9+dfsg/thread.c:140: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[1];
data/memcached-1.6.9+dfsg/thread.c:196: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[1];
data/memcached-1.6.9+dfsg/thread.c:498: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[1];
data/memcached-1.6.9+dfsg/thread.c:669: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[1];
data/memcached-1.6.9+dfsg/thread.c:707: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[REDISPATCH_MSG_SIZE];
data/memcached-1.6.9+dfsg/thread.c:711: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(&buf[1], &c->sfd, sizeof(int));
data/memcached-1.6.9+dfsg/timedrun.c:105:15:  [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).
    naptime = atoi(argv[1]);
data/memcached-1.6.9+dfsg/tls.c:65: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(bp + bytes, (void*)msg->msg_iov[i].iov_base, to_copy);
data/memcached-1.6.9+dfsg/util.c:11:8:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static char *uriencode_map[256];
data/memcached-1.6.9+dfsg/util.c:12:8:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static char uriencode_str[768];
data/memcached-1.6.9+dfsg/util.c:35: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(&dst[d], uriencode_map[(unsigned char) src[x]], 3);
data/memcached-1.6.9+dfsg/util.c:225: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/memcached-1.6.9+dfsg/assoc.c:235:17:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
                usleep(10*1000);
data/memcached-1.6.9+dfsg/authfile.c:107:19:  [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 ulen = strlen(user);
data/memcached-1.6.9+dfsg/authfile.c:108:19:  [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 plen = strlen(pass);
data/memcached-1.6.9+dfsg/crawler.c:295:34:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        int res = ((conn*)c->c)->read(c->c, buf, 1);
data/memcached-1.6.9+dfsg/crawler.c:369:17:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
                usleep(settings.lru_crawler_sleep);
data/memcached-1.6.9+dfsg/crawler.c:488:17:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
                usleep(settings.lru_crawler_sleep);
data/memcached-1.6.9+dfsg/extstore.c:800:39:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                                ret = read(p->fd, cur_io->buf, cur_io->len);
data/memcached-1.6.9+dfsg/items.c:622:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(key_temp, ITEM_key(it), it->nkey);
data/memcached-1.6.9+dfsg/items.c:1599:13:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
            usleep(to_sleep);
data/memcached-1.6.9+dfsg/linux_priv.c:33: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).
    if (write(2, kill_msg, strlen(kill_msg)) == -1) {
data/memcached-1.6.9+dfsg/linux_priv.c:51: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).
    kill_msg = malloc(strlen(KILL_MSG_STR)+1);
data/memcached-1.6.9+dfsg/linux_priv.c:93:58:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    rc |= seccomp_rule_add(ctx, SCMP_ACT_ALLOW, SCMP_SYS(read), 0);
data/memcached-1.6.9+dfsg/linux_priv.c:138:58:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    rc |= seccomp_rule_add(ctx, SCMP_ACT_ALLOW, SCMP_SYS(read), 0);
data/memcached-1.6.9+dfsg/logger.c:459:38:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            int res = ((conn*)w->c)->read(w->c, buf, 1);
data/memcached-1.6.9+dfsg/logger.c:530:13:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
            usleep(to_sleep);
data/memcached-1.6.9+dfsg/memcached.c:135:12:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    return read(c->sfd, buf, count);
data/memcached-1.6.9+dfsg/memcached.c:329:17:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
                usleep(timeslice);
data/memcached-1.6.9+dfsg/memcached.c:1191: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(str);
data/memcached-1.6.9+dfsg/memcached.c:1195: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).
        len = strlen(str);
data/memcached-1.6.9+dfsg/memcached.c:1662: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).
    add_stats(name, strlen(name), val_str, vlen, c);
data/memcached-1.6.9+dfsg/memcached.c:1885: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).
    int zlength=strlen(z);
data/memcached-1.6.9+dfsg/memcached.c:1946: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(addr_text, "]");
data/memcached-1.6.9+dfsg/memcached.c:1973:13:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
            strncpy(addr_text,
data/memcached-1.6.9+dfsg/memcached.c:1983:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (strlen(addr_text) < 2) {
data/memcached-1.6.9+dfsg/memcached.c:2175: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).
    res = strlen(buf);
data/memcached-1.6.9+dfsg/memcached.c:2352:18:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        res = c->read(c, c->rbuf + c->rbytes, avail);
data/memcached-1.6.9+dfsg/memcached.c:2810:22:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            res = c->read(c, ch->data + ch->used,
data/memcached-1.6.9+dfsg/memcached.c:2916: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).
                res = write(sfd, str, strlen(str));
data/memcached-1.6.9+dfsg/memcached.c:3088:26:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                res = c->read(c, c->ritem, c->rlbytes);
data/memcached-1.6.9+dfsg/memcached.c:3163:22:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            res = c->read(c, c->rbuf, c->rsize > c->sbytes ? c->sbytes : c->rsize);
data/memcached-1.6.9+dfsg/memcached.c:3560: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).
            if (strncmp(p, notls, strlen(notls)) == 0) {
data/memcached-1.6.9+dfsg/memcached.c:3567: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).
                p += strlen(notls) + 1;
data/memcached-1.6.9+dfsg/memcached.c:3670:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(addr.sun_path, path, sizeof(addr.sun_path) - 1);
data/memcached-1.6.9+dfsg/memcached.c:3672:17:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
    old_umask = umask( ~(access_mask&0777));
data/memcached-1.6.9+dfsg/memcached.c:3676:9:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
        umask(old_umask);
data/memcached-1.6.9+dfsg/memcached.c:3679:5:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
    umask(old_umask);
data/memcached-1.6.9+dfsg/memcached.c:4169:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (strlen(s) < 1)
data/memcached-1.6.9+dfsg/memcached.c:4818: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).
                size_t len = strlen(settings.inter) + strlen(optarg) + 2;
data/memcached-1.6.9+dfsg/memcached.c:4818: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).
                size_t len = strlen(settings.inter) + strlen(optarg) + 2;
data/memcached-1.6.9+dfsg/memcached.c:4924: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).
            unit = buf[strlen(buf)-1];
data/memcached-1.6.9+dfsg/memcached.c:4927: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).
                buf[strlen(buf)-1] = '\0';
data/memcached-1.6.9+dfsg/memcached.c:5822:19:  [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(portnumber_filename)+4+1;
data/memcached-1.6.9+dfsg/memcached.c:5868:5:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
    usleep(1000);
data/memcached-1.6.9+dfsg/memcached.h:795:15:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    ssize_t (*read)(conn  *c, void *buf, size_t count);
data/memcached-1.6.9+dfsg/proto_bin.c:220: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(errstr);
data/memcached-1.6.9+dfsg/proto_bin.c:318: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 res = strlen(tmpbuf);
data/memcached-1.6.9+dfsg/proto_bin.c:634: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).
                append_stats("detailed", strlen("detailed"), dump_buf, len, c);
data/memcached-1.6.9+dfsg/proto_bin.c:835: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).
        write_bin_response(c, "Authenticated", 0, 0, strlen("Authenticated"));
data/memcached-1.6.9+dfsg/proto_bin.c:960: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).
                write_bin_response(c, VERSION, 0, 0, strlen(VERSION));
data/memcached-1.6.9+dfsg/proto_text.c:209:18:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    size_t len = strlen(command);
data/memcached-1.6.9+dfsg/proto_text.c:723: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).
        if (get_stats(subcommand, strlen(subcommand), &append_stats, c)) {
data/memcached-1.6.9+dfsg/proto_text.c:1646: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 vlen = strlen(tmpbuf);
data/memcached-1.6.9+dfsg/proto_text.c:1686: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).
        size_t vlen = strlen(tmpbuf);
data/memcached-1.6.9+dfsg/proto_text.c:2529: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).
        write_and_free(c, errmsg, strlen(errmsg));
data/memcached-1.6.9+dfsg/restart.c:74:19:  [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 flen = strlen(file);
data/memcached-1.6.9+dfsg/restart.c:76: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 *metafile = calloc(1, flen + strlen(ext) + 1);
data/memcached-1.6.9+dfsg/restart.c:83:32:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    memcpy(metafile+flen, ext, strlen(ext));
data/memcached-1.6.9+dfsg/restart.c:220:19:  [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 flen = strlen(file);
data/memcached-1.6.9+dfsg/restart.c:222: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).
    size_t extlen = strlen(ext);
data/memcached-1.6.9+dfsg/restart.c:233:22:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
    mode_t oldmask = umask(~(S_IRUSR | S_IWUSR));
data/memcached-1.6.9+dfsg/restart.c:235:5:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
    umask(oldmask);
data/memcached-1.6.9+dfsg/sasl_defs.c:54: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).
    size_t unmlen = strlen(user);
data/memcached-1.6.9+dfsg/slabs.c:1227:13:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
            usleep(backoff_timer);
data/memcached-1.6.9+dfsg/stats_prefix.c:76:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(pfs->prefix, key, length);
data/memcached-1.6.9+dfsg/stats_prefix.c:139:12:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    size = strlen(format) + total_prefix_size +
data/memcached-1.6.9+dfsg/stats_prefix.c:140: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).
           num_prefixes * (strlen(format) - 2 /* %s */
data/memcached-1.6.9+dfsg/storage.c:637:13:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
            usleep(to_sleep);
data/memcached-1.6.9+dfsg/storage.c:826:25:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
                        usleep(1000);
data/memcached-1.6.9+dfsg/storage.c:920:13:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
            usleep(to_sleep);
data/memcached-1.6.9+dfsg/storage.c:1038: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).
    unit = tolower(p[strlen(p)-1]);
data/memcached-1.6.9+dfsg/storage.c:1039:7:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    p[strlen(p)-1] = '\0';
data/memcached-1.6.9+dfsg/testapp.c:43:15:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    ssize_t (*read)(struct conn  *c, void *buf, size_t count);
data/memcached-1.6.9+dfsg/testapp.c:58:12:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    return read(c->sock, buf, count);
data/memcached-1.6.9+dfsg/testapp.c:383: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).
    assert(strlen(expected) == length);
data/memcached-1.6.9+dfsg/testapp.c:388: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).
    assert(strlen(expected) == length);
data/memcached-1.6.9+dfsg/testapp.c:393: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).
    assert(strlen(expected) == length);
data/memcached-1.6.9+dfsg/testapp.c:398: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).
    assert(strlen(expected) == length);
data/memcached-1.6.9+dfsg/testapp.c:415: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 (hashval == hash(tmp, strlen(tmp) - 1) % PREFIX_HASH_SIZE) {
data/memcached-1.6.9+dfsg/testapp.c:421: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).
    stats_prefix_record_set(tmp, strlen(tmp));
data/memcached-1.6.9+dfsg/testapp.c:550: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).
    char *filename= environment + strlen("MEMCACHED_PORT_FILENAME=");
data/memcached-1.6.9+dfsg/testapp.c:626:9:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
        usleep(wait);
data/memcached-1.6.9+dfsg/testapp.c:660:13:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
            usleep(10);
data/memcached-1.6.9+dfsg/testapp.c:672:13:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
            usleep(10);
data/memcached-1.6.9+dfsg/testapp.c:794:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(tmpl, TMP_TEMPLATE, sizeof(TMP_TEMPLATE)+1);
data/memcached-1.6.9+dfsg/testapp.c:837:18:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    size_t len = strlen(buf);
data/memcached-1.6.9+dfsg/testapp.c:862:27:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        ssize_t nr = con->read(con, buffer + offset, 1);
data/memcached-1.6.9+dfsg/testapp.c:890: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).
    assert(strncmp(buffer, "END", strlen("END")) == 0);
data/memcached-1.6.9+dfsg/testapp.c:894:44:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    assert(strncmp(buffer, "CLIENT_ERROR", strlen("CLIENT_ERROR")) == 0);
data/memcached-1.6.9+dfsg/testapp.c:941:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    assert(con->read(con, buffer, sizeof(buffer)) == 0);
data/memcached-1.6.9+dfsg/testapp.c:955:5:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
    usleep(250);
data/memcached-1.6.9+dfsg/testapp.c:960:32:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    assert(strncmp(rsp, "END", strlen("END")) == 0);
data/memcached-1.6.9+dfsg/testapp.c:963:5:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
    usleep(250);
data/memcached-1.6.9+dfsg/testapp.c:966:32:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    assert(strncmp(rsp, "END", strlen("END")) == 0);
data/memcached-1.6.9+dfsg/testapp.c:974:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    assert(con->read(con, buffer, sizeof(buffer)) == 0);
data/memcached-1.6.9+dfsg/testapp.c:1009:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    assert(con->read(con, buffer, sizeof(buffer)) == 0);
data/memcached-1.6.9+dfsg/testapp.c:1037:5:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
    usleep(500);
data/memcached-1.6.9+dfsg/testapp.c:1055:17:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
                usleep(100);
data/memcached-1.6.9+dfsg/testapp.c:1068:27:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        ssize_t nr = con->read(con, ((char*)buf) + offset, len - offset);
data/memcached-1.6.9+dfsg/testapp.c:1105:5:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
    usleep(500);
data/memcached-1.6.9+dfsg/testapp.c:1416:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    assert(con->read(con, buffer.bytes, sizeof(buffer.bytes)) == 0);
data/memcached-1.6.9+dfsg/testapp.c:1440: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).
                                 key, strlen(key), &value, sizeof(value),
data/memcached-1.6.9+dfsg/testapp.c:1489: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).
                                 strlen(key), &value, sizeof(value),
data/memcached-1.6.9+dfsg/testapp.c:1528: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).
                                 key, strlen(key), &value, sizeof(value),
data/memcached-1.6.9+dfsg/testapp.c:1536:32:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                          key, strlen(key), &value, sizeof(value), 0, 0);
data/memcached-1.6.9+dfsg/testapp.c:1543:32:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                          key, strlen(key), &value, sizeof(value), 0, 0);
data/memcached-1.6.9+dfsg/testapp.c:1579: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).
                             key, strlen(key), NULL, 0);
data/memcached-1.6.9+dfsg/testapp.c:1587:32:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                          key, strlen(key), NULL, 0, 0, 0);
data/memcached-1.6.9+dfsg/testapp.c:1594: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).
                      cmd, key, strlen(key), NULL, 0);
data/memcached-1.6.9+dfsg/testapp.c:1635: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).
                             key, strlen(key), NULL, 0);
data/memcached-1.6.9+dfsg/testapp.c:1644:32:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                          key, strlen(key), NULL, 0,
data/memcached-1.6.9+dfsg/testapp.c:1661: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).
                               key, strlen(key), NULL, 0);
data/memcached-1.6.9+dfsg/testapp.c:1707: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).
                                 key, strlen(key), NULL, 0,
data/memcached-1.6.9+dfsg/testapp.c:1711: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).
                              missing, strlen(missing), NULL, 0);
data/memcached-1.6.9+dfsg/testapp.c:1720: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).
                       key, strlen(key), NULL, 0);
data/memcached-1.6.9+dfsg/testapp.c:1760: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).
                                    key, strlen(key), 1, 0, 0);
data/memcached-1.6.9+dfsg/testapp.c:1797: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).
                                    key, strlen(key), 1, 9, 0);
data/memcached-1.6.9+dfsg/testapp.c:1862: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).
                                 key, strlen(key), NULL, 0, 0, 0);
data/memcached-1.6.9+dfsg/testapp.c:1877: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).
                      key, strlen(key), NULL, 0);
data/memcached-1.6.9+dfsg/testapp.c:1893: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).
                              key, strlen(key), NULL, 0, 0, 0);
data/memcached-1.6.9+dfsg/testapp.c:1909:32:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                          key, strlen(key), NULL, 0);
data/memcached-1.6.9+dfsg/testapp.c:1938: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).
                              key, strlen(key), value, strlen(value));
data/memcached-1.6.9+dfsg/testapp.c:1938: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).
                              key, strlen(key), value, strlen(value));
data/memcached-1.6.9+dfsg/testapp.c:1948:32:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                          key, strlen(key), value, strlen(value), 0, 0);
data/memcached-1.6.9+dfsg/testapp.c:1948:52:  [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).
                          key, strlen(key), value, strlen(value), 0, 0);
data/memcached-1.6.9+dfsg/testapp.c:1955: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).
                      key, strlen(key), value, strlen(value));
data/memcached-1.6.9+dfsg/testapp.c:1955:48:  [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).
                      key, strlen(key), value, strlen(value));
data/memcached-1.6.9+dfsg/testapp.c:1972: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).
                      key, strlen(key), NULL, 0);
data/memcached-1.6.9+dfsg/testapp.c:1979:63:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    assert(receive.response.message.header.response.keylen == strlen(key));
data/memcached-1.6.9+dfsg/testapp.c:1980:65:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    assert(receive.response.message.header.response.bodylen == (strlen(key) + 2*strlen(value) + 4));
data/memcached-1.6.9+dfsg/testapp.c:1980:81:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    assert(receive.response.message.header.response.bodylen == (strlen(key) + 2*strlen(value) + 4));
data/memcached-1.6.9+dfsg/testapp.c:1986: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).
    assert(memcmp(ptr, key, strlen(key)) == 0);
data/memcached-1.6.9+dfsg/testapp.c:1987: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).
    ptr += strlen(key);
data/memcached-1.6.9+dfsg/testapp.c:1988: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).
    assert(memcmp(ptr, value, strlen(value)) == 0);
data/memcached-1.6.9+dfsg/testapp.c:1989: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).
    ptr += strlen(value);
data/memcached-1.6.9+dfsg/testapp.c:1990: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).
    assert(memcmp(ptr, value, strlen(value)) == 0);
data/memcached-1.6.9+dfsg/testapp.c:2200:5:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
    usleep(250);
data/memcached-1.6.9+dfsg/testapp.c:2230: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).
    size_t cmdlen = strlen(command);
data/memcached-1.6.9+dfsg/thread.c:502:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    if (read(fd, buf, 1) != 1) {
data/memcached-1.6.9+dfsg/thread.c:564:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        if (read(fd, &fd_from_pipe, sizeof(fd_from_pipe)) != sizeof(fd_from_pipe)) {
data/memcached-1.6.9+dfsg/thread.c:573:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        if (read(fd, &fd_from_pipe, sizeof(fd_from_pipe)) != sizeof(fd_from_pipe)) {
data/memcached-1.6.9+dfsg/tls.c:211: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).
                                       strlen(SESSION_ID_CONTEXT));

ANALYSIS SUMMARY:

Hits = 427
Lines analyzed = 27675 in approximately 0.72 seconds (38439 lines/second)
Physical Source Lines of Code (SLOC) = 21174
Hits@level = [0] 480 [1] 141 [2] 243 [3]  10 [4]  33 [5]   0
Hits@level+ = [0+] 907 [1+] 427 [2+] 286 [3+]  43 [4+]  33 [5+]   0
Hits/KSLOC@level+ = [0+] 42.8356 [1+] 20.1662 [2+] 13.5071 [3+] 2.03079 [4+] 1.55852 [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.