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/dzen2-0.9.5~svn271/action.h
Examining data/dzen2-0.9.5~svn271/main.c
Examining data/dzen2-0.9.5~svn271/dzen.h
Examining data/dzen2-0.9.5~svn271/util.c
Examining data/dzen2-0.9.5~svn271/action.c
Examining data/dzen2-0.9.5~svn271/gadgets/dbar-main.c
Examining data/dzen2-0.9.5~svn271/gadgets/dbar.c
Examining data/dzen2-0.9.5~svn271/gadgets/textwidth.c
Examining data/dzen2-0.9.5~svn271/gadgets/dbar.h
Examining data/dzen2-0.9.5~svn271/gadgets/gcpubar.c
Examining data/dzen2-0.9.5~svn271/gadgets/gdbar.c
Examining data/dzen2-0.9.5~svn271/draw.c

FINAL RESULTS:

data/dzen2-0.9.5~svn271/draw.c:503:5:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
				strcat(rbuf, lbuf);
data/dzen2-0.9.5~svn271/util.c:32:2:  [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, errstr, ap);
data/dzen2-0.9.5~svn271/util.c:58:4:  [4] (shell) execl:
  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.
			execl(shell, shell, "-c", arg, (char *)NULL);
data/dzen2-0.9.5~svn271/util.c:49:25:  [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(!shell && !(shell = getenv("SHELL")))
data/dzen2-0.9.5~svn271/action.c:270:18:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
		dzen.ret_val = atoi(opt[0]);
data/dzen2-0.9.5~svn271/action.c:366:7:  [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).
		n = atoi(opt[0]);
data/dzen2-0.9.5~svn271/action.c:378:7:  [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).
		n = atoi(opt[0]);
data/dzen2-0.9.5~svn271/action.h:47:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char *options[MAXOPTIONS];
data/dzen2-0.9.5~svn271/draw.c:24:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char name[ARGLEN];
data/dzen2-0.9.5~svn271/draw.c:171:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char tokval[ARGLEN];
data/dzen2-0.9.5~svn271/draw.c:247:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buf[128];
data/dzen2-0.9.5~svn271/draw.c:285:7:  [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).
			*d=atoi(buf);
data/dzen2-0.9.5~svn271/draw.c:290:7:  [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).
			*a=atoi(s+i);
data/dzen2-0.9.5~svn271/draw.c:303:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buf[32];
data/dzen2-0.9.5~svn271/draw.c:373:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char lbuf[MAX_LINE_LEN], *rbuf = NULL;
data/dzen2-0.9.5~svn271/draw.c:673: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).
							nobg = atoi(tval);
data/dzen2-0.9.5~svn271/draw.c:709: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).
									cur_fnt = &(dzen.fnpl[atoi(tval+4)]);
data/dzen2-0.9.5~svn271/dzen.h:71:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char cmd[1024];
data/dzen2-0.9.5~svn271/gadgets/dbar-main.c:33:3:  [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 aval[MAXLEN], *endptr;
data/dzen2-0.9.5~svn271/gadgets/dbar-main.c:41: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).
	dbar.width = atoi(argv[i]);
data/dzen2-0.9.5~svn271/gadgets/dbar.h:29:3:  [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 gb[MAX_GRAPH_VALS];
data/dzen2-0.9.5~svn271/gadgets/gcpubar.c:46:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buf[256], *ep;
data/dzen2-0.9.5~svn271/gadgets/gcpubar.c:90:14:  [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).
				counts = atoi(argv[i]);
data/dzen2-0.9.5~svn271/gadgets/gcpubar.c:94: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).
				dbar.gs = atoi(argv[i]);
data/dzen2-0.9.5~svn271/gadgets/gcpubar.c:98: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).
				dbar.gw = atoi(argv[i]);
data/dzen2-0.9.5~svn271/gadgets/gcpubar.c:102:18:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
				dbar.width = atoi(argv[i]);
data/dzen2-0.9.5~svn271/gadgets/gcpubar.c:106:19:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
				dbar.height = atoi(argv[i]);
data/dzen2-0.9.5~svn271/gadgets/gcpubar.c:110: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).
				dbar.segw = atoi(argv[i]);
