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/libtwin-13.05.03.15.06-g287d16c/twin_demos/twin_demospline.c
Examining data/libtwin-13.05.03.15.06-g287d16c/twin_demos/twin_demo.h
Examining data/libtwin-13.05.03.15.06-g287d16c/twin_demos/twin_calc.c
Examining data/libtwin-13.05.03.15.06-g287d16c/twin_demos/twin_hello.c
Examining data/libtwin-13.05.03.15.06-g287d16c/twin_demos/xtwin.c
Examining data/libtwin-13.05.03.15.06-g287d16c/twin_demos/twin_demoline.h
Examining data/libtwin-13.05.03.15.06-g287d16c/twin_demos/twin_text.c
Examining data/libtwin-13.05.03.15.06-g287d16c/twin_demos/twin_demoline.c
Examining data/libtwin-13.05.03.15.06-g287d16c/twin_demos/twin_clock.h
Examining data/libtwin-13.05.03.15.06-g287d16c/twin_demos/twin_clock.c
Examining data/libtwin-13.05.03.15.06-g287d16c/twin_demos/twin_demospline.h
Examining data/libtwin-13.05.03.15.06-g287d16c/twin_demos/twin_calc.h
Examining data/libtwin-13.05.03.15.06-g287d16c/twin_demos/twin_demo.c
Examining data/libtwin-13.05.03.15.06-g287d16c/twin_demos/twin_text.h
Examining data/libtwin-13.05.03.15.06-g287d16c/twin_demos/twin_hello.h
Examining data/libtwin-13.05.03.15.06-g287d16c/twin_demos/ftwin.c
Examining data/libtwin-13.05.03.15.06-g287d16c/twin_demos/twinperf.c
Examining data/libtwin-13.05.03.15.06-g287d16c/libtwin/twin_queue.c
Examining data/libtwin-13.05.03.15.06-g287d16c/libtwin/twin_linux_js.c
Examining data/libtwin-13.05.03.15.06-g287d16c/libtwin/twin_linux_mouse.h
Examining data/libtwin-13.05.03.15.06-g287d16c/libtwin/twin_screen.c
Examining data/libtwin-13.05.03.15.06-g287d16c/libtwin/twin_toplevel.c
Examining data/libtwin-13.05.03.15.06-g287d16c/libtwin/twin_feature.c
Examining data/libtwin-13.05.03.15.06-g287d16c/libtwin/twin_geom.c
Examining data/libtwin-13.05.03.15.06-g287d16c/libtwin/twin_timeout.c
Examining data/libtwin-13.05.03.15.06-g287d16c/libtwin/twin_hull.c
Examining data/libtwin-13.05.03.15.06-g287d16c/libtwin/twin_matrix.c
Examining data/libtwin-13.05.03.15.06-g287d16c/libtwin/twin_trig.c
Examining data/libtwin-13.05.03.15.06-g287d16c/libtwin/twinint.h
Examining data/libtwin-13.05.03.15.06-g287d16c/libtwin/twin_pattern.c
Examining data/libtwin-13.05.03.15.06-g287d16c/libtwin/twin_font.c
Examining data/libtwin-13.05.03.15.06-g287d16c/libtwin/twin_x11.c
Examining data/libtwin-13.05.03.15.06-g287d16c/libtwin/twin_linux_mouse.c
Examining data/libtwin-13.05.03.15.06-g287d16c/libtwin/twin_draw.c
Examining data/libtwin-13.05.03.15.06-g287d16c/libtwin/twin_linux_touch.c
Examining data/libtwin-13.05.03.15.06-g287d16c/libtwin/twin_x11.h
Examining data/libtwin-13.05.03.15.06-g287d16c/libtwin/twin_convolve.c
Examining data/libtwin-13.05.03.15.06-g287d16c/libtwin/twin_linux_touch.h
Examining data/libtwin-13.05.03.15.06-g287d16c/libtwin/twin_png.h
Examining data/libtwin-13.05.03.15.06-g287d16c/libtwin/twin_window.c
Examining data/libtwin-13.05.03.15.06-g287d16c/libtwin/twin_icon.c
Examining data/libtwin-13.05.03.15.06-g287d16c/libtwin/twin_primitive.c
Examining data/libtwin-13.05.03.15.06-g287d16c/libtwin/twin_thread.c
Examining data/libtwin-13.05.03.15.06-g287d16c/libtwin/twin_button.c
Examining data/libtwin-13.05.03.15.06-g287d16c/libtwin/twin_font_default.c
Examining data/libtwin-13.05.03.15.06-g287d16c/libtwin/twin_widget.c
Examining data/libtwin-13.05.03.15.06-g287d16c/libtwin/twin_fixed.c
Examining data/libtwin-13.05.03.15.06-g287d16c/libtwin/twin_spline.c
Examining data/libtwin-13.05.03.15.06-g287d16c/libtwin/twin_fbdev.h
Examining data/libtwin-13.05.03.15.06-g287d16c/libtwin/twin_path.c
Examining data/libtwin-13.05.03.15.06-g287d16c/libtwin/twin_file.c
Examining data/libtwin-13.05.03.15.06-g287d16c/libtwin/twin_label.c
Examining data/libtwin-13.05.03.15.06-g287d16c/libtwin/twin_fbdev.c
Examining data/libtwin-13.05.03.15.06-g287d16c/libtwin/twin_cursor.c
Examining data/libtwin-13.05.03.15.06-g287d16c/libtwin/twin_jpeg.h
Examining data/libtwin-13.05.03.15.06-g287d16c/libtwin/twin_dispatch.c
Examining data/libtwin-13.05.03.15.06-g287d16c/libtwin/twin_poly.c
Examining data/libtwin-13.05.03.15.06-g287d16c/libtwin/twin.h
Examining data/libtwin-13.05.03.15.06-g287d16c/libtwin/twin_box.c
Examining data/libtwin-13.05.03.15.06-g287d16c/libtwin/twin_pixmap.c
Examining data/libtwin-13.05.03.15.06-g287d16c/libtwin/twin_jpeg.c
Examining data/libtwin-13.05.03.15.06-g287d16c/libtwin/twin_linux_js.h
Examining data/libtwin-13.05.03.15.06-g287d16c/libtwin/twin_work.c
Examining data/libtwin-13.05.03.15.06-g287d16c/libtwin/twin_png.c
Examining data/libtwin-13.05.03.15.06-g287d16c/twin_fedit/twin-sfit.c
Examining data/libtwin-13.05.03.15.06-g287d16c/twin_fedit/twin-fedit.h
Examining data/libtwin-13.05.03.15.06-g287d16c/twin_fedit/twin-fedit.c
Examining data/libtwin-13.05.03.15.06-g287d16c/twin_ttf/twin_ttf.c
Examining data/libtwin-13.05.03.15.06-g287d16c/twin_ttf/twin_ttf.h

