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/matchbox-panel-0.9.3+git20100816/src/msg.c
Examining data/matchbox-panel-0.9.3+git20100816/src/panel_util.c
Examining data/matchbox-panel-0.9.3+git20100816/src/panel_app.h
Examining data/matchbox-panel-0.9.3+git20100816/src/session.c
Examining data/matchbox-panel-0.9.3+git20100816/src/session.h
Examining data/matchbox-panel-0.9.3+git20100816/src/panel_menu.c
Examining data/matchbox-panel-0.9.3+git20100816/src/panel_menu.h
Examining data/matchbox-panel-0.9.3+git20100816/src/panel.h
Examining data/matchbox-panel-0.9.3+git20100816/src/panel_util.h
Examining data/matchbox-panel-0.9.3+git20100816/src/msg.h
Examining data/matchbox-panel-0.9.3+git20100816/src/panel_app.c
Examining data/matchbox-panel-0.9.3+git20100816/src/panel.c
Examining data/matchbox-panel-0.9.3+git20100816/applets/mb-applet-menu-launcher.c
Examining data/matchbox-panel-0.9.3+git20100816/applets/mb-applet-clock.c
Examining data/matchbox-panel-0.9.3+git20100816/applets/mb-applet-system-monitor.c
Examining data/matchbox-panel-0.9.3+git20100816/applets/mb-applet-wireless.c
Examining data/matchbox-panel-0.9.3+git20100816/applets/mb-applet-launcher.c
Examining data/matchbox-panel-0.9.3+git20100816/applets/mb-applet-battery.c

FINAL RESULTS:

data/matchbox-panel-0.9.3+git20100816/applets/mb-applet-clock.c:272:7:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
      sprintf(theme_desktop_path, "%s/theme.desktop", theme_path);