data/dzen2-0.9.5~svn271/gadgets/gcpubar.c:114: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).
				dbar.segh = atoi(argv[i]);
data/dzen2-0.9.5~svn271/gadgets/gcpubar.c:118: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).
				dbar.segb = atoi(argv[i]);
data/dzen2-0.9.5~svn271/gadgets/gcpubar.c:141: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).
	if(!(statfp = fopen("/proc/stat", "r"))) {
data/dzen2-0.9.5~svn271/gadgets/gdbar.c:8:3:  [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 aval[MAXLEN], *endptr;
data/dzen2-0.9.5~svn271/gadgets/gdbar.c:16: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).
	dbar.width = atoi(argv[i]);
data/dzen2-0.9.5~svn271/gadgets/gdbar.c:20:16:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
	dbar.height = atoi(argv[i]);
data/dzen2-0.9.5~svn271/gadgets/gdbar.c:24:14:  [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).
	dbar.segw = atoi(argv[i]);
data/dzen2-0.9.5~svn271/gadgets/gdbar.c:28:14:  [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).
	dbar.segh = atoi(argv[i]);
data/dzen2-0.9.5~svn271/gadgets/gdbar.c:32:14:  [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).
	dbar.segb = atoi(argv[i]);
data/dzen2-0.9.5~svn271/main.c:147:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buf[MAX_LINE_LEN],
data/dzen2-0.9.5~svn271/main.c:663:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buf[32];
data/dzen2-0.9.5~svn271/main.c:926: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).
				dzen.slave_win.max_lines = atoi(argv[i]);
data/dzen2-0.9.5~svn271/main.c:1018:57:  [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).
			if(++i < argc) dzen.title_win.x = dzen.slave_win.x = atoi(argv[i]);
data/dzen2-0.9.5~svn271/main.c:1021:38:  [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).
			if(++i < argc) dzen.title_win.y = atoi(argv[i]);
data/dzen2-0.9.5~svn271/main.c:1024: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).
			if(++i < argc) dzen.slave_win.width = atoi(argv[i]);
data/dzen2-0.9.5~svn271/main.c:1027: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).
			if(++i < argc) dzen.line_height= atoi(argv[i]);
data/dzen2-0.9.5~svn271/main.c:1030: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).
			if(++i < argc) dzen.title_win.width = atoi(argv[i]);
data/dzen2-0.9.5~svn271/main.c:1039: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).
			if(++i < argc) dzen.xinescreen = atoi(argv[i]);
data/dzen2-0.9.5~svn271/action.c:175:47:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		if(strncmp(ev_lookup_table[i].name, evname, strlen(ev_lookup_table[i].name)) == 0)
data/dzen2-0.9.5~svn271/draw.c:80:80:  [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).
	XftTextExtentsUtf8(dzen.dpy, dzen.font.xftfont, (unsigned const char *) text, strlen(text), dzen.font.extents);
data/dzen2-0.9.5~svn271/draw.c:161:83:  [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).
	XftTextExtentsUtf8(dzen.dpy, dzen.font.xftfont, (unsigned const char *) fontstr, strlen(fontstr), dzen.font.extents);
data/dzen2-0.9.5~svn271/draw.c:163:47:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	dzen.font.width = (dzen.font.extents->width)/strlen(fontstr);
data/dzen2-0.9.5~svn271/draw.c:224:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(cmd, comma+1, 1024);
data/dzen2-0.9.5~svn271/draw.c:306:6:  [1] (buffer) sscanf:
  It's unclear if the %s limit in the format string is small enough
  (CWE-120). Check that the limit is sufficiently small, or use a different
  input function.
	r = sscanf(s, "%d,%31s", w, buf);
data/dzen2-0.9.5~svn271/draw.c:340:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(icons[icon_cnt].name, name, ARGLEN);
data/dzen2-0.9.5~svn271/draw.c:773: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).
				tw = textnw(cur_fnt, lbuf, strlen(lbuf));
data/dzen2-0.9.5~svn271/draw.c:776: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).
					tw = textnw(cur_fnt, lbuf, strlen(lbuf));
data/dzen2-0.9.5~svn271/draw.c:798:50:  [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).
							dzen.tgc, px, py + cur_fnt->ascent, lbuf, strlen(lbuf));
