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/xdaliclock-2.44+debian/X11/usleep.h
Examining data/xdaliclock-2.44+debian/X11/xdaliclock.h
Examining data/xdaliclock-2.44+debian/X11/vroot.h
Examining data/xdaliclock-2.44+debian/X11/resources.c
Examining data/xdaliclock-2.44+debian/X11/visual.c
Examining data/xdaliclock-2.44+debian/X11/hsv.c
Examining data/xdaliclock-2.44+debian/X11/resources.h
Examining data/xdaliclock-2.44+debian/X11/usleep.c
Examining data/xdaliclock-2.44+debian/X11/XDaliClock_ad.h
Examining data/xdaliclock-2.44+debian/X11/colors.c
Examining data/xdaliclock-2.44+debian/X11/xdaliclock.c
Examining data/xdaliclock-2.44+debian/X11/visual.h
Examining data/xdaliclock-2.44+debian/X11/hsv.h
Examining data/xdaliclock-2.44+debian/X11/overlay.c
Examining data/xdaliclock-2.44+debian/X11/digital.c
Examining data/xdaliclock-2.44+debian/version.h
Examining data/xdaliclock-2.44+debian/gtk/xdaliclock.h
Examining data/xdaliclock-2.44+debian/gtk/vroot.h
Examining data/xdaliclock-2.44+debian/gtk/support.c
Examining data/xdaliclock-2.44+debian/gtk/hsv.c
Examining data/xdaliclock-2.44+debian/gtk/interface.c
Examining data/xdaliclock-2.44+debian/gtk/support.h
Examining data/xdaliclock-2.44+debian/gtk/xdaliclock.c
Examining data/xdaliclock-2.44+debian/gtk/interface.h
Examining data/xdaliclock-2.44+debian/gtk/hsv.h
Examining data/xdaliclock-2.44+debian/gtk/callbacks.h
Examining data/xdaliclock-2.44+debian/gtk/digital.c
Examining data/xdaliclock-2.44+debian/font/buildnumbers.c

FINAL RESULTS:

data/xdaliclock-2.44+debian/X11/digital.c:604:3:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
  sprintf (file, s1,
data/xdaliclock-2.44+debian/X11/digital.c:609:3:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
  sprintf (buf, s2, window, file);
data/xdaliclock-2.44+debian/X11/digital.c:612:3:  [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.
  system (buf);
data/xdaliclock-2.44+debian/X11/resources.c:49: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 (full_name, progname);
data/xdaliclock-2.44+debian/X11/resources.c:51: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 (full_name, res_name);
data/xdaliclock-2.44+debian/X11/resources.c:52: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 (full_class, progclass);
data/xdaliclock-2.44+debian/X11/resources.c:54: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 (full_class, res_class);
data/xdaliclock-2.44+debian/X11/xdaliclock.c:178:15:  [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).
        tmp = strcat (tmp, defaults [i]);
data/xdaliclock-2.44+debian/X11/xdaliclock.c:236:23:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
        else if (6 == sscanf (s, " %s %d %d:%d:%d %d %c",
data/xdaliclock-2.44+debian/X11/xdaliclock.c:553:11:  [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 (s2) strcpy (s2, s1);
data/xdaliclock-2.44+debian/gtk/xdaliclock.c:656:17:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
  else if (6 == sscanf (s, " %s %d %d:%d:%d %d %c",
data/xdaliclock-2.44+debian/X11/vroot.h:103:26:  [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 *xss_id = getenv("XSCREENSAVER_WINDOW");
data/xdaliclock-2.44+debian/gtk/vroot.h:103:26:  [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 *xss_id = getenv("XSCREENSAVER_WINDOW");
data/xdaliclock-2.44+debian/X11/digital.c:408: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 s[1];
data/xdaliclock-2.44+debian/X11/digital.c:497:35:  [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 *) nums[10].bits,
data/xdaliclock-2.44+debian/X11/digital.c:500:35:  [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 *) nums[11].bits,
data/xdaliclock-2.44+debian/X11/digital.c:598: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 file[255];
data/xdaliclock-2.44+debian/X11/digital.c:599: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[255];
data/xdaliclock-2.44+debian/X11/digital.c:1332:7:  [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 (last_time_digits, time_digits, sizeof (time_digits));
data/xdaliclock-2.44+debian/X11/digital.c:1493: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 buffer [10];
data/xdaliclock-2.44+debian/X11/resources.c:48: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 full_name [1024], full_class [1024];
data/xdaliclock-2.44+debian/X11/resources.c:68: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 *tmp, buf [100];
data/xdaliclock-2.44+debian/X11/visual.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 n[10];
data/xdaliclock-2.44+debian/X11/visual.c:471: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(n, "%3d", vi_out->colormap_size);
data/xdaliclock-2.44+debian/X11/visual.c:473:5:  [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(n, "default");
data/xdaliclock-2.44+debian/X11/xdaliclock.c:129: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(argv_copy, argv, argc * sizeof(*argv));
data/xdaliclock-2.44+debian/X11/xdaliclock.c:227: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 mon[255];
data/xdaliclock-2.44+debian/font/buildnumbers.c:381:10:  [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).
  font = atoi (argv[1]);
data/xdaliclock-2.44+debian/gtk/xdaliclock.c:647: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 mon[255];
data/xdaliclock-2.44+debian/gtk/xdaliclock.c:759: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 name[20];
data/xdaliclock-2.44+debian/gtk/xdaliclock.c:763:7:  [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 (name, "label%d", i++);
data/xdaliclock-2.44+debian/X11/resources.c:50:3:  [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 (full_name, ".");
data/xdaliclock-2.44+debian/X11/resources.c:53:3:  [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 (full_class, ".");
data/xdaliclock-2.44+debian/X11/resources.c:58:7:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
      strncpy (str, (char *) value.addr, value.size);
data/xdaliclock-2.44+debian/X11/resources.c:78: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).
	 (buf[strlen(buf)-1] == ' ' ||
data/xdaliclock-2.44+debian/X11/resources.c:79: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).
	  buf[strlen(buf)-1] == '\t'))
data/xdaliclock-2.44+debian/X11/resources.c:80: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).
    buf[strlen(buf)-1] = 0;
data/xdaliclock-2.44+debian/X11/resources.c:151: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).
  for (s2 = s + strlen(s) - 1; s2 > s; s2--)
data/xdaliclock-2.44+debian/X11/resources.c:171:12:  [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).
  return ((strlen(res_class) >= 10 &&
data/xdaliclock-2.44+debian/X11/resources.c:172:40:  [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).
	   !strcmp ("Background", res_class + strlen(res_class) - 10))
data/xdaliclock-2.44+debian/X11/usleep.c:55:3:  [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 (usecs);
data/xdaliclock-2.44+debian/X11/usleep.h:17:8:  [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.
#undef usleep
data/xdaliclock-2.44+debian/X11/usleep.h:18:9:  [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.
#define usleep(usecs) screenhack_usleep(usecs)
data/xdaliclock-2.44+debian/X11/xdaliclock.c:174:12:  [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).
      j += strlen (defaults [i]) + 1;
data/xdaliclock-2.44+debian/X11/xdaliclock.c:179:16:  [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 += strlen (tmp);
data/xdaliclock-2.44+debian/X11/xdaliclock.c:508: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).
  char *dst1 = hacked_version  = (char *) malloc (strlen (src) + 1);
data/xdaliclock-2.44+debian/X11/xdaliclock.c:509: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).
  char *dst2 = hacked_version2 = (char *) malloc (strlen (src) + 1);
data/xdaliclock-2.44+debian/X11/xdaliclock.c:538:12:  [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 L1 = strlen (s1);
data/xdaliclock-2.44+debian/X11/xdaliclock.c:539:12:  [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 L2 = strlen (s2);
data/xdaliclock-2.44+debian/X11/xdaliclock.c:552:30:  [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 *s2 = (char*) malloc (strlen (s1) + 1);

ANALYSIS SUMMARY:

Hits = 50
Lines analyzed = 6913 in approximately 0.20 seconds (34446 lines/second)
Physical Source Lines of Code (SLOC) = 5301
Hits@level = [0]  97 [1]  19 [2]  18 [3]   2 [4]  11 [5]   0
Hits@level+ = [0+] 147 [1+]  50 [2+]  31 [3+]  13 [4+]  11 [5+]   0
Hits/KSLOC@level+ = [0+] 27.7306 [1+] 9.43218 [2+] 5.84795 [3+] 2.45237 [4+] 2.07508 [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.