data/matchbox-panel-0.9.3+git20100816/applets/mb-applet-launcher.c:139:7:  [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(cmd, args[i]);
data/matchbox-panel-0.9.3+git20100816/applets/mb-applet-launcher.c:180:14:  [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.
  if ((ptr = popen(args, "r")) != NULL)
data/matchbox-panel-0.9.3+git20100816/applets/mb-applet-launcher.c:186:4:  [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(msg, buf);
data/matchbox-panel-0.9.3+git20100816/applets/mb-applet-launcher.c:640:7:  [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(win_panel_title, argv[1+switch_count]);
data/matchbox-panel-0.9.3+git20100816/applets/mb-applet-menu-launcher.c:130:28:  [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 DBG(txt, args... ) fprintf(stderr, "DEBUG: " txt , ##args )
data/matchbox-panel-0.9.3+git20100816/applets/mb-applet-menu-launcher.c:314:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	   sprintf(tmpstr, "Other/%s", tmp_section);
data/matchbox-panel-0.9.3+git20100816/applets/mb-applet-menu-launcher.c:417:7:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
      snprintf(vfolder_path_root, 512, PKGDATADIR "/vfolders/Root.directory");
data/matchbox-panel-0.9.3+git20100816/applets/mb-applet-menu-launcher.c:418:7:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
      snprintf(vfolder_path, 512, PKGDATADIR "/vfolders" );
data/matchbox-panel-0.9.3+git20100816/applets/mb-applet-menu-launcher.c:654:7:  [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(dirs[1], (char *)getenv("HOME"));
data/matchbox-panel-0.9.3+git20100816/src/panel.c:278:4:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	  sprintf(tmp_path, "%s/%s", panel->theme_path, bg_spec);
data/matchbox-panel-0.9.3+git20100816/src/panel.c:505:7:  [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(panel_cfg, value);
data/matchbox-panel-0.9.3+git20100816/src/panel.h:36:28:  [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 DBG(txt, args... ) fprintf(stderr, "MB-PANEL-DEBUG: " txt , ##args )
data/matchbox-panel-0.9.3+git20100816/src/panel_util.c:137:4:  [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(cmd, argv_win[0]);
data/matchbox-panel-0.9.3+git20100816/applets/mb-applet-menu-launcher.c:412:77:  [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.
  snprintf( vfolder_path_root, 512, "%s/.matchbox/vfolders/Root.directory", getenv("HOME"));
data/matchbox-panel-0.9.3+git20100816/applets/mb-applet-menu-launcher.c:413:57:  [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.
  snprintf( vfolder_path, 512, "%s/.matchbox/vfolders", getenv("HOME"));
data/matchbox-panel-0.9.3+git20100816/applets/mb-applet-menu-launcher.c:486:51:  [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.
  snprintf(app_paths[3], 256, "%s/.applications", getenv("HOME"));
data/matchbox-panel-0.9.3+git20100816/applets/mb-applet-menu-launcher.c:654:31:  [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.
      strcpy(dirs[1], (char *)getenv("HOME"));
data/matchbox-panel-0.9.3+git20100816/applets/mb-applet-menu-launcher.c:952:7:  [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 (getenv("MB_USE_DEB_MENUS"))
data/matchbox-panel-0.9.3+git20100816/src/panel.c:1568:32:  [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.
  char *display_name = (char *)getenv("DISPLAY");
data/matchbox-panel-0.9.3+git20100816/src/panel.c:1751:8:  [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 (getenv("MB_SYNC")) 
data/matchbox-panel-0.9.3+git20100816/src/panel.c:1944:11:  [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 (getenv("MB_PANEL_NO_DESKTOP_HIDE")) n_states = 2;
data/matchbox-panel-0.9.3+git20100816/src/session.c:20:54:  [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.
    snprintf(sessionfile, 512, "%s/.matchbox/%s.%i", getenv("HOME"), 
data/matchbox-panel-0.9.3+git20100816/src/session.c:24:7:  [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.
	     getenv("HOME"), PANELFILE );   
data/matchbox-panel-0.9.3+git20100816/src/session.c:50:7:  [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 (getenv("HOME") == NULL)
data/matchbox-panel-0.9.3+git20100816/src/session.c:57:46:  [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.
  snprintf(sessionfile, 512, "%s/.matchbox", getenv("HOME"));
data/matchbox-panel-0.9.3+git20100816/src/session.c:80:51:  [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.
	snprintf(sessionfile, 512, "%s/.matchbox/%s.%i", getenv("HOME"), 
data/matchbox-panel-0.9.3+git20100816/src/session.c:84:4:  [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.
		 getenv("HOME"), PANELFILE );   
data/matchbox-panel-0.9.3+git20100816/src/session.c:126:7:  [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 (getenv("HOME") == NULL)
data/matchbox-panel-0.9.3+git20100816/src/session.c:133:54:  [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.
    snprintf(sessionfile, 255, "%s/.matchbox/%s.%i", getenv("HOME"), 
data/matchbox-panel-0.9.3+git20100816/src/session.c:137:7:  [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.
	     getenv("HOME"), PANELFILE );   
data/matchbox-panel-0.9.3+git20100816/applets/mb-applet-battery.c:205: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 line[1024];
data/matchbox-panel-0.9.3+git20100816/applets/mb-applet-battery.c:211:6:  [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).
	f = fopen(ACPI_PREFIX "/" AC_PREFIX "/state", "r");
data/matchbox-panel-0.9.3+git20100816/applets/mb-applet-battery.c:228:6:  [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).
	f = fopen(ACPI_PREFIX "/" BAT_PREFIX "/info", "r");
data/matchbox-panel-0.9.3+git20100816/applets/mb-applet-battery.c:239:6:  [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).
	f = fopen(ACPI_PREFIX "/" BAT_PREFIX "/state", "r");
data/matchbox-panel-0.9.3+git20100816/applets/mb-applet-battery.c:331:8:  [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(APMDEV, O_RDONLY);
data/matchbox-panel-0.9.3+git20100816/applets/mb-applet-battery.c:448: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 tray_msg[256];
data/matchbox-panel-0.9.3+git20100816/applets/mb-applet-battery.c:449: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(tray_msg, 
data/matchbox-panel-0.9.3+git20100816/applets/mb-applet-battery.c:540: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 tray_msg[256];
data/matchbox-panel-0.9.3+git20100816/applets/mb-applet-battery.c:548: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(tray_msg, _("AC Connected\nCharging: %.2i %%\n")
data/matchbox-panel-0.9.3+git20100816/applets/mb-applet-battery.c:551: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(tray_msg, _("AC Connected\nFully charged.\n"));
data/matchbox-panel-0.9.3+git20100816/applets/mb-applet-battery.c:558:8:  [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(tray_msg, 
data/matchbox-panel-0.9.3+git20100816/applets/mb-applet-battery.c:563:8:  [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(tray_msg, 
data/matchbox-panel-0.9.3+git20100816/applets/mb-applet-battery.c:568:12:  [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.
      else sprintf(tray_msg, _("Battery Power\n Device read error.\n"));
data/matchbox-panel-0.9.3+git20100816/applets/mb-applet-clock.c:137: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             timestr[6] = { 0 };
data/matchbox-panel-0.9.3+git20100816/applets/mb-applet-clock.c:231:7:  [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];
data/matchbox-panel-0.9.3+git20100816/applets/mb-applet-launcher.c:175: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 buf[256];
data/matchbox-panel-0.9.3+git20100816/applets/mb-applet-launcher.c:176: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 msg[MAX_MESSAGE_BYTES] = "";
data/matchbox-panel-0.9.3+git20100816/applets/mb-applet-launcher.c:461: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 png_path[256]    = { 0 };
data/matchbox-panel-0.9.3+git20100816/applets/mb-applet-launcher.c:641:7:  [2] (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 string.
      strcat(win_panel_title, " Launcher");
data/matchbox-panel-0.9.3+git20100816/applets/mb-applet-menu-launcher.c:389: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 orig_wd[MAXPATHLEN];
data/matchbox-panel-0.9.3+git20100816/applets/mb-applet-menu-launcher.c:391: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 dirs[2][256] = { MENUDIR };
data/matchbox-panel-0.9.3+git20100816/applets/mb-applet-menu-launcher.c:398: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 vfolder_path_root[512];
data/matchbox-panel-0.9.3+git20100816/applets/mb-applet-menu-launcher.c:399: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 vfolder_path[512];
data/matchbox-panel-0.9.3+git20100816/applets/mb-applet-menu-launcher.c:406: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                     app_paths[APP_PATHS_N][256];
data/matchbox-panel-0.9.3+git20100816/applets/mb-applet-menu-launcher.c:655:7:  [2] (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 string.
      strcat(dirs[1], "/.menu");
data/matchbox-panel-0.9.3+git20100816/applets/mb-applet-menu-launcher.c:673:10:  [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).
		  fp = fopen(dir_entry->d_name, "r");
data/matchbox-panel-0.9.3+git20100816/applets/mb-applet-menu-launcher.c:1007:9:  [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(DD_DIR, O_RDONLY);
data/matchbox-panel-0.9.3+git20100816/applets/mb-applet-system-monitor.c:74:18:  [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 ((version = fopen("/proc/version", "r")) == NULL)
data/matchbox-panel-0.9.3+git20100816/applets/mb-applet-system-monitor.c:94:17:  [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 ((stat = fopen("/proc/stat", "r")) == NULL)
data/matchbox-panel-0.9.3+git20100816/applets/mb-applet-system-monitor.c:137:10:  [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 char not_needed[2048];
data/matchbox-panel-0.9.3+git20100816/applets/mb-applet-system-monitor.c:141:18:  [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 ((mem = fopen("/proc/meminfo", "r")) == NULL) 
data/matchbox-panel-0.9.3+git20100816/applets/mb-applet-system-monitor.c:287: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 tray_msg[256];
data/matchbox-panel-0.9.3+git20100816/applets/mb-applet-system-monitor.c:293: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(tray_msg, _("CPU: %i %%, MEMORY: %i %%\n"),cpu, msd.mem_percent);
data/matchbox-panel-0.9.3+git20100816/applets/mb-applet-wireless.c:75:8:  [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 char *ImgLookup[64] = {
data/matchbox-panel-0.9.3+git20100816/applets/mb-applet-wireless.c:136:37:  [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.
  Mwd.mode  = ( WInfo.b.has_mode ? (char *)iw_operation_mode[WInfo.b.mode] : NULL );
data/matchbox-panel-0.9.3+git20100816/applets/mb-applet-wireless.c:285: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 tray_msg[256];
data/matchbox-panel-0.9.3+git20100816/applets/mb-applet-wireless.c:286: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 quality[10];
data/matchbox-panel-0.9.3+git20100816/applets/mb-applet-wireless.c:287: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 level[10];
data/matchbox-panel-0.9.3+git20100816/applets/mb-applet-wireless.c:288: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 noise[10];
data/matchbox-panel-0.9.3+git20100816/src/msg.c:130:6:  [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(&m->data[m->current_msg_length],e->data.b,sizeof(char)*20);
data/matchbox-panel-0.9.3+git20100816/src/msg.c:133:6:  [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(&m->data[m->current_msg_length],e->data.b,
data/matchbox-panel-0.9.3+git20100816/src/panel.c:260: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 xprop_def[32] = { 0 };
data/matchbox-panel-0.9.3+git20100816/src/panel.c:389:31:  [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 (bg_spec) trans_level = atoi(bg_spec);
data/matchbox-panel-0.9.3+git20100816/src/panel.c:475: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 panel_cfg[256];
data/matchbox-panel-0.9.3+git20100816/src/panel.c:506:7:  [2] (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 string.
      strcat(panel_cfg, "/theme.desktop");
data/matchbox-panel-0.9.3+git20100816/src/panel.c:1570: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 tray_atom_spec[128] = { 0 }; 
data/matchbox-panel-0.9.3+git20100816/src/panel.c:1571: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 tray_id_env_str[16] = { 0 };
data/matchbox-panel-0.9.3+git20100816/src/panel.c:1579: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 win_name[64] = { 0 };
data/matchbox-panel-0.9.3+git20100816/src/panel.c:1677:35:  [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).
      panel->default_panel_size = atoi(argv[i]);
data/matchbox-panel-0.9.3+git20100816/src/panel.c:1683:24:  [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).
      panel->padding = atoi(argv[i]);
data/matchbox-panel-0.9.3+git20100816/src/panel.c:1700:29:  [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).
      panel->margin_sides = atoi(argv[i]);
data/matchbox-panel-0.9.3+git20100816/src/panel.c:1705:30:  [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).
	  panel->margin_topbottom = atoi(p);
data/matchbox-panel-0.9.3+git20100816/src/panel.c:1723:31:  [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).
      panel->system_tray_id = atoi(argv[i]);
data/matchbox-panel-0.9.3+git20100816/src/panel.h:255: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                    session_entry_cur[512];
data/matchbox-panel-0.9.3+git20100816/src/panel_menu.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 orig_wd[MAXPATHLEN] = { 0 };
data/matchbox-panel-0.9.3+git20100816/src/panel_menu.c:225: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 launcher_exec_str[256] = { 0 };
data/matchbox-panel-0.9.3+git20100816/src/panel_util.c:30: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 msg[255];
data/matchbox-panel-0.9.3+git20100816/src/session.c:15: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 sessionfile[512] = { 0 };
data/matchbox-panel-0.9.3+git20100816/src/session.c:32: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 sessionfile[512] = { 0 };
data/matchbox-panel-0.9.3+git20100816/src/session.c:86:32:  [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 ((panel->session_fp = fopen(sessionfile, "r")) == NULL)
data/matchbox-panel-0.9.3+git20100816/src/session.c:139:28:  [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 ((panel->session_fp = fopen(sessionfile, "w")) == NULL)
data/matchbox-panel-0.9.3+git20100816/src/session.c:334:33:  [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).
	  panel->session_init_offset = atoi(tmp);
data/matchbox-panel-0.9.3+git20100816/applets/mb-applet-battery.c:378:5:  [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(50000L);
data/matchbox-panel-0.9.3+git20100816/applets/mb-applet-clock.c:270: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).
      char *theme_desktop_path = alloca(strlen(theme_path)+15);
data/matchbox-panel-0.9.3+git20100816/applets/mb-applet-launcher.c:127:19:  [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).
      n_bytes += (strlen(args[i]) + 2);
data/matchbox-panel-0.9.3+git20100816/applets/mb-applet-launcher.c:140:7:  [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(cmd, " ");
data/matchbox-panel-0.9.3+git20100816/applets/mb-applet-launcher.c:184: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).
	  bytes += strlen(buf);
data/matchbox-panel-0.9.3+git20100816/applets/mb-applet-launcher.c:638: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).
      win_panel_title = malloc( strlen(argv[1+switch_count]) +
data/matchbox-panel-0.9.3+git20100816/applets/mb-applet-launcher.c:639:5:  [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).
				strlen(" Launcher") + 1 ); 
data/matchbox-panel-0.9.3+git20100816/applets/mb-applet-menu-launcher.c:312: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).
	     (char *)malloc(sizeof(char)*(strlen(tmp_section)+
data/matchbox-panel-0.9.3+git20100816/applets/mb-applet-menu-launcher.c:313: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).
					  strlen(tmp_title)+12));
data/matchbox-panel-0.9.3+git20100816/applets/mb-applet-menu-launcher.c:507: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 (strcmp(dir_entry->d_name+strlen(dir_entry->d_name)-8,".desktop"))
data/matchbox-panel-0.9.3+git20100816/applets/mb-applet-wireless.c:295:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120). Risk is low because the source is a
  constant string.
  	strncpy (quality, "Unknown", 10);
data/matchbox-panel-0.9.3+git20100816/applets/mb-applet-wireless.c:299:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120). Risk is low because the source is a
  constant string.
  	strncpy (level, "Unknown", 10);
data/matchbox-panel-0.9.3+git20100816/applets/mb-applet-wireless.c:303:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120). Risk is low because the source is a
  constant string.
  	strncpy (noise, "Unknown", 10);
data/matchbox-panel-0.9.3+git20100816/src/msg.c:506:10:  [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).
						   strlen((char*)msg->extra_context_data),
data/matchbox-panel-0.9.3+git20100816/src/msg.c:681: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).
				      m->sender->name, strlen((char*)m->sender->name),
data/matchbox-panel-0.9.3+git20100816/src/msg.c:691: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).
					     strlen((char*)m->extra_context_data),
data/matchbox-panel-0.9.3+git20100816/src/panel.c:72: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 (setting->data.v_string && strlen(setting->data.v_string))
data/matchbox-panel-0.9.3+git20100816/src/panel.c:277:39:  [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).
	  tmp_path = alloca( sizeof(char) * (strlen(panel->theme_path) + strlen(bg_spec) + 2));
data/matchbox-panel-0.9.3+git20100816/src/panel.c:277:67:  [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).
	  tmp_path = alloca( sizeof(char) * (strlen(panel->theme_path) + strlen(bg_spec) + 2));
data/matchbox-panel-0.9.3+git20100816/src/panel.c:456:9:  [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).
		      strlen(xprop_def));
data/matchbox-panel-0.9.3+git20100816/src/panel_menu.c:193: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 (strcmp(dir_entry->d_name+strlen(dir_entry->d_name)-8,".desktop"))
data/matchbox-panel-0.9.3+git20100816/src/panel_util.c:124:19:  [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).
   bytes_needed = strlen(argv_win[0])+2;
data/matchbox-panel-0.9.3+git20100816/src/panel_util.c:128: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).
     bytes_needed += strlen(argv_win[i])+2;
data/matchbox-panel-0.9.3+git20100816/src/session.c:225:10:  [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).
			      strlen(win_cmd)))
data/matchbox-panel-0.9.3+git20100816/src/session.c:301:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	  strncpy(panel->session_entry_cur, prev_pos, 512);
data/matchbox-panel-0.9.3+git20100816/src/session.c:329: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 ( panel->session_entry_cur[strlen(panel->session_entry_cur)-1] == '\n')
data/matchbox-panel-0.9.3+git20100816/src/session.c:330:27:  [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).
	panel->session_entry_cur[strlen(panel->session_entry_cur)-1] = '\0';

ANALYSIS SUMMARY:

Hits = 120
Lines analyzed = 8422 in approximately 0.19 seconds (45102 lines/second)
Physical Source Lines of Code (SLOC) = 6339
Hits@level = [0] 113 [1]  27 [2]  62 [3]  17 [4]  14 [5]   0
Hits@level+ = [0+] 233 [1+] 120 [2+]  93 [3+]  31 [4+]  14 [5+]   0
Hits/KSLOC@level+ = [0+] 36.7566 [1+] 18.9304 [2+] 14.6711 [3+] 4.89036 [4+] 2.20855 [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.