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/sound-juicer-3.38.0/libjuicer/rb-gst-media-types.c
Examining data/sound-juicer-3.38.0/libjuicer/rb-gst-media-types.h
Examining data/sound-juicer-3.38.0/libjuicer/sj-error.c
Examining data/sound-juicer-3.38.0/libjuicer/sj-error.h
Examining data/sound-juicer-3.38.0/libjuicer/sj-extractor.c
Examining data/sound-juicer-3.38.0/libjuicer/sj-extractor.h
Examining data/sound-juicer-3.38.0/libjuicer/sj-metadata-getter.c
Examining data/sound-juicer-3.38.0/libjuicer/sj-metadata-getter.h
Examining data/sound-juicer-3.38.0/libjuicer/sj-metadata-gvfs.c
Examining data/sound-juicer-3.38.0/libjuicer/sj-metadata-gvfs.h
Examining data/sound-juicer-3.38.0/libjuicer/sj-metadata-musicbrainz5.c
Examining data/sound-juicer-3.38.0/libjuicer/sj-metadata-musicbrainz5.h
Examining data/sound-juicer-3.38.0/libjuicer/sj-metadata.c
Examining data/sound-juicer-3.38.0/libjuicer/sj-metadata.h
Examining data/sound-juicer-3.38.0/libjuicer/sj-structures.c
Examining data/sound-juicer-3.38.0/libjuicer/sj-structures.h
Examining data/sound-juicer-3.38.0/libjuicer/sj-util.c
Examining data/sound-juicer-3.38.0/libjuicer/sj-util.h
Examining data/sound-juicer-3.38.0/src/egg-play-preview.c
Examining data/sound-juicer-3.38.0/src/egg-play-preview.h
Examining data/sound-juicer-3.38.0/src/sj-about.h
Examining data/sound-juicer-3.38.0/src/sj-album-chooser-dialog.c
Examining data/sound-juicer-3.38.0/src/sj-album-chooser-dialog.h
Examining data/sound-juicer-3.38.0/src/sj-cell-renderer-text.c
Examining data/sound-juicer-3.38.0/src/sj-cell-renderer-text.h
Examining data/sound-juicer-3.38.0/src/sj-extracting.c
Examining data/sound-juicer-3.38.0/src/sj-extracting.h
Examining data/sound-juicer-3.38.0/src/sj-genres.c
Examining data/sound-juicer-3.38.0/src/sj-genres.h
Examining data/sound-juicer-3.38.0/src/sj-main.c
Examining data/sound-juicer-3.38.0/src/sj-play.c
Examining data/sound-juicer-3.38.0/src/sj-play.h
Examining data/sound-juicer-3.38.0/src/sj-prefs.c
Examining data/sound-juicer-3.38.0/src/sj-prefs.h
Examining data/sound-juicer-3.38.0/src/sj-tree-view.c
Examining data/sound-juicer-3.38.0/src/sj-tree-view.h
Examining data/sound-juicer-3.38.0/src/sj-window-state.c
Examining data/sound-juicer-3.38.0/src/sj-window-state.h
Examining data/sound-juicer-3.38.0/src/sound-juicer.h
Examining data/sound-juicer-3.38.0/src/sj-about.c
Examining data/sound-juicer-3.38.0/tests/mb-test.c

FINAL RESULTS:

data/sound-juicer-3.38.0/libjuicer/sj-metadata-musicbrainz5.c:364: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 (disc->release_ids[0], disc->release_ids[j]);
data/sound-juicer-3.38.0/libjuicer/sj-metadata.c:227:9:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
    if (access (cdrom, W_OK) == 0) {
data/sound-juicer-3.38.0/src/sj-main.c:1015:14:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
  } else if (access (device, R_OK) != 0) {
data/sound-juicer-3.38.0/libjuicer/sj-util.c:35:9:  [3] (buffer) g_get_home_dir:
  This function is synonymous with 'getenv("HOME")';it returns untrustable
  input if the environment can beset by an attacker. It 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.
		dir = g_get_home_dir ();
data/sound-juicer-3.38.0/src/sj-extracting.c:133:21:  [3] (buffer) realpath:
  This function does not protect against buffer overflows, and some
  implementations can overflow internally (CWE-120/CWE-785!). Ensure that the
  destination buffer is at least of size MAXPATHLEN, andto protect against
  implementation problems, the input argument should also be checked to
  ensure it is no larger than MAXPATHLEN.
  gchar *realfile, *realpath, *filename, *scheme;
data/sound-juicer-3.38.0/src/sj-extracting.c:142:40:  [3] (buffer) realpath:
  This function does not protect against buffer overflows, and some
  implementations can overflow internally (CWE-120/CWE-785!). Ensure that the
  destination buffer is at least of size MAXPATHLEN, andto protect against
  implementation problems, the input argument should also be checked to
  ensure it is no larger than MAXPATHLEN.
  new = g_file_get_child (sj_base_uri, realpath);
data/sound-juicer-3.38.0/src/sj-extracting.c:144:11:  [3] (buffer) realpath:
  This function does not protect against buffer overflows, and some
  implementations can overflow internally (CWE-120/CWE-785!). Ensure that the
  destination buffer is at least of size MAXPATHLEN, andto protect against
  implementation problems, the input argument should also be checked to
  ensure it is no larger than MAXPATHLEN.
  g_free (realpath);
data/sound-juicer-3.38.0/libjuicer/sj-metadata-musicbrainz5.c:40: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.
typedef char Mbid[40];
data/sound-juicer-3.38.0/libjuicer/sj-metadata-musicbrainz5.c:50: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 language[3];
data/sound-juicer-3.38.0/libjuicer/sj-metadata-musicbrainz5.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 buffer[512]; /* for the GET macro */
data/sound-juicer-3.38.0/libjuicer/sj-metadata-musicbrainz5.c:138: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 locale[512];
data/sound-juicer-3.38.0/libjuicer/sj-metadata-musicbrainz5.c:170: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 buffer[512]; /* For the GET macro */
data/sound-juicer-3.38.0/libjuicer/sj-metadata-musicbrainz5.c:429: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 buffer[512]; /* for the GET macro */
data/sound-juicer-3.38.0/libjuicer/sj-metadata-musicbrainz5.c:503: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 buffer[512]; /* for the GET() macro */
data/sound-juicer-3.38.0/libjuicer/sj-metadata-musicbrainz5.c:594: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 type[512]; /* To hold relationlist target-type and relation type */
data/sound-juicer-3.38.0/libjuicer/sj-metadata-musicbrainz5.c:756: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 buffer[512]; /* For the GET macro */
data/sound-juicer-3.38.0/libjuicer/sj-metadata-musicbrainz5.c:887: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 buffer[512]; /* for the GET() macro */
data/sound-juicer-3.38.0/libjuicer/sj-metadata-musicbrainz5.c:981: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 buffer[512]; /* for the GET() macro */
data/sound-juicer-3.38.0/libjuicer/sj-metadata-musicbrainz5.c:996: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 buffer[512]; /* for the GET() macro */
data/sound-juicer-3.38.0/libjuicer/sj-metadata-musicbrainz5.c:1011: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 buffer[512]; /* for the GET() macro */
data/sound-juicer-3.38.0/libjuicer/sj-metadata-musicbrainz5.c:1050: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 buffer[512]; /* for the GET macro */
data/sound-juicer-3.38.0/libjuicer/sj-metadata-musicbrainz5.c:1121: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 buffer[1024];
data/sound-juicer-3.38.0/libjuicer/sj-metadata-musicbrainz5.c:1406: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 (language, "en", 3);
data/sound-juicer-3.38.0/libjuicer/sj-metadata-musicbrainz5.c:1408: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 (language, l[0], 2);
data/sound-juicer-3.38.0/libjuicer/sj-metadata.c:185:11:  [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).
    num = atoi (s);
data/sound-juicer-3.38.0/src/sj-main.c:504: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 *genres[COUNT]; /* store localized genre names */
data/sound-juicer-3.38.0/src/sj-main.c:1618: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).
  year = atoi (yearstr);
data/sound-juicer-3.38.0/src/sj-main.c:1633: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).
    disc_number = atoi(discstr);
data/sound-juicer-3.38.0/libjuicer/sj-metadata-getter.c:94:61:  [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).
    priv->cdrom = g_strdup_printf ("/dev/rdsk/%s", device + strlen ("/dev/dsk/"));
data/sound-juicer-3.38.0/libjuicer/sj-metadata-gvfs.c:71:49:  [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 g_strdup_printf ("cdda://%s", device + strlen ("/dev/rdsk/"));
data/sound-juicer-3.38.0/libjuicer/sj-metadata-gvfs.c:73:49:  [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 g_strdup_printf ("cdda://%s", device + strlen ("/dev/"));
data/sound-juicer-3.38.0/libjuicer/sj-metadata-musicbrainz5.c:328: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).
  len = strlen (barcode);
data/sound-juicer-3.38.0/libjuicer/sj-metadata-musicbrainz5.c:1407:14:  [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).
  } else if (strlen (l[0]) > 1) {
data/sound-juicer-3.38.0/libjuicer/sj-metadata.c:297: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).
              g_return_if_fail (strlen (*attr_values) == 2);
data/sound-juicer-3.38.0/libjuicer/sj-metadata.c:384: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).
  len = strlen (code);
data/sound-juicer-3.38.0/src/sj-extracting.c:157:29:  [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).
  len_extension = 1 + (int) strlen (extension);
data/sound-juicer-3.38.0/src/sj-extracting.c:165:26:  [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 len_path = (int) strlen (path) + 1;
data/sound-juicer-3.38.0/src/sj-genres.c:97: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).
      if (strlen (genres_from_file[len-1]) == 0) {
data/sound-juicer-3.38.0/src/sj-main.c:2012:53:  [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).
        d = g_strdup_printf ("/dev/%s%c", uris[0] + strlen ("cdda://"), '\0');
data/sound-juicer-3.38.0/src/sj-main.c:2014: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).
      len = strlen (d);

ANALYSIS SUMMARY:

Hits = 40
Lines analyzed = 12504 in approximately 0.34 seconds (36990 lines/second)
Physical Source Lines of Code (SLOC) = 9015
Hits@level = [0]   0 [1]  12 [2]  21 [3]   4 [4]   3 [5]   0
Hits@level+ = [0+]  40 [1+]  40 [2+]  28 [3+]   7 [4+]   3 [5+]   0
Hits/KSLOC@level+ = [0+] 4.43705 [1+] 4.43705 [2+] 3.10593 [3+] 0.776484 [4+] 0.332779 [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.