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/cog-0.8.0/cogctl.c
Examining data/cog-0.8.0/core/cog-directory-files-handler.c
Examining data/cog-0.8.0/core/cog-directory-files-handler.h
Examining data/cog-0.8.0/core/cog-gtk-utils.c
Examining data/cog-0.8.0/core/cog-gtk-utils.h
Examining data/cog-0.8.0/core/cog-launcher.c
Examining data/cog-0.8.0/core/cog-launcher.h
Examining data/cog-0.8.0/core/cog-platform.c
Examining data/cog-0.8.0/core/cog-platform.h
Examining data/cog-0.8.0/core/cog-request-handler.c
Examining data/cog-0.8.0/core/cog-request-handler.h
Examining data/cog-0.8.0/core/cog-shell.c
Examining data/cog-0.8.0/core/cog-shell.h
Examining data/cog-0.8.0/core/cog-utils.c
Examining data/cog-0.8.0/core/cog-utils.h
Examining data/cog-0.8.0/core/cog-webkit-utils.c
Examining data/cog-0.8.0/core/cog-webkit-utils.h
Examining data/cog-0.8.0/core/cog.h
Examining data/cog-0.8.0/platform/cog-im-context-fdo-v1.c
Examining data/cog-0.8.0/platform/cog-im-context-fdo-v1.h
Examining data/cog-0.8.0/platform/cog-im-context-fdo.c
Examining data/cog-0.8.0/platform/cog-im-context-fdo.h
Examining data/cog-0.8.0/platform/cog-platform-drm.c
Examining data/cog-0.8.0/platform/cog-platform-fdo.c
Examining data/cog-0.8.0/platform/cog-popup-menu-fdo.c
Examining data/cog-0.8.0/platform/cog-popup-menu-fdo.h
Examining data/cog-0.8.0/platform/os-compatibility.c
Examining data/cog-0.8.0/platform/os-compatibility.h
Examining data/cog-0.8.0/cog.c

FINAL RESULTS:

data/cog-0.8.0/platform/os-compatibility.c:145:3:  [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(name, path);
data/cog-0.8.0/platform/os-compatibility.c:146: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(name, template);
data/cog-0.8.0/platform/os-compatibility.c:135:10:  [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("XDG_RUNTIME_DIR");
data/cog-0.8.0/platform/cog-platform-drm.c:177:23:  [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).
        drm_data.fd = open (device->nodes[DRM_NODE_PRIMARY], O_RDWR);
data/cog-0.8.0/platform/cog-platform-drm.c:531: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).
    return open (path, flags);
data/cog-0.8.0/platform/cog-platform-fdo.c:1260: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 (&wl_data.touch.points[id],
data/cog-0.8.0/platform/cog-platform-fdo.c:1322: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 (&wl_data.touch.points[id],
data/cog-0.8.0/platform/cog-platform-fdo.c:1360: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 (&wl_data.touch.points[id],
data/cog-0.8.0/platform/os-compatibility.c:75:7:  [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).
	fd = mkstemp(tmpname);
data/cog-0.8.0/platform/cog-im-context-fdo-v1.c:68:20:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    unsigned len = strlen (text);
data/cog-0.8.0/platform/cog-im-context-fdo-v1.c:294:14:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        p += strlen (p) + 1;
data/cog-0.8.0/platform/cog-im-context-fdo.c:64: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).
    int len = strlen (text);
data/cog-0.8.0/platform/os-compatibility.c:141: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).
		name = malloc(strlen(path) + sizeof(template));

ANALYSIS SUMMARY:

Hits = 13
Lines analyzed = 8796 in approximately 0.21 seconds (42292 lines/second)
Physical Source Lines of Code (SLOC) = 6884
Hits@level = [0]   0 [1]   4 [2]   6 [3]   1 [4]   2 [5]   0
Hits@level+ = [0+]  13 [1+]  13 [2+]   9 [3+]   3 [4+]   2 [5+]   0
Hits/KSLOC@level+ = [0+] 1.88844 [1+] 1.88844 [2+] 1.30738 [3+] 0.435793 [4+] 0.290529 [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.