data/dzen2-0.9.5~svn271/draw.c:800:73:  [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).
					XDrawString(dzen.dpy, pm, dzen.tgc, px, py+dzen.font.ascent, lbuf, strlen(lbuf));
data/dzen2-0.9.5~svn271/draw.c:811:84:  [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).
						cur_fnt->xftfont, px, py + dzen.font.xftfont->ascent, (const FcChar8 *)lbuf, strlen(lbuf));
data/dzen2-0.9.5~svn271/draw.c:923:41:  [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(text, "^togglecollapse()", strlen("^togglecollapse()"))) {
data/dzen2-0.9.5~svn271/draw.c:927: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(text, "^collapse()", strlen("^collapse()"))) {
data/dzen2-0.9.5~svn271/draw.c:931:37:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if(!strncmp(text, "^uncollapse()", strlen("^uncollapse()"))) {
data/dzen2-0.9.5~svn271/draw.c:936:38:  [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(text, "^togglestick()", strlen("^togglestick()"))) {
data/dzen2-0.9.5~svn271/draw.c:940: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).
	if(!strncmp(text, "^stick()", strlen("^stick()"))) {
data/dzen2-0.9.5~svn271/draw.c:944: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(!strncmp(text, "^unstick()", strlen("^unstick()"))) {
data/dzen2-0.9.5~svn271/draw.c:949:37:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if(!strncmp(text, "^togglehide()", strlen("^togglehide()"))) {
data/dzen2-0.9.5~svn271/draw.c:953: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).
	if(!strncmp(text, "^hide()", strlen("^hide()"))) {
data/dzen2-0.9.5~svn271/draw.c:957:33:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if(!strncmp(text, "^unhide()", strlen("^unhide()"))) {
data/dzen2-0.9.5~svn271/draw.c:962: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).
	if(!strncmp(text, "^raise()", strlen("^raise()"))) {
data/dzen2-0.9.5~svn271/draw.c:967: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).
	if(!strncmp(text, "^lower()", strlen("^lower()"))) {
data/dzen2-0.9.5~svn271/draw.c:972:37:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if(!strncmp(text, "^scrollhome()", strlen("^scrollhome()"))) {
data/dzen2-0.9.5~svn271/draw.c:977:36:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if(!strncmp(text, "^scrollend()", strlen("^scrollend()"))) {
data/dzen2-0.9.5~svn271/draw.c:982: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).
	if(!strncmp(text, "^exit()", strlen("^exit()"))) {
data/dzen2-0.9.5~svn271/gadgets/gcpubar.c:175:4:  [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((unsigned long)(ival * 1000000.0));
data/dzen2-0.9.5~svn271/gadgets/gcpubar.c:178:4:  [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((unsigned long)(ival * 1000000.0));
data/dzen2-0.9.5~svn271/gadgets/textwidth.c:113: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).
	printf("%u\n", textw(text, strlen(text)));
data/dzen2-0.9.5~svn271/main.c:109:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(outbuf, rem, strlen(rem));
data/dzen2-0.9.5~svn271/main.c:109: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).
		strncpy(outbuf, rem, strlen(rem));
data/dzen2-0.9.5~svn271/main.c:110:8:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		i += strlen(rem);
data/dzen2-0.9.5~svn271/main.c:151:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	if(!(n = read(STDIN_FILENO, buf, sizeof buf))) {
data/dzen2-0.9.5~svn271/util.c:42:50:  [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).
		eprint("fatal: could not malloc() %u bytes\n", strlen(str));

ANALYSIS SUMMARY:

Hits = 80
Lines analyzed = 3814 in approximately 0.13 seconds (28748 lines/second)
Physical Source Lines of Code (SLOC) = 3118
Hits@level = [0]  52 [1]  34 [2]  42 [3]   1 [4]   3 [5]   0
Hits@level+ = [0+] 132 [1+]  80 [2+]  46 [3+]   4 [4+]   3 [5+]   0
Hits/KSLOC@level+ = [0+] 42.3348 [1+] 25.6575 [2+] 14.753 [3+] 1.28287 [4+] 0.962155 [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.