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/wbar-2.3.4/src/core/XWin.h Examining data/wbar-2.3.4/src/core/ImgWrap.h Examining data/wbar-2.3.4/src/core/Bar.cc Examining data/wbar-2.3.4/src/core/SuperIcon.h Examining data/wbar-2.3.4/src/core/Icon.h Examining data/wbar-2.3.4/src/core/SuperIcon.cc Examining data/wbar-2.3.4/src/core/Icon.cc Examining data/wbar-2.3.4/src/core/Bar.h Examining data/wbar-2.3.4/src/core/XWin.cc Examining data/wbar-2.3.4/src/core/SuperBar.cc Examining data/wbar-2.3.4/src/core/SuperBar.h Examining data/wbar-2.3.4/src/core/Main.cc Examining data/wbar-2.3.4/src/config/Functions.h Examining data/wbar-2.3.4/src/config/MainConfig.cc Examining data/wbar-2.3.4/src/config/Run.h Examining data/wbar-2.3.4/src/config/Functions.cc Examining data/wbar-2.3.4/src/config/Run.cc Examining data/wbar-2.3.4/src/utils/App.h Examining data/wbar-2.3.4/src/utils/OptParser.h Examining data/wbar-2.3.4/src/utils/i18n.h Examining data/wbar-2.3.4/src/utils/OptParser.cc Examining data/wbar-2.3.4/src/utils/Utils.h Examining data/wbar-2.3.4/src/utils/Config.cc Examining data/wbar-2.3.4/src/utils/App.cc Examining data/wbar-2.3.4/src/utils/Config.h Examining data/wbar-2.3.4/src/utils/Utils.cc FINAL RESULTS: data/wbar-2.3.4/src/config/Run.cc:35:15: [4] (shell) popen: 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. process = popen(PIDOF_BIN PACKAGE_NAME, "r"); data/wbar-2.3.4/src/config/Run.cc:128: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 ((PACKAGE_NAME" " + command + " &").c_str()) != 0) data/wbar-2.3.4/src/config/Run.cc:139: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. if (system (" killall " PACKAGE_NAME) != 0) data/wbar-2.3.4/src/core/Main.cc:302:33: [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(tmpoptparser.getArgv()[0], tmpoptparser.getArgv()); data/wbar-2.3.4/src/core/Main.cc:306:33: [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(argv[0], argv); data/wbar-2.3.4/src/core/Main.cc:329:30: [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. if (execlp("sh", "sh", "-c", barra->iconCommand(inum).c_str(), NULL) != 0) data/wbar-2.3.4/src/utils/Config.cc:45: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. if (system(command.c_str()) != 0) data/wbar-2.3.4/src/core/SuperBar.cc:25:16: [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. ADD_FONT_PATH(getenv("HOME")); data/wbar-2.3.4/src/utils/Config.cc:33: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. std::string homeDir = getenv("HOME"); data/wbar-2.3.4/src/utils/OptParser.cc:53:13: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. c = getopt_long(argc, argv, "hcv", long_options, &option_index); data/wbar-2.3.4/src/utils/OptParser.cc:76:13: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. c = getopt_long(argc, argv, "hcv", long_options, &option_index); data/wbar-2.3.4/src/config/Functions.cc:267:23: [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. argv = new char * [argc + 1]; data/wbar-2.3.4/src/config/Functions.cc:321:28: [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. argv = new char * [argc + 1]; data/wbar-2.3.4/src/config/Functions.cc:384:66: [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). gtk_spin_button_set_value (GTK_SPIN_BUTTON (spinbutton), atoi(opt.getArg(OptParser::OFFSET).c_str())); data/wbar-2.3.4/src/config/Functions.cc:401:66: [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). gtk_spin_button_set_value (GTK_SPIN_BUTTON (spinbutton), atoi(opt.getArg(OptParser::RSIZE).c_str())); data/wbar-2.3.4/src/config/Functions.cc:408:66: [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). gtk_spin_button_set_value (GTK_SPIN_BUTTON (spinbutton), atoi(opt.getArg(OptParser::ISIZE).c_str())); data/wbar-2.3.4/src/config/Functions.cc:415:66: [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). gtk_spin_button_set_value (GTK_SPIN_BUTTON (spinbutton), atoi(opt.getArg(OptParser::IDIST).c_str())); data/wbar-2.3.4/src/config/Functions.cc:422:66: [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). gtk_spin_button_set_value (GTK_SPIN_BUTTON (spinbutton), atoi(opt.getArg(OptParser::NANIM).c_str())); data/wbar-2.3.4/src/config/Functions.cc:443:66: [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). gtk_spin_button_set_value (GTK_SPIN_BUTTON (spinbutton), atoi(opt.getArg(OptParser::DBLCLK).c_str())); data/wbar-2.3.4/src/config/Functions.cc:450:66: [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). gtk_spin_button_set_value (GTK_SPIN_BUTTON (spinbutton), atoi(opt.getArg(OptParser::BALFA).c_str())); data/wbar-2.3.4/src/config/Functions.cc:457:66: [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). gtk_spin_button_set_value (GTK_SPIN_BUTTON (spinbutton), atoi(opt.getArg(OptParser::FALFA).c_str())); data/wbar-2.3.4/src/config/Functions.cc:910: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 text[10]; data/wbar-2.3.4/src/config/Functions.cc:913: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(text, " %d", (int)gtk_spin_button_get_value (GTK_SPIN_BUTTON (spinbutton))); data/wbar-2.3.4/src/config/Functions.cc:935: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 text[10]; data/wbar-2.3.4/src/config/Functions.cc:938: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(text, " %d", (int)gtk_spin_button_get_value (GTK_SPIN_BUTTON (spinbutton))); data/wbar-2.3.4/src/config/Functions.cc:946: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 text[10]; data/wbar-2.3.4/src/config/Functions.cc:949: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(text, " %d", (int)gtk_spin_button_get_value (GTK_SPIN_BUTTON (spinbutton))); data/wbar-2.3.4/src/config/Functions.cc:957: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 text[10]; data/wbar-2.3.4/src/config/Functions.cc:960: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(text, " %d", (int)gtk_spin_button_get_value (GTK_SPIN_BUTTON (spinbutton))); data/wbar-2.3.4/src/config/Functions.cc:968: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 text[10]; data/wbar-2.3.4/src/config/Functions.cc:971: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(text, " %d", (int)gtk_spin_button_get_value (GTK_SPIN_BUTTON (spinbutton))); data/wbar-2.3.4/src/config/Functions.cc:979: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 text[10]; data/wbar-2.3.4/src/config/Functions.cc:982: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(text, " %f", (float)gtk_spin_button_get_value (GTK_SPIN_BUTTON (spinbutton))); data/wbar-2.3.4/src/config/Functions.cc:990: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 text[10]; data/wbar-2.3.4/src/config/Functions.cc:993: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(text, " %f", (float)gtk_spin_button_get_value (GTK_SPIN_BUTTON (spinbutton))); data/wbar-2.3.4/src/config/Functions.cc:1001: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 text[10]; data/wbar-2.3.4/src/config/Functions.cc:1004: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(text, " %d", (int)gtk_spin_button_get_value (GTK_SPIN_BUTTON (spinbutton))); data/wbar-2.3.4/src/config/Functions.cc:1012: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 text[10]; data/wbar-2.3.4/src/config/Functions.cc:1015: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(text, " %d", (int)gtk_spin_button_get_value (GTK_SPIN_BUTTON (spinbutton))); data/wbar-2.3.4/src/config/Functions.cc:1023: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 text[10]; data/wbar-2.3.4/src/config/Functions.cc:1026: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(text, " %d", (int)gtk_spin_button_get_value (GTK_SPIN_BUTTON (spinbutton))); data/wbar-2.3.4/src/config/Run.cc:39: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 spid[50]; data/wbar-2.3.4/src/config/Run.cc:42: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). pid = atoi(spid); data/wbar-2.3.4/src/config/Run.cc:59: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 data[512]; data/wbar-2.3.4/src/config/Run.cc:62: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 (data, "/proc/%d/cmdline", pid); data/wbar-2.3.4/src/config/Run.cc:67: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 c[2]; data/wbar-2.3.4/src/config/Run.cc:85:27: [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. argv = new char * [argc + 1]; data/wbar-2.3.4/src/core/Main.cc:97:28: [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. argv = new char * [argc + 1]; data/wbar-2.3.4/src/core/Main.cc:183:56: [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). dblclk_tm = optparser.isSet(OptParser::DBLCLK)?atoi(optparser.getArg(OptParser::DBLCLK).c_str()):0; data/wbar-2.3.4/src/core/Main.cc:191:55: [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). refl_size = optparser.isSet(OptParser::RSIZE)?atoi(optparser.getArg(OptParser::RSIZE).c_str()):0; data/wbar-2.3.4/src/core/Main.cc:198:55: [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). optparser.isSet(OptParser::ISIZE)?atoi(optparser.getArg(OptParser::ISIZE).c_str()):32, data/wbar-2.3.4/src/core/Main.cc:199:55: [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). optparser.isSet(OptParser::IDIST)?atoi(optparser.getArg(OptParser::IDIST).c_str()):1, data/wbar-2.3.4/src/core/Main.cc:204:55: [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). optparser.isSet(OptParser::NANIM)?atoi(optparser.getArg(OptParser::NANIM).c_str()):5, data/wbar-2.3.4/src/core/Main.cc:205:55: [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). optparser.isSet(OptParser::BALFA)?atoi(optparser.getArg(OptParser::BALFA).c_str()):-1, data/wbar-2.3.4/src/core/Main.cc:206:55: [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). optparser.isSet(OptParser::FALFA)?atoi(optparser.getArg(OptParser::FALFA).c_str()):-1, data/wbar-2.3.4/src/core/Main.cc:207:56: [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). optparser.isSet(OptParser::FILTER)?atoi(optparser.getArg(OptParser::FILTER).c_str()):0, data/wbar-2.3.4/src/core/Main.cc:210:56: [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). optparser.isSet(OptParser::OFFSET)?atoi(optparser.getArg(OptParser::OFFSET).c_str()):0, data/wbar-2.3.4/src/core/Main.cc:216:55: [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). optparser.isSet(OptParser::ISIZE)?atoi(optparser.getArg(OptParser::ISIZE).c_str()):32, data/wbar-2.3.4/src/core/Main.cc:217:55: [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). optparser.isSet(OptParser::IDIST)?atoi(optparser.getArg(OptParser::IDIST).c_str()):1, data/wbar-2.3.4/src/core/Main.cc:222:55: [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). optparser.isSet(OptParser::NANIM)?atoi(optparser.getArg(OptParser::NANIM).c_str()):5, data/wbar-2.3.4/src/core/Main.cc:223:56: [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). optparser.isSet(OptParser::OFFSET)?atoi(optparser.getArg(OptParser::OFFSET).c_str()):0, data/wbar-2.3.4/src/utils/Config.cc:71: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 buffer[256]; data/wbar-2.3.4/src/config/Run.cc:71:22: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). file.read (c,1); ANALYSIS SUMMARY: Hits = 63 Lines analyzed = 4651 in approximately 0.12 seconds (40285 lines/second) Physical Source Lines of Code (SLOC) = 3577 Hits@level = [0] 0 [1] 1 [2] 51 [3] 4 [4] 7 [5] 0 Hits@level+ = [0+] 63 [1+] 63 [2+] 62 [3+] 11 [4+] 7 [5+] 0 Hits/KSLOC@level+ = [0+] 17.6125 [1+] 17.6125 [2+] 17.333 [3+] 3.0752 [4+] 1.95695 [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.