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/hasciicam-1.1.2/src/hasciicam.c

FINAL RESULTS:

data/hasciicam-1.1.2/src/hasciicam.c:645:3:  [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.
  fprintf (stderr, version, PACKAGE, VERSION);
data/hasciicam-1.1.2/src/hasciicam.c:749:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf (temp, "password for %s@%s : ", ftp_user, ftp_host);
data/hasciicam-1.1.2/src/hasciicam.c:750:20:  [4] (misc) getpass:
  This function is obsolete and not portable. It was in SUSv2 but removed by
  POSIX.2. What it does exactly varies considerably between systems,
  particularly in where its prompt is displayed and where it gets its data
  (e.g., /dev/tty, stdin, stderr, etc.). In addition, some implementations
  overflow buffers. (CWE-676, CWE-120, CWE-20). Make the specific calls to do
  exactly what you want. If you continue to use it, or write your own, be
  sure to zero the password as soon as possible to avoid leaving the
  cleartext password visible in the process' address space.
	strncpy(ftp_pass, getpass(temp), 256);
data/hasciicam-1.1.2/src/hasciicam.c:462:11:  [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.
    res = getopt_long (argc, argv, short_options, long_options, NULL);
data/hasciicam-1.1.2/src/hasciicam.c:135:1:  [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 device[256];
data/hasciicam-1.1.2/src/hasciicam.c:141:1:  [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 background[64];
data/hasciicam-1.1.2/src/hasciicam.c:142:1:  [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 foreground[64];
data/hasciicam-1.1.2/src/hasciicam.c:143:1:  [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 fontface[256];
data/hasciicam-1.1.2/src/hasciicam.c:146:1:  [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 ftp[512];
data/hasciicam-1.1.2/src/hasciicam.c:147:1:  [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 ftp_user[256];
data/hasciicam-1.1.2/src/hasciicam.c:148:1:  [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 ftp_host[256];
data/hasciicam-1.1.2/src/hasciicam.c:149:1:  [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 ftp_dir[256];
data/hasciicam-1.1.2/src/hasciicam.c:150:1:  [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 ftp_pass[256];
data/hasciicam-1.1.2/src/hasciicam.c:159:1:  [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 aafile[256];
data/hasciicam-1.1.2/src/hasciicam.c:160:1:  [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 aatmpfile[256];
data/hasciicam-1.1.2/src/hasciicam.c:173:1:  [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 hascii_header[1024];
data/hasciicam-1.1.2/src/hasciicam.c:244:21:  [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).
    if (-1 == (fd = open(devfile,O_RDWR|O_NONBLOCK))) {
data/hasciicam-1.1.2/src/hasciicam.c:249:14:  [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(devfile,O_RDWR);
data/hasciicam-1.1.2/src/hasciicam.c:419: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( aa_image(ascii_context), grey, greysize);
data/hasciicam-1.1.2/src/hasciicam.c:445:7:  [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(device,"/dev/video0");
data/hasciicam-1.1.2/src/hasciicam.c:447:7:  [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(device,"/dev/video");
data/hasciicam-1.1.2/src/hasciicam.c:449:3:  [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(background,"000000");
data/hasciicam-1.1.2/src/hasciicam.c:450:3:  [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(foreground,"00FF00");
data/hasciicam-1.1.2/src/hasciicam.c:451:3:  [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(fontface,"courier"); /* you'd better choose monospace fonts */
data/hasciicam-1.1.2/src/hasciicam.c:488:2:  [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(aafile,"hasciicam.html");
data/hasciicam-1.1.2/src/hasciicam.c:491:2:  [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(aafile,"hasciicam.asc");
data/hasciicam-1.1.2/src/hasciicam.c:501:17:  [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).
      inputch = atoi (optarg);
data/hasciicam-1.1.2/src/hasciicam.c:520:13:  [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).
	aa_geo.w = atoi (optarg);
data/hasciicam-1.1.2/src/hasciicam.c:525:13:  [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).
	aa_geo.h = atoi (t);
data/hasciicam-1.1.2/src/hasciicam.c:530:18:  [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).
      fontsize = atoi (optarg);
data/hasciicam-1.1.2/src/hasciicam.c:543:17:  [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).
      refresh = atoi (optarg);
data/hasciicam-1.1.2/src/hasciicam.c:562:23:  [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).
      aa_geo.bright = atoi (optarg);
data/hasciicam-1.1.2/src/hasciicam.c:565:25:  [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).
      aa_geo.contrast = atoi (optarg);
data/hasciicam-1.1.2/src/hasciicam.c:568:22:  [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).
      aa_geo.gamma = atoi (optarg);
data/hasciicam-1.1.2/src/hasciicam.c:580:13:  [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).
      uid = atoi (optarg);
data/hasciicam-1.1.2/src/hasciicam.c:583:13:  [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).
      gid = atoi (optarg);
data/hasciicam-1.1.2/src/hasciicam.c:636: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 temp[160];
data/hasciicam-1.1.2/src/hasciicam.c:653: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 (&ascii_hwparms, &aa_defparams, sizeof (struct aa_hardware_params));
data/hasciicam-1.1.2/src/hasciicam.c:789: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 (aa_image (ascii_context), grey, vid_geo.size);
data/hasciicam-1.1.2/src/hasciicam.c:498:7:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
      strncpy(device,optarg,256);
data/hasciicam-1.1.2/src/hasciicam.c:540:7:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
      strncpy(fontface,optarg,256);
data/hasciicam-1.1.2/src/hasciicam.c:547:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(aafile,optarg,256);
data/hasciicam-1.1.2/src/hasciicam.c:551:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(ftp,optarg,512);
data/hasciicam-1.1.2/src/hasciicam.c:574:7:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
      strncpy(background,optarg,64);
data/hasciicam-1.1.2/src/hasciicam.c:577:7:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
      strncpy(foreground,optarg,64);
data/hasciicam-1.1.2/src/hasciicam.c:599:13:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	*p = '\0'; strncpy(ftp_pass,pp,256);
data/hasciicam-1.1.2/src/hasciicam.c:607:17:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
     *p = '\0'; strncpy(ftp_user,pp,256);
data/hasciicam-1.1.2/src/hasciicam.c:616:16:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    *p = '\0'; strncpy(ftp_host,pp,256);
data/hasciicam-1.1.2/src/hasciicam.c:625:19:  [1] (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 character.
    if((pp-p)==0) strcpy(ftp_dir,".");
data/hasciicam-1.1.2/src/hasciicam.c:626:10:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    else strncpy(ftp_dir,pp,256);
data/hasciicam-1.1.2/src/hasciicam.c:750:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(ftp_pass, getpass(temp), 256);

ANALYSIS SUMMARY:

Hits = 51
Lines analyzed = 843 in approximately 0.07 seconds (12564 lines/second)
Physical Source Lines of Code (SLOC) = 613
Hits@level = [0]  38 [1]  12 [2]  35 [3]   1 [4]   3 [5]   0
Hits@level+ = [0+]  89 [1+]  51 [2+]  39 [3+]   4 [4+]   3 [5+]   0
Hits/KSLOC@level+ = [0+] 145.188 [1+] 83.1974 [2+] 63.6215 [3+] 6.52529 [4+] 4.89396 [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.