FINAL RESULTS:

data/libtwin-13.05.03.15.06-g287d16c/libtwin/twin_convolve.c:79:22:  [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.
#define DBGOUT(x...)	printf(x)
data/libtwin-13.05.03.15.06-g287d16c/libtwin/twin_fbdev.c:53:29:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
#define SERROR(fmt...)	do { fprintf(stderr, fmt); \
data/libtwin-13.05.03.15.06-g287d16c/libtwin/twin_fbdev.c:56:24:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
#define IERROR(fmt...)	fprintf(stderr, fmt)
data/libtwin-13.05.03.15.06-g287d16c/libtwin/twin_fbdev.c:58: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.
#define DEBUG(fmt...)	printf(fmt)
data/libtwin-13.05.03.15.06-g287d16c/libtwin/twin_fixed.c:27:21:  [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.
#define DBGMSG(x)   printf x
data/libtwin-13.05.03.15.06-g287d16c/libtwin/twin_font.c:29:19:  [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.
#define DBGMSG(x)	printf x
data/libtwin-13.05.03.15.06-g287d16c/libtwin/twin_hull.c:28:19:  [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.
#define DBGMSG(x)	printf x
data/libtwin-13.05.03.15.06-g287d16c/libtwin/twin_jpeg.c:41: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.
#define DEBUG(fmt...)	printf(fmt)
data/libtwin-13.05.03.15.06-g287d16c/libtwin/twin_label.c:115:6:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
	    strcpy (label->label, value);
data/libtwin-13.05.03.15.06-g287d16c/libtwin/twin_linux_js.c:37: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.
#define DEBUG(fmt...)	printf(fmt)
data/libtwin-13.05.03.15.06-g287d16c/libtwin/twin_linux_js.c:109:3:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
		strcat(dev_name, dirent->d_name);
data/libtwin-13.05.03.15.06-g287d16c/libtwin/twin_linux_touch.c:40: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.
#define DEBUG(fmt...)	printf(fmt)
data/libtwin-13.05.03.15.06-g287d16c/libtwin/twin_matrix.c:27:19:  [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.
#define DBGMSG(x) printf x
data/libtwin-13.05.03.15.06-g287d16c/libtwin/twin_png.c:36: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.
#define DEBUG(fmt...)	printf(fmt)
data/libtwin-13.05.03.15.06-g287d16c/libtwin/twin_poly.c:78:22:  [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.
#define DBGOUT(x...)	printf(x)
data/libtwin-13.05.03.15.06-g287d16c/libtwin/twin_trig.c:174:19:  [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.
#define DBGMSG(x) printf x
data/libtwin-13.05.03.15.06-g287d16c/libtwin/twin_window.c:177:23:  [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).
    if (window->name) strcpy (window->name, name);
data/libtwin-13.05.03.15.06-g287d16c/libtwin/twin_cursor.c:47:27:  [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).
#define cursor_open(file) open(file, O_RDONLY)
data/libtwin-13.05.03.15.06-g287d16c/libtwin/twin_fbdev.c:286:11:  [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 events[16];
data/libtwin-13.05.03.15.06-g287d16c/libtwin/twin_fbdev.c:323: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 vtname[16];
data/libtwin-13.05.03.15.06-g287d16c/libtwin/twin_fbdev.c:326: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).
	ttyfd = open("/dev/tty0", O_WRONLY);
data/libtwin-13.05.03.15.06-g287d16c/libtwin/twin_fbdev.c:329:11:  [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).
		ttyfd = open("/dev/vc/0", O_WRONLY);
data/libtwin-13.05.03.15.06-g287d16c/libtwin/twin_fbdev.c:371: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).
       	if ((ttyfd = open("/dev/tty", O_RDWR)) >= 0) {
data/libtwin-13.05.03.15.06-g287d16c/libtwin/twin_fbdev.c:376:2:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
	sprintf(vtname, "/dev/tty%d", tf->vt_no);
data/libtwin-13.05.03.15.06-g287d16c/libtwin/twin_fbdev.c:377:14:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	tf->vt_fd = open(vtname, O_RDWR | O_NONBLOCK);
data/libtwin-13.05.03.15.06-g287d16c/libtwin/twin_fbdev.c:379:3:  [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(vtname, "/dev/vc/%d", tf->vt_no);
data/libtwin-13.05.03.15.06-g287d16c/libtwin/twin_fbdev.c:380: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).
		tf->vt_fd = open(vtname, O_RDWR | O_NONBLOCK);
data/libtwin-13.05.03.15.06-g287d16c/libtwin/twin_fbdev.c:446:14:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	tf->fb_fd = open("/dev/fb0", O_RDWR);
data/libtwin-13.05.03.15.06-g287d16c/libtwin/twin_jpeg.c:80:11:  [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).
	infile = fopen(filepath, "rb");
data/libtwin-13.05.03.15.06-g287d16c/libtwin/twin_jpeg.c:146:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
			memcpy(p.a8, rowbuf, rowstride);
data/libtwin-13.05.03.15.06-g287d16c/libtwin/twin_jpeg.c:182:11:  [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).
	infile = fopen(filepath, "rb");
data/libtwin-13.05.03.15.06-g287d16c/libtwin/twin_linux_js.c:100: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 dev_name[sizeof(dirent->d_name) + 12];
data/libtwin-13.05.03.15.06-g287d16c/libtwin/twin_linux_js.c:108:3:  [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(dev_name, "/dev/input/");
data/libtwin-13.05.03.15.06-g287d16c/libtwin/twin_linux_js.c:111:12:  [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).
		dev_fd = open(dev_name, O_RDONLY | O_NONBLOCK);
data/libtwin-13.05.03.15.06-g287d16c/libtwin/twin_linux_mouse.c:91: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 evts[34];
data/libtwin-13.05.03.15.06-g287d16c/libtwin/twin_linux_mouse.c:97:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy(evts, tm->residual, n);
data/libtwin-13.05.03.15.06-g287d16c/libtwin/twin_linux_mouse.c:134:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy(tm->residual, ep, n);
data/libtwin-13.05.03.15.06-g287d16c/libtwin/twin_linux_mouse.c:157:11:  [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).
	tm->fd = open(file, O_RDONLY);
data/libtwin-13.05.03.15.06-g287d16c/libtwin/twin_linux_mouse.h:36: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		residual[2];
data/libtwin-13.05.03.15.06-g287d16c/libtwin/twin_linux_touch.c:152: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 dev_name[sizeof(dirent->d_name) + sizeof("/dev/input")];
data/libtwin-13.05.03.15.06-g287d16c/libtwin/twin_linux_touch.c:179:11:  [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).
	dev_fd = open(file, O_RDONLY | O_NONBLOCK);
data/libtwin-13.05.03.15.06-g287d16c/libtwin/twin_pattern.c:10: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.
  unsigned char	 pixel_data[8 * 8 * 4];
data/libtwin-13.05.03.15.06-g287d16c/libtwin/twin_png.c:81:7:  [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(filepath, O_RDONLY);
data/libtwin-13.05.03.15.06-g287d16c/libtwin/twin_x11.c:181:31:  [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.
    wm_name.value = (unsigned char *) argv[0];
data/libtwin-13.05.03.15.06-g287d16c/twin_demos/twin_calc.c:104: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    v[20];
data/libtwin-13.05.03.15.06-g287d16c/twin_demos/twin_calc.c:106: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 (v, "%d", calc->stack[0]);
data/libtwin-13.05.03.15.06-g287d16c/twin_demos/twin_clock.c:162:6:  [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		hour[3];
data/libtwin-13.05.03.15.06-g287d16c/twin_demos/twin_clock.c:167:6:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
	    sprintf (hour, "%d", m / 5);
data/libtwin-13.05.03.15.06-g287d16c/twin_demos/twinperf.c:40: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 spc[128];
data/libtwin-13.05.03.15.06-g287d16c/twin_fedit/twin-fedit.c:65:31:  [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.
    wm_name.value = (unsigned char *) argv[0];
data/libtwin-13.05.03.15.06-g287d16c/twin_fedit/twin-fedit.c:202: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    line[1024];
data/libtwin-13.05.03.15.06-g287d16c/twin_fedit/twin-fedit.c:362: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[10];
data/libtwin-13.05.03.15.06-g287d16c/twin_fedit/twin-fedit.c:384:6:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
	    sprintf (buf, "%d", i);
data/libtwin-13.05.03.15.06-g287d16c/twin_fedit/twin-fedit.c:555: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_string[10];
data/libtwin-13.05.03.15.06-g287d16c/twin_ttf/twin_ttf.c:51: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.
static unsigned char * ucs4_to_utf8 (FT_ULong	ucs4,
data/libtwin-13.05.03.15.06-g287d16c/twin_ttf/twin_ttf.c:52:19:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
				     unsigned char dest[8])
data/libtwin-13.05.03.15.06-g287d16c/twin_ttf/twin_ttf.c:75: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   utf8[8];
data/libtwin-13.05.03.15.06-g287d16c/libtwin/twin_cursor.c:48:21:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
#define cursor_read read
data/libtwin-13.05.03.15.06-g287d16c/libtwin/twin_fbdev.c:290:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	count = read(file, events, 16);
data/libtwin-13.05.03.15.06-g287d16c/libtwin/twin_file.c:93:6:  [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 (delay * 1000);
data/libtwin-13.05.03.15.06-g287d16c/libtwin/twin_label.c:108:25:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	char    *new = malloc (strlen (value) + 1);
data/libtwin-13.05.03.15.06-g287d16c/libtwin/twin_linux_js.c:55:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		rc = read(js->fd, &js_event, sizeof(js_event));
data/libtwin-13.05.03.15.06-g287d16c/libtwin/twin_linux_mouse.c:98:7:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	n += read(file, evts + n, 32);
data/libtwin-13.05.03.15.06-g287d16c/libtwin/twin_linux_touch.c:66:7:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	rc = read(touch->fd, &event, sizeof(event));
data/libtwin-13.05.03.15.06-g287d16c/libtwin/twin_png.c:59:6:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	n = read(priv->fd, data, size);
data/libtwin-13.05.03.15.06-g287d16c/libtwin/twin_png.c:87:6:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	n = read(fd, signature, 8);
data/libtwin-13.05.03.15.06-g287d16c/libtwin/twin_toplevel.c:112:51:  [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).
    toplevel = malloc (sizeof (twin_toplevel_t) + strlen (name) + 1);
data/libtwin-13.05.03.15.06-g287d16c/libtwin/twin_window.c:176: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).
    window->name = malloc (strlen (name) + 1);
data/libtwin-13.05.03.15.06-g287d16c/libtwin/twin_x11.c:184: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).
    wm_name.nitems = strlen ((char *)wm_name.value) + 1;
data/libtwin-13.05.03.15.06-g287d16c/twin_demos/twinperf.c:54: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).
	for (i = strlen(name); i <40; i++)
data/libtwin-13.05.03.15.06-g287d16c/twin_fedit/twin-fedit.c:68: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).
    wm_name.nitems = strlen ((char *) wm_name.value) + 1;
data/libtwin-13.05.03.15.06-g287d16c/twin_fedit/twin-fedit.c:217: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).
	    line[strlen(line)-3] = '\0';
data/libtwin-13.05.03.15.06-g287d16c/twin_ttf/twin_ttf.c:190:33:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    char    *name = malloc (1 + strlen (family) + 1 + strlen (style) + 1);
data/libtwin-13.05.03.15.06-g287d16c/twin_ttf/twin_ttf.c:190: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).
    char    *name = malloc (1 + strlen (family) + 1 + strlen (style) + 1);
data/libtwin-13.05.03.15.06-g287d16c/twin_ttf/twin_ttf.c:193:5:  [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 (name, "_");
data/libtwin-13.05.03.15.06-g287d16c/twin_ttf/twin_ttf.c:194: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).
    sanitize (style, name + strlen (name), 0);

ANALYSIS SUMMARY:

Hits = 76
Lines analyzed = 16150 in approximately 0.40 seconds (40252 lines/second)
Physical Source Lines of Code (SLOC) = 11971
Hits@level = [0]  61 [1]  19 [2]  40 [3]   0 [4]  17 [5]   0
Hits@level+ = [0+] 137 [1+]  76 [2+]  57 [3+]  17 [4+]  17 [5+]   0
Hits/KSLOC@level+ = [0+] 11.4443 [1+] 6.34868 [2+] 4.76151 [3+] 1.4201 [4+] 1.4201 [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.