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/gmrun-0.9.2/src/history.h
Examining data/gmrun-0.9.2/src/main.h
Examining data/gmrun-0.9.2/src/prefs.h
Examining data/gmrun-0.9.2/src/ci_string.h
Examining data/gmrun-0.9.2/src/history.cc
Examining data/gmrun-0.9.2/src/main.cc
Examining data/gmrun-0.9.2/src/gtkcompletionline.h
Examining data/gmrun-0.9.2/src/gtkcompletionline.cc
Examining data/gmrun-0.9.2/src/prefs.cc
Examining data/gmrun-0.9.2/acconfig.h

FINAL RESULTS:

data/gmrun-0.9.2/src/main.cc:123:13:  [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.
  int ret = system(cmd.c_str());
data/gmrun-0.9.2/src/main.cc:247:3:  [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(prog.c_str(), (char**)&(*argv.begin()));
data/gmrun-0.9.2/src/gtkcompletionline.cc:331: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.
  const char *path_cstr = (char*)getenv("PATH");
data/gmrun-0.9.2/src/gtkcompletionline.cc:536:21:  [3] (buffer) g_get_home_dir:
  This function is synonymous with 'getenv("HOME")';it returns untrustable
  input if the environment can beset by an attacker. It 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.
      string home = g_get_home_dir();
data/gmrun-0.9.2/src/history.cc:27:16:  [3] (buffer) g_get_home_dir:
  This function is synonymous with 'getenv("HOME")';it returns untrustable
  input if the environment can beset by an attacker. It 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.
  m_filename = g_get_home_dir();
data/gmrun-0.9.2/src/prefs.cc:38: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.
  const char *home_cstr = getenv("HOME");
data/gmrun-0.9.2/src/gtkcompletionline.cc:700: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.
          char *tmp[2];
data/gmrun-0.9.2/src/main.cc:219: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, tmp.c_str(), tmp.length() + 1);
data/gmrun-0.9.2/src/main.cc:639: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 geo_option[30] = "";
data/gmrun-0.9.2/src/prefs.cc:102: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[0x100];
data/gmrun-0.9.2/src/prefs.cc:103: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[0x100];
data/gmrun-0.9.2/src/gtkcompletionline.cc:220: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).
    gtk_entry_select_region(GTK_ENTRY(object), 0, strlen(txt));
data/gmrun-0.9.2/src/gtkcompletionline.cc:355:13:  [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(dent->d_name);
data/gmrun-0.9.2/src/main.cc:674:53:  [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).
    gtk_entry_select_region(GTK_ENTRY(compline), 0, strlen(gtk_entry_get_text(GTK_ENTRY(compline))));

ANALYSIS SUMMARY:

Hits = 14
Lines analyzed = 2467 in approximately 0.07 seconds (34877 lines/second)
Physical Source Lines of Code (SLOC) = 1931
Hits@level = [0]   2 [1]   3 [2]   5 [3]   4 [4]   2 [5]   0
Hits@level+ = [0+]  16 [1+]  14 [2+]  11 [3+]   6 [4+]   2 [5+]   0
Hits/KSLOC@level+ = [0+] 8.28586 [1+] 7.25013 [2+] 5.69653 [3+] 3.1072 [4+] 1.03573 [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.