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/gtkguitune-0.8/aboutbox.h
Examining data/gtkguitune-0.8/osziview.cc
Examining data/gtkguitune-0.8/aboutbox.c
Examining data/gtkguitune-0.8/lcdview.h
Examining data/gtkguitune-0.8/config.h
Examining data/gtkguitune-0.8/osziview.h
Examining data/gtkguitune-0.8/resources.h
Examining data/gtkguitune-0.8/lcdview.cc
Examining data/gtkguitune-0.8/guitune.h
Examining data/gtkguitune-0.8/logview.cc
Examining data/gtkguitune-0.8/logview.h
Examining data/gtkguitune-0.8/guitune.cc
Examining data/gtkguitune-0.8/main.cc

FINAL RESULTS:

data/gtkguitune-0.8/guitune.cc:209:5:  [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(dsp_devicename,name);
data/gtkguitune-0.8/main.cc:99:12:  [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.
           sscanf(optarg,"%s",options_audiodev);
data/gtkguitune-0.8/main.cc:153:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(filename,"%s/.gtkguitunerc",getenv("HOME"));
data/gtkguitune-0.8/main.cc:153:41:  [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.
    sprintf(filename,"%s/.gtkguitunerc",getenv("HOME"));
data/gtkguitune-0.8/guitune.cc:220:15:  [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).
   audio_fd = open(dsp_devicename, O_RDONLY);
data/gtkguitune-0.8/guitune.cc:317: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(dsp_devicename,"/dev/dsp");
data/gtkguitune-0.8/guitune.cc:464: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 str[50];
data/gtkguitune-0.8/guitune.cc:534: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(str,"%0.3f",freq_0t);
data/gtkguitune-0.8/guitune.cc:539: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(str,"%0.3f",nfreq_0t);
data/gtkguitune-0.8/guitune.h:98:4:  [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 dsp_devicename[100];
data/gtkguitune-0.8/logview.cc:34: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.
const char *note_ger[12] = {"A","B", "H","C","Db","D","Eb","E","F","Gb","G","Ab"};
data/gtkguitune-0.8/logview.cc:35: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.
const char *note_us[12] =  {"A","Bb","B","C","Db","D","Eb","E","F","Gb","G","Ab"};
data/gtkguitune-0.8/logview.cc:36: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.
const char *note_sy[12] =  {"LA","SIb","SI","DO","REb","RE","MIb","MI","FA","SOLb","SOL","LAb"};
data/gtkguitune-0.8/logview.cc:37: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.
const char *note_ger_alt[12] = {"A","B", "H","C","C#","D","D#","E","F","F#","G","G#"};
data/gtkguitune-0.8/logview.cc:38: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.
const char *note_us_alt[12] =  {"A","A#","B","C","C#","D","D#","E","F","F#","G","G#"};
data/gtkguitune-0.8/logview.cc:39: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.
const char *note_sy_alt[12] =  {"LA","LA#","SI","DO","DO#","RE","RE#","MI","FA","FA#","SOL","SOL#"};
data/gtkguitune-0.8/logview.cc:43: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.
const char *tuning_nat[23] = 
data/gtkguitune-0.8/logview.cc:169: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  str[100];
data/gtkguitune-0.8/logview.cc:304:19:  [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(str,"%.2f",(double)(freqs[i]/8.0*(1<<k)));
data/gtkguitune-0.8/main.cc:52: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   options_audiodev[256];
data/gtkguitune-0.8/main.cc:133:33:  [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.
        fprintf(io,"     %s\n",(char *)(opt[i].flag));
data/gtkguitune-0.8/main.cc:147: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 allstr[64000];
data/gtkguitune-0.8/main.cc:148: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 filename[512];
data/gtkguitune-0.8/main.cc:155:12:  [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( (f=fopen(filename,"rb")) != NULL ){
data/gtkguitune-0.8/main.cc:202: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( options_audiodev, "/dev/dsp" );
data/gtkguitune-0.8/main.cc:229:19:  [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( (mixer_fd=open("/dev/mixer", O_RDONLY)) == -1  ){
data/gtkguitune-0.8/main.cc:346:27:  [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( (mixer_fd=open("/dev/mixer", O_RDONLY)) == -1  ){
data/gtkguitune-0.8/osziview.cc:320: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 str[100];
data/gtkguitune-0.8/osziview.cc:366: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(str,"%.0f",i*1000); // in ms
data/gtkguitune-0.8/guitune.cc:471:6:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
 r = read(audio_fd, c + got_bytes, blksize);
data/gtkguitune-0.8/main.cc:159:27:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            for( i=2 ; (c=fgetc(f))!='\n' && c!=EOF ; i++ ){

ANALYSIS SUMMARY:

Hits = 31
Lines analyzed = 2553 in approximately 0.11 seconds (22749 lines/second)
Physical Source Lines of Code (SLOC) = 1736
Hits@level = [0]  37 [1]   2 [2]  25 [3]   1 [4]   3 [5]   0
Hits@level+ = [0+]  68 [1+]  31 [2+]  29 [3+]   4 [4+]   3 [5+]   0
Hits/KSLOC@level+ = [0+] 39.1705 [1+] 17.8571 [2+] 16.7051 [3+] 2.30415 [4+] 1.72811 [5+]   0
Dot directories skipped = 2 (--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.