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/beanstalkd-1.12/conn.c
Examining data/beanstalkd-1.12/ct/ct.c
Examining data/beanstalkd-1.12/ct/ct.h
Examining data/beanstalkd-1.12/ct/internal.h
Examining data/beanstalkd-1.12/darwin.c
Examining data/beanstalkd-1.12/dat.h
Examining data/beanstalkd-1.12/file.c
Examining data/beanstalkd-1.12/freebsd.c
Examining data/beanstalkd-1.12/heap.c
Examining data/beanstalkd-1.12/job.c
Examining data/beanstalkd-1.12/linux.c
Examining data/beanstalkd-1.12/main.c
Examining data/beanstalkd-1.12/ms.c
Examining data/beanstalkd-1.12/net.c
Examining data/beanstalkd-1.12/primes.c
Examining data/beanstalkd-1.12/prot.c
Examining data/beanstalkd-1.12/serv.c
Examining data/beanstalkd-1.12/sunos.c
Examining data/beanstalkd-1.12/testheap.c
Examining data/beanstalkd-1.12/testjobs.c
Examining data/beanstalkd-1.12/testms.c
Examining data/beanstalkd-1.12/testutil.c
Examining data/beanstalkd-1.12/time.c
Examining data/beanstalkd-1.12/tube.c
Examining data/beanstalkd-1.12/util.c
Examining data/beanstalkd-1.12/walg.c
Examining data/beanstalkd-1.12/testserv.c

FINAL RESULTS:

data/beanstalkd-1.12/ct/ct.c:63:5:  [4] (format) vprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    vprintf(fmt, arg);
data/beanstalkd-1.12/ct/ct.c:192: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(t->dir, TmpDirPat);
data/beanstalkd-1.12/ct/ct.c:286:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(s, "%s/%s", path, ent->d_name);
data/beanstalkd-1.12/ct/ct.c:303: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(b->dir, TmpDirPat);
data/beanstalkd-1.12/ct/ct.h:8:73:  [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.
void  ctlogpn(const char*, int, const char*, ...) __attribute__((format(printf, 3, 4)));
data/beanstalkd-1.12/dat.h:282:55:  [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.
void warn(const char *fmt, ...) __attribute__((format(printf, 1, 2)));
data/beanstalkd-1.12/dat.h:283:56:  [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.
void warnx(const char *fmt, ...) __attribute__((format(printf, 1, 2)));
data/beanstalkd-1.12/dat.h:284:54:  [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.
char* fmtalloc(char *fmt, ...) __attribute__((format(printf, 1, 2)));
data/beanstalkd-1.12/file.c:19:23:  [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.
__attribute__((format(printf, 3, 4)));
data/beanstalkd-1.12/file.c:450:5:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    vfprintf(stderr, fmt, ap);
data/beanstalkd-1.12/prot.c:359:23:  [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.
__attribute__((format(printf, 3, 4)));
data/beanstalkd-1.12/prot.c:370: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.
    r = vsnprintf(c->reply_buf, LINE_BUF_SIZE, fmt, ap);
data/beanstalkd-1.12/prot.c:947: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.
    return snprintf(buf, size, STATS_FMT,
data/beanstalkd-1.12/prot.c:1196: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.
    return snprintf(buf, size, STATS_JOB_FMT,
data/beanstalkd-1.12/prot.c:1223: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.
    return snprintf(buf, size, STATS_TUBE_FMT,
data/beanstalkd-1.12/testserv.c:73:5:  [4] (shell) execlp:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
    execlp(a0, a0, a1, a2, a3, a4, NULL);
data/beanstalkd-1.12/testserv.c:1823: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.
    if (system("which beanstalkd-1.4.6") != 0) {
data/beanstalkd-1.12/util.c:17:23:  [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.
__attribute__((format(printf, 2, 0)));
data/beanstalkd-1.12/util.c:24:9:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
        vfprintf(stderr, fmt, args);
data/beanstalkd-1.12/util.c:60: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.
    n = vsnprintf(0, 0, fmt, ap) + 1; // include space for trailing NUL
data/beanstalkd-1.12/util.c:66: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.
        vsnprintf(buf, n, fmt, ap);
data/beanstalkd-1.12/ct/ct.c:528:15:  [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 *v = getenv("MAKEFLAGS");
data/beanstalkd-1.12/ct/ct.c:145:15:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
    FILE *f = tmpfile();
data/beanstalkd-1.12/ct/ct.c:245: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]; /* arbitrary size */
data/beanstalkd-1.12/ct/ct.c:285: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 s[n+1];
data/beanstalkd-1.12/ct/internal.h:15: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 dir[sizeof TmpDirPat];
data/beanstalkd-1.12/ct/internal.h:24: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  dir[sizeof TmpDirPat];
data/beanstalkd-1.12/dat.h:229: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 pad[6];
data/beanstalkd-1.12/dat.h:246: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 name[MAX_TUBE_NAME_LEN];
data/beanstalkd-1.12/dat.h:388:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char   cmd[LINE_BUF_SIZE];     // this string is NOT NUL-terminated
data/beanstalkd-1.12/dat.h:395: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 reply_buf[LINE_BUF_SIZE]; // this string IS NUL-terminated
data/beanstalkd-1.12/file.c:45: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 pad[1];
data/beanstalkd-1.12/file.c:62:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    static char buf[4096] = {0};
data/beanstalkd-1.12/file.c:164: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 tubename[MAX_TUBE_NAME_LEN];
data/beanstalkd-1.12/file.c:295: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 tubename[MAX_TUBE_NAME_LEN];
data/beanstalkd-1.12/file.c:466:10:  [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).
    fd = open(f->path, O_WRONLY|O_CREAT, 0400);
data/beanstalkd-1.12/heap.c:85: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(ndata, h->data, sizeof(void*) * h->len);
data/beanstalkd-1.12/job.c:206: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(n, j, sizeof(Job) + j->r.body_size);
data/beanstalkd-1.12/ms.c:27: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(nitems, a->items, a->len * sizeof(void *));
data/beanstalkd-1.12/net.c:109: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 hbuf[NI_MAXHOST], pbuf[NI_MAXSERV], *h = host, *p = port;
data/beanstalkd-1.12/prot.c:244: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 instance_hex[instance_id_bytes * 2 + 1]; // hex-encoded len of instance_id_bytes
data/beanstalkd-1.12/prot.c:828: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(c->in_job->body, c->cmd + c->cmd_len, job_data_bytes);
data/beanstalkd-1.12/prot.c:1999:16:  [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 bucket[BUCKET_BUF_SIZE];
data/beanstalkd-1.12/prot.c:2277:22:  [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).
    int dev_random = open("/dev/urandom", O_RDONLY);
data/beanstalkd-1.12/prot.c:2291: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(instance_hex + (i * 2), "%02x", rand_data[i]);
data/beanstalkd-1.12/testserv.c:229:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    static char path[90];
data/beanstalkd-1.12/testserv.c:230: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 name[95];
data/beanstalkd-1.12/testserv.c:268:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    static char buf[1024];
data/beanstalkd-1.12/testserv.c:723: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 body[len+1];
data/beanstalkd-1.12/testserv.c:1821: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 portstr[10];
data/beanstalkd-1.12/testserv.c:1830:5:  [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(portstr, "%d", port);
data/beanstalkd-1.12/testserv.c:2004: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[50], put[50];
data/beanstalkd-1.12/testserv.c:2005: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 body[size+1];
data/beanstalkd-1.12/testserv.c:2009:5:  [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(put, "put 0 0 0 %d\r\n", size);
data/beanstalkd-1.12/testserv.c:2017: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(buf, "delete %d\r\n", i + 1);
data/beanstalkd-1.12/walg.c:413:10:  [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).
    fd = open(path, O_WRONLY|O_CREAT, 0600);
data/beanstalkd-1.12/walg.c:455:18:  [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).
        int fd = open(f->path, O_RDONLY);
data/beanstalkd-1.12/ct/ct.c:247:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    while ((n = read(in, buf, sizeof(buf))) != 0) {
data/beanstalkd-1.12/ct/ct.c:284: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 n = strlen(path) + 1 + strlen(ent->d_name);
data/beanstalkd-1.12/ct/ct.c:284: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).
        int n = strlen(path) + 1 + strlen(ent->d_name);
data/beanstalkd-1.12/ct/ct.c:350:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    int r = read(durfd, &b->dur, sizeof b->dur);
data/beanstalkd-1.12/ct/ct.c:355:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    r = read(durfd, &b->bytes, sizeof b->bytes);
data/beanstalkd-1.12/ct/ct.c:537:16:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        while (read(rjobfd, &c, 1) > 0) {
data/beanstalkd-1.12/file.c:166:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    r = read(f->fd, &namelen, sizeof(int));
data/beanstalkd-1.12/file.c:297:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    r = read(f->fd, &namelen, sizeof(namelen));
data/beanstalkd-1.12/file.c:426:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    r = read(f->fd, c, n);
data/beanstalkd-1.12/file.c:545:10:  [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).
    nl = strlen(j->tube->name);
data/beanstalkd-1.12/net.c:160: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(path) > maxlen) {
data/beanstalkd-1.12/net.c:162: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).
              path, strlen(path), maxlen);
data/beanstalkd-1.12/net.c:165: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, maxlen);
data/beanstalkd-1.12/prot.c:1154: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).
        resp_z += 3 + strlen(t->name); /* including "- " and "\n" */
data/beanstalkd-1.12/prot.c:1171: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).
        buf += snprintf(buf, 4 + strlen(t->name), "- %s\n", t->name);
data/beanstalkd-1.12/prot.c:1280: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(name);
data/beanstalkd-1.12/prot.c:1305: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(c->cmd) != c->cmd_len - 2) {
data/beanstalkd-1.12/prot.c:1939:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        r = read(c->sock.fd, c->cmd + c->cmd_read, LINE_BUF_SIZE - c->cmd_read);
data/beanstalkd-1.12/prot.c:1969:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        r = read(c->sock.fd, c->cmd + c->cmd_read, LINE_BUF_SIZE - c->cmd_read);
data/beanstalkd-1.12/prot.c:2001:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        r = read(c->sock.fd, bucket, to_read);
data/beanstalkd-1.12/prot.c:2023:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        r = read(c->sock.fd, j->body + c->in_job_read, j->r.body_size -c->in_job_read);
data/beanstalkd-1.12/prot.c:2285:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    r = read(dev_random, &rand_data, instance_id_bytes);
data/beanstalkd-1.12/testserv.c:67: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(100000); // .1s; time for the child to bind to its port
data/beanstalkd-1.12/testserv.c:298:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        r = read(fd, &c, 1);
data/beanstalkd-1.12/testserv.c:350: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).
    writefull(fd, s, strlen(s));
data/beanstalkd-1.12/testserv.c:899: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(1010000); // 1.01 sec
data/beanstalkd-1.12/testserv.c:1135: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(200000);
data/beanstalkd-1.12/testserv.c:1175: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(100000);
data/beanstalkd-1.12/testserv.c:1193: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(1000000); // 1.0s
data/beanstalkd-1.12/tube.c:15:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(t->name, name, MAX_TUBE_NAME_LEN);
data/beanstalkd-1.12/walg.c:112:10:  [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).
    z += strlen(j->tube->name);
data/beanstalkd-1.12/walg.c:373:10:  [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).
    z += strlen(j->tube->name);
data/beanstalkd-1.12/walg.c:406: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).
    path_length = strlen(w->dir) + strlen("/lock") + 1;
data/beanstalkd-1.12/walg.c:406: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).
    path_length = strlen(w->dir) + strlen("/lock") + 1;

ANALYSIS SUMMARY:

Hits = 91
Lines analyzed = 9365 in approximately 0.23 seconds (41436 lines/second)
Physical Source Lines of Code (SLOC) = 7534
Hits@level = [0]  52 [1]  34 [2]  35 [3]   1 [4]  21 [5]   0
Hits@level+ = [0+] 143 [1+]  91 [2+]  57 [3+]  22 [4+]  21 [5+]   0
Hits/KSLOC@level+ = [0+] 18.9806 [1+] 12.0786 [2+] 7.5657 [3+] 2.9201 [4+] 2.78736 [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.