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/libnjb-2.2.7~dfsg0/sample/files.c
Examining data/libnjb-2.2.7~dfsg0/sample/tagtr.c
Examining data/libnjb-2.2.7~dfsg0/sample/getowner.c
Examining data/libnjb-2.2.7~dfsg0/sample/tracks.c
Examining data/libnjb-2.2.7~dfsg0/sample/handshake.c
Examining data/libnjb-2.2.7~dfsg0/sample/dumpeax.c
Examining data/libnjb-2.2.7~dfsg0/sample/fwupgrade.c
Examining data/libnjb-2.2.7~dfsg0/sample/gettr.c
Examining data/libnjb-2.2.7~dfsg0/sample/deltr.c
Examining data/libnjb-2.2.7~dfsg0/sample/getusage.c
Examining data/libnjb-2.2.7~dfsg0/sample/sendtr.c
Examining data/libnjb-2.2.7~dfsg0/sample/pl.c
Examining data/libnjb-2.2.7~dfsg0/sample/playlists.c
Examining data/libnjb-2.2.7~dfsg0/sample/settime.c
Examining data/libnjb-2.2.7~dfsg0/sample/setpbm.c
Examining data/libnjb-2.2.7~dfsg0/sample/cursesplay.c
Examining data/libnjb-2.2.7~dfsg0/sample/getfile.c
Examining data/libnjb-2.2.7~dfsg0/sample/common.h
Examining data/libnjb-2.2.7~dfsg0/sample/sendfile.c
Examining data/libnjb-2.2.7~dfsg0/sample/dumptime.c
Examining data/libnjb-2.2.7~dfsg0/sample/play.c
Examining data/libnjb-2.2.7~dfsg0/sample/delfile.c
Examining data/libnjb-2.2.7~dfsg0/sample/setowner.c
Examining data/libnjb-2.2.7~dfsg0/doc/examples.h
Examining data/libnjb-2.2.7~dfsg0/doc/mainpage.h
Examining data/libnjb-2.2.7~dfsg0/src/njbtime.h
Examining data/libnjb-2.2.7~dfsg0/src/byteorder.h
Examining data/libnjb-2.2.7~dfsg0/src/protocol.h
Examining data/libnjb-2.2.7~dfsg0/src/procedure.c
Examining data/libnjb-2.2.7~dfsg0/src/defs.h
Examining data/libnjb-2.2.7~dfsg0/src/base.h
Examining data/libnjb-2.2.7~dfsg0/src/byteorder.c
Examining data/libnjb-2.2.7~dfsg0/src/njb_error.h
Examining data/libnjb-2.2.7~dfsg0/src/usb_io.c
Examining data/libnjb-2.2.7~dfsg0/src/songid.c
Examining data/libnjb-2.2.7~dfsg0/src/njbtime.c
Examining data/libnjb-2.2.7~dfsg0/src/procedure.h
Examining data/libnjb-2.2.7~dfsg0/src/ioutil.h
Examining data/libnjb-2.2.7~dfsg0/src/unicode.h
Examining data/libnjb-2.2.7~dfsg0/src/base.c
Examining data/libnjb-2.2.7~dfsg0/src/datafile.c
Examining data/libnjb-2.2.7~dfsg0/src/protocol3.c
Examining data/libnjb-2.2.7~dfsg0/src/usb_io.h
Examining data/libnjb-2.2.7~dfsg0/src/playlist.c
Examining data/libnjb-2.2.7~dfsg0/src/unicode.c
Examining data/libnjb-2.2.7~dfsg0/src/playlist.h
Examining data/libnjb-2.2.7~dfsg0/src/datafile.h
Examining data/libnjb-2.2.7~dfsg0/src/protocol.c
Examining data/libnjb-2.2.7~dfsg0/src/njb_error.c
Examining data/libnjb-2.2.7~dfsg0/src/songid.h
Examining data/libnjb-2.2.7~dfsg0/src/protocol3.h
Examining data/libnjb-2.2.7~dfsg0/src/eax.c
Examining data/libnjb-2.2.7~dfsg0/src/eax.h
Examining data/libnjb-2.2.7~dfsg0/src/ioutil.c
Examining data/libnjb-2.2.7~dfsg0/src/libnjb.h

FINAL RESULTS:

data/libnjb-2.2.7~dfsg0/src/libnjb.h:25:9:  [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.
#define snprintf _snprintf
data/libnjb-2.2.7~dfsg0/src/libnjb.h:25:18:  [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.
#define snprintf _snprintf
data/libnjb-2.2.7~dfsg0/src/procedure.c:2941:2:  [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(tmpstring, frame->data.strval);
data/libnjb-2.2.7~dfsg0/src/protocol.c:193:3:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
  sprintf (buffer, fmt, status, code);
data/libnjb-2.2.7~dfsg0/src/songid.c:861: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(frame->label, label);
data/libnjb-2.2.7~dfsg0/src/songid.c:862: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(frame->data.strval, value);
data/libnjb-2.2.7~dfsg0/src/songid.c:931: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(frame->label, label);
data/libnjb-2.2.7~dfsg0/src/songid.c:964: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(frame->label, label);
data/libnjb-2.2.7~dfsg0/sample/cursesplay.c:44:18:  [3] (buffer) getopt:
  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.
  while ( (opt = getopt(argc, argv, "D:")) != -1 ) {
data/libnjb-2.2.7~dfsg0/sample/delfile.c:17:18:  [3] (buffer) getopt:
  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.
  while ( (opt = getopt(argc, argv, "D:")) != -1 ) {
data/libnjb-2.2.7~dfsg0/sample/deltr.c:16:16:  [3] (buffer) getopt:
  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.
	while ( (opt= getopt(argc, argv, "D:")) != -1 ) {
data/libnjb-2.2.7~dfsg0/sample/dumpeax.c:12:17:  [3] (buffer) getopt:
  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.
  while ((opt = getopt(argc, argv, "D:")) != -1) {
data/libnjb-2.2.7~dfsg0/sample/dumptime.c:12:16:  [3] (buffer) getopt:
  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.
	while ((opt = getopt(argc, argv, "D:")) != -1) {
data/libnjb-2.2.7~dfsg0/sample/files.c:31:17:  [3] (buffer) getopt:
  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.
  while ( (opt= getopt(argc, argv, "D:")) != -1 ) {
data/libnjb-2.2.7~dfsg0/sample/files.c:50:10:  [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.
  lang = getenv("LANG");
data/libnjb-2.2.7~dfsg0/sample/fwupgrade.c:241:18:  [3] (buffer) getopt:
  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.
  while ( (opt = getopt(argc, argv, "D:")) != -1 ) {
data/libnjb-2.2.7~dfsg0/sample/fwupgrade.c:264:10:  [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.
  lang = getenv("LANG");
data/libnjb-2.2.7~dfsg0/sample/getfile.c:19:16:  [3] (buffer) getopt:
  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.
	while ( (opt= getopt(argc, argv, "D:s:")) != -1 ) {
data/libnjb-2.2.7~dfsg0/sample/getowner.c:13:16:  [3] (buffer) getopt:
  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.
	while ( (opt= getopt(argc, argv, "D:")) != -1 ) {
data/libnjb-2.2.7~dfsg0/sample/getowner.c:32:9:  [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.
	lang = getenv("LANG");
data/libnjb-2.2.7~dfsg0/sample/gettr.c:32:17:  [3] (buffer) getopt:
  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.
  while ( (opt= getopt(argc, argv, "D:s:")) != -1 ) {
data/libnjb-2.2.7~dfsg0/sample/getusage.c:13:18:  [3] (buffer) getopt:
  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.
  while ( (opt = getopt(argc, argv, "D:")) != -1 ) {
data/libnjb-2.2.7~dfsg0/sample/handshake.c:12:17:  [3] (buffer) getopt:
  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.
  while ( (opt= getopt(argc, argv, "D:")) != -1 ) {
data/libnjb-2.2.7~dfsg0/sample/pl.c:49:17:  [3] (buffer) getopt:
  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.
  while ( (opt= getopt(argc, argv, "d:r:c:")) != -1 ) {
data/libnjb-2.2.7~dfsg0/sample/pl.c:81:10:  [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.
  lang = getenv("LANG");
data/libnjb-2.2.7~dfsg0/sample/play.c:21:16:  [3] (buffer) getopt:
  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.
	while ( (opt= getopt(argc, argv, "D:")) != -1 ) {
data/libnjb-2.2.7~dfsg0/sample/playlists.c:31:17:  [3] (buffer) getopt:
  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.
  while ( (opt= getopt(argc, argv, "D:")) != -1 ) {
data/libnjb-2.2.7~dfsg0/sample/playlists.c:50:10:  [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.
  lang = getenv("LANG");
data/libnjb-2.2.7~dfsg0/sample/sendfile.c:36:18:  [3] (buffer) getopt:
  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.
  while ( (opt = getopt(argc, argv, "D:F::")) != -1 ) {
data/libnjb-2.2.7~dfsg0/sample/sendfile.c:71:10:  [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.
  lang = getenv("LANG");
data/libnjb-2.2.7~dfsg0/sample/sendtr.c:103:18:  [3] (buffer) getopt:
  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.
  while ( (opt = getopt(argc, argv, "qD:t:a:l:c:g:n:d:")) != -1 ) {
data/libnjb-2.2.7~dfsg0/sample/sendtr.c:154:10:  [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.
  lang = getenv("LANG");
data/libnjb-2.2.7~dfsg0/sample/setowner.c:43:18:  [3] (buffer) getopt:
  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.
  while ( (opt = getopt(argc, argv, "D:")) != -1 ) {
data/libnjb-2.2.7~dfsg0/sample/setowner.c:62:10:  [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.
  lang = getenv("LANG");
data/libnjb-2.2.7~dfsg0/sample/setpbm.c:71:18:  [3] (buffer) getopt:
  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.
  while ( (opt = getopt(argc, argv, "D:")) != -1 ) {
data/libnjb-2.2.7~dfsg0/sample/settime.c:80:17:  [3] (buffer) getopt:
  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.
  while ((opt = getopt(argc, argv, "D:")) != -1) {
data/libnjb-2.2.7~dfsg0/sample/tagtr.c:58:17:  [3] (buffer) getopt:
  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.
  while ( (opt= getopt(argc, argv, "D:l")) != -1 ) {
data/libnjb-2.2.7~dfsg0/sample/tagtr.c:82:10:  [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.
  lang = getenv("LANG");
data/libnjb-2.2.7~dfsg0/sample/tracks.c:42:17:  [3] (buffer) getopt:
  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.
  while ( (opt= getopt(argc, argv, "D:E")) != -1 ) {
data/libnjb-2.2.7~dfsg0/sample/tracks.c:64:10:  [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.
  lang = getenv("LANG");
data/libnjb-2.2.7~dfsg0/sample/cursesplay.c:47:15:  [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).
      debug = atoi(optarg);
data/libnjb-2.2.7~dfsg0/sample/delfile.c:20:14:  [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).
      debug= atoi(optarg);
data/libnjb-2.2.7~dfsg0/sample/deltr.c:19: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).
			debug= atoi(optarg);
data/libnjb-2.2.7~dfsg0/sample/dumpeax.c:15:15:  [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).
      debug = atoi(optarg);
data/libnjb-2.2.7~dfsg0/sample/dumptime.c:15:12:  [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).
			debug = atoi(optarg);
data/libnjb-2.2.7~dfsg0/sample/files.c:34:14:  [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).
      debug= atoi(optarg);
data/libnjb-2.2.7~dfsg0/sample/fwupgrade.c:53: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).
  if ( (fd = open(path, O_RDONLY|O_BINARY)) == -1 ) {
data/libnjb-2.2.7~dfsg0/sample/fwupgrade.c:55: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).
  if ( (fd = open(path, O_RDONLY)) == -1 ) {
data/libnjb-2.2.7~dfsg0/sample/fwupgrade.c:108: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 secname[5];
data/libnjb-2.2.7~dfsg0/sample/fwupgrade.c:185: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).
   if ( (fd = open(path, O_CREAT|O_TRUNC|O_WRONLY|O_BINARY, 0664)) == -1 ) {
data/libnjb-2.2.7~dfsg0/sample/fwupgrade.c:187: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).
   if ( (fd = open(path, O_CREAT|O_TRUNC|O_WRONLY, 0664)) == -1 ) {
data/libnjb-2.2.7~dfsg0/sample/fwupgrade.c:208: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 buff[2];
data/libnjb-2.2.7~dfsg0/sample/fwupgrade.c:244:15:  [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).
      debug = atoi(optarg);
data/libnjb-2.2.7~dfsg0/sample/getfile.c:22: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).
			debug= atoi(optarg);
data/libnjb-2.2.7~dfsg0/sample/getowner.c:16: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).
			debug= atoi(optarg);
data/libnjb-2.2.7~dfsg0/sample/gettr.c:35:14:  [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).
      debug= atoi(optarg);
data/libnjb-2.2.7~dfsg0/sample/getusage.c:16:15:  [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).
      debug = atoi(optarg);
data/libnjb-2.2.7~dfsg0/sample/handshake.c:15:14:  [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).
      debug= atoi(optarg);
data/libnjb-2.2.7~dfsg0/sample/pl.c:61:14:  [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).
      debug= atoi(optarg);
data/libnjb-2.2.7~dfsg0/sample/play.c:24: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).
			debug= atoi(optarg);
data/libnjb-2.2.7~dfsg0/sample/playlists.c:34:14:  [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).
      debug= atoi(optarg);
data/libnjb-2.2.7~dfsg0/sample/sendfile.c:39:15:  [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).
      debug = atoi(optarg);
data/libnjb-2.2.7~dfsg0/sample/sendtr.c:82: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 artist[80], title[80], genre[80], codec[80], album[80];
data/libnjb-2.2.7~dfsg0/sample/sendtr.c:83: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 num[80];
data/libnjb-2.2.7~dfsg0/sample/sendtr.c:106:15:  [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).
      debug = atoi(optarg);
data/libnjb-2.2.7~dfsg0/sample/sendtr.c:124: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).
      tracknum = atoi(optarg);
data/libnjb-2.2.7~dfsg0/sample/sendtr.c:127:16:  [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).
      length = atoi(optarg);
data/libnjb-2.2.7~dfsg0/sample/setowner.c:36: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 newowner[80];
data/libnjb-2.2.7~dfsg0/sample/setowner.c:46:14:  [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).
      debug= atoi(optarg);
data/libnjb-2.2.7~dfsg0/sample/setpbm.c:74:14:  [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).
      debug= atoi(optarg);
data/libnjb-2.2.7~dfsg0/sample/setpbm.c:118:16:  [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.
      unsigned char data[1088];
data/libnjb-2.2.7~dfsg0/sample/setpbm.c:120: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 ( (f = fopen(path, "rb")) == NULL) {
data/libnjb-2.2.7~dfsg0/sample/settime.c:77: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 num[80];
data/libnjb-2.2.7~dfsg0/sample/settime.c:83:15:  [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).
      debug = atoi(optarg);
data/libnjb-2.2.7~dfsg0/sample/tagtr.c:44: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 filename[80], artist[80], title[80], genre[80], codec[80], album[80];
data/libnjb-2.2.7~dfsg0/sample/tagtr.c:45: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 num[80];
data/libnjb-2.2.7~dfsg0/sample/tagtr.c:63:14:  [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).
      debug= atoi(optarg);
data/libnjb-2.2.7~dfsg0/sample/tracks.c:45:15:  [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).
      debug = atoi(optarg);
data/libnjb-2.2.7~dfsg0/src/datafile.c:198: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(df->filename, &dp[10], lname);
data/libnjb-2.2.7~dfsg0/src/datafile.c:276: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(&ptag[10], filename, len);
data/libnjb-2.2.7~dfsg0/src/datafile.c:305: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(data+(*datap), unistr, binlen);
data/libnjb-2.2.7~dfsg0/src/datafile.c:326:12:  [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.
  unsigned char ptag[1024];
data/libnjb-2.2.7~dfsg0/src/datafile.c:408: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(retag, ptag, *size);
data/libnjb-2.2.7~dfsg0/src/datafile.c:429:12:  [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.
  unsigned char ptag[1024];
data/libnjb-2.2.7~dfsg0/src/datafile.c:507: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(retag, ptag, *size);
data/libnjb-2.2.7~dfsg0/src/eax.c:47: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[16];
data/libnjb-2.2.7~dfsg0/src/eax.c:210: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(eax->option_names[i], dp, efflen);
data/libnjb-2.2.7~dfsg0/src/eax.c:246: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(eax->option_names[i], dp, len);
data/libnjb-2.2.7~dfsg0/src/eax.c:268: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(eax->option_names[i], dp, len);
data/libnjb-2.2.7~dfsg0/src/libnjb.h:162:18:  [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 unsigned char owner_string[OWNER_STRING_LENGTH + 1];
data/libnjb-2.2.7~dfsg0/src/libnjb.h:418: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 key[5]; /**< The name of this key (AR00, PL00 etc.) */
data/libnjb-2.2.7~dfsg0/src/libnjb.h:421:11:  [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.
	unsigned char deviceid[16]; /**< The SDMI compliant device ID associated with this key */
data/libnjb-2.2.7~dfsg0/src/njb_error.c:149: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(estack->msg[MAX_ERRORS], "Error stack overflow");
data/libnjb-2.2.7~dfsg0/src/njbtime.c:151: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(data, njb3_set_time_command, 18);
data/libnjb-2.2.7~dfsg0/src/procedure.c:917:23:  [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 ( path && (fd = open(path, O_CREAT|O_TRUNC|O_WRONLY|O_BINARY, 0664)) == -1 ) {
data/libnjb-2.2.7~dfsg0/src/procedure.c:919:23:  [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 ( path && (fd = open(path, O_CREAT|O_TRUNC|O_WRONLY, 0664)) == -1 ) {
data/libnjb-2.2.7~dfsg0/src/procedure.c:1311: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).
  if ( (fd = open(path, O_RDONLY|O_BINARY)) == -1 ) {
data/libnjb-2.2.7~dfsg0/src/procedure.c:1313: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).
  if ( (fd = open(path, O_RDONLY)) == -1 ) {
data/libnjb-2.2.7~dfsg0/src/procedure.c:1396:2:  [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(&block[0], &block[bp], bufbottom);
data/libnjb-2.2.7~dfsg0/src/procedure.c:2942:2:  [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(tmpstring, ".temp");
data/libnjb-2.2.7~dfsg0/src/procedure.c:3417: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(sdmiid, &state->sdmiid, 16);
data/libnjb-2.2.7~dfsg0/src/protocol.c:91: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[100];
data/libnjb-2.2.7~dfsg0/src/protocol.c:210:11:  [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.
	unsigned char data[8];
data/libnjb-2.2.7~dfsg0/src/protocol.c:244:11:  [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.
	unsigned char data[25];
data/libnjb-2.2.7~dfsg0/src/protocol.c:265: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(&lcount->id, &data[1], 16);
data/libnjb-2.2.7~dfsg0/src/protocol.c:289:12:  [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.
  unsigned char data[58];
data/libnjb-2.2.7~dfsg0/src/protocol.c:319: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(&state->sdmiid, &data[1], 16);
data/libnjb-2.2.7~dfsg0/src/protocol.c:322: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(&state->productName, &data[25], 32);
data/libnjb-2.2.7~dfsg0/src/protocol.c:410:11:  [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.
	unsigned char data[9];
data/libnjb-2.2.7~dfsg0/src/protocol.c:503:11:  [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.
	unsigned char data[9];
data/libnjb-2.2.7~dfsg0/src/protocol.c:602:11:  [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.
	unsigned char data[17];
data/libnjb-2.2.7~dfsg0/src/protocol.c:636: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 data[OWNER_STRING_LENGTH+1];
data/libnjb-2.2.7~dfsg0/src/protocol.c:712:11:  [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.
	unsigned char data[9];
data/libnjb-2.2.7~dfsg0/src/protocol.c:819:11:  [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.
	unsigned char filedata[8];
data/libnjb-2.2.7~dfsg0/src/protocol.c:859:22:  [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.
	status = ((unsigned char *)bp)[0];
data/libnjb-2.2.7~dfsg0/src/protocol.c:873:11:  [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.
	unsigned char data[4];
data/libnjb-2.2.7~dfsg0/src/protocol.c:919:11:  [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.
	unsigned char utagsz[4];
data/libnjb-2.2.7~dfsg0/src/protocol.c:920:11:  [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.
	unsigned char data[5];
data/libnjb-2.2.7~dfsg0/src/protocol.c:975:11:  [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.
	unsigned char utagsz[4];
data/libnjb-2.2.7~dfsg0/src/protocol.c:976:11:  [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.
	unsigned char data[5];
data/libnjb-2.2.7~dfsg0/src/protocol.c:1007:2:  [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(padded_tag+4, tag, dfh->size);
data/libnjb-2.2.7~dfsg0/src/protocol.c:1164:11:  [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.
	unsigned char data[5];
data/libnjb-2.2.7~dfsg0/src/protocol.c:1207:12:  [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.
  unsigned char usize[4];
data/libnjb-2.2.7~dfsg0/src/protocol.c:1432:11:  [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.
	unsigned char retdata[5];
data/libnjb-2.2.7~dfsg0/src/protocol.c:1523:11:  [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.
	unsigned char data[8];
data/libnjb-2.2.7~dfsg0/src/protocol.c:1565:11:  [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.
	unsigned char data[10];
data/libnjb-2.2.7~dfsg0/src/protocol.c:1589:11:  [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.
	unsigned char data[6];
data/libnjb-2.2.7~dfsg0/src/protocol.c:1706:11:  [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.
	unsigned char data[4];
data/libnjb-2.2.7~dfsg0/src/protocol.c:1729:11:  [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.
	unsigned char data[3];
data/libnjb-2.2.7~dfsg0/src/protocol.c:1779:2:  [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(&data[4], tag, tagh->size);
data/libnjb-2.2.7~dfsg0/src/protocol.c:1810:11:  [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.
	unsigned char data[3];
data/libnjb-2.2.7~dfsg0/src/protocol.h:7:11:  [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.
	unsigned char id[16];
data/libnjb-2.2.7~dfsg0/src/protocol.h:41: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 productName[33];
data/libnjb-2.2.7~dfsg0/src/protocol3.c:124: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(data, usb20_cmd_header, 0x20);
data/libnjb-2.2.7~dfsg0/src/protocol3.c:127: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(data, usb11_cmd_header, 0x20);
data/libnjb-2.2.7~dfsg0/src/protocol3.c:227:12:  [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.
  unsigned char data[256];
data/libnjb-2.2.7~dfsg0/src/protocol3.c:300:12:  [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.
  unsigned char data[256];
data/libnjb-2.2.7~dfsg0/src/protocol3.c:409:12:  [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.
  unsigned char data[256];
data/libnjb-2.2.7~dfsg0/src/protocol3.c:486:12:  [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.
  unsigned char data[256];
data/libnjb-2.2.7~dfsg0/src/protocol3.c:528: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(sdmiid, &data[6], 16);
data/libnjb-2.2.7~dfsg0/src/protocol3.c:539:12:  [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.
  unsigned char data[0x14];
data/libnjb-2.2.7~dfsg0/src/protocol3.c:636:12:  [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.
  unsigned char data[NJB3_SHORTREAD_BUFSIZE];
data/libnjb-2.2.7~dfsg0/src/protocol3.c:694:12:  [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.
  unsigned char data[256];
data/libnjb-2.2.7~dfsg0/src/protocol3.c:835: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(&data[0], njb3_set_owner, 0x08);
data/libnjb-2.2.7~dfsg0/src/protocol3.c:836: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(&data[8], unistr, unilen+2);
data/libnjb-2.2.7~dfsg0/src/protocol3.c:955:12:  [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.
  unsigned char announce_image[0x0A] = {
data/libnjb-2.2.7~dfsg0/src/protocol3.c:965:12:  [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.
  unsigned char image_data[0x0C] = {
data/libnjb-2.2.7~dfsg0/src/protocol3.c:996: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(totimage, image_data, 0x0C);
data/libnjb-2.2.7~dfsg0/src/protocol3.c:1086:12:  [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.
  unsigned char get_elapsed_time [0x04] = { 0x01, 0x01, 0x00, 0x01 };
data/libnjb-2.2.7~dfsg0/src/protocol3.c:1087:12:  [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.
  unsigned char data[4];
data/libnjb-2.2.7~dfsg0/src/protocol3.c:1150:12:  [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.
  unsigned char njb3_query [0x0c] = {
data/libnjb-2.2.7~dfsg0/src/protocol3.c:1154:12:  [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.
  unsigned char status[0x0a];
data/libnjb-2.2.7~dfsg0/src/protocol3.c:1329:12:  [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.
  unsigned char njb3_start_play [0x10] = {
data/libnjb-2.2.7~dfsg0/src/protocol3.c:1482:12:  [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.
  unsigned char play_status[0x0a];
data/libnjb-2.2.7~dfsg0/src/protocol3.c:2563:4:  [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 (tmpbuffer, data+i, remain);
data/libnjb-2.2.7~dfsg0/src/protocol3.c:2564:4:  [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 (data, tmpbuffer, remain);
data/libnjb-2.2.7~dfsg0/src/protocol3.c:3129: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(keyval->key, data, 4);
data/libnjb-2.2.7~dfsg0/src/protocol3.c:3135: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(keyval->deviceid, &data[0], 16);
data/libnjb-2.2.7~dfsg0/src/protocol3.c:3387:2:  [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(&data[0], njb3_create_file, 8);
data/libnjb-2.2.7~dfsg0/src/protocol3.c:3391:2:  [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(&data[8], ptag, tagsize);
data/libnjb-2.2.7~dfsg0/src/protocol3.c:3579: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(&data[0], create_folder_cmd, 8);
data/libnjb-2.2.7~dfsg0/src/protocol3.c:3581: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(&data[8], ptag, tagsize);
data/libnjb-2.2.7~dfsg0/src/protocol3.c:3760: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(&data[0], njb3_update_frame, 8);
data/libnjb-2.2.7~dfsg0/src/protocol3.c:3765: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(&data[12], str, strsize);
data/libnjb-2.2.7~dfsg0/src/protocol3.c:3826: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(&data[0], njb3_update_frame, 8);
data/libnjb-2.2.7~dfsg0/src/protocol3.c:3827: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(&data[8], ptag, ptagsize);
data/libnjb-2.2.7~dfsg0/src/protocol3.c:3896: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(&data[0], njb3_create_pl, 8);
data/libnjb-2.2.7~dfsg0/src/protocol3.c:3900: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(&data[12], name, strsize);
data/libnjb-2.2.7~dfsg0/src/protocol3.c:3977: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(&data[0], njb3_addtracks, 12);
data/libnjb-2.2.7~dfsg0/src/protocol3.c:4182: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 *eaxnames[128];
data/libnjb-2.2.7~dfsg0/src/protocol3.c:4261: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(eax->option_names, eaxnames, strarrsize);
data/libnjb-2.2.7~dfsg0/src/songid.c:237:12:  [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.
  unsigned char tagbuffer[1024];
data/libnjb-2.2.7~dfsg0/src/songid.c:299:4:  [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(&tagbuffer[index], frame_unicode_label, frame_unicode_label_len);
data/libnjb-2.2.7~dfsg0/src/songid.c:302:4:  [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(&tagbuffer[index], frame_unicode_content, frame_unicode_content_len);
data/libnjb-2.2.7~dfsg0/src/songid.c:332: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(&tagbuffer[index], label, labelsz);
data/libnjb-2.2.7~dfsg0/src/songid.c:334: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(&tagbuffer[index], frame_ascii_content, frame_ascii_len);
data/libnjb-2.2.7~dfsg0/src/songid.c:348: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(&tagbuffer[index], label, labelsz);
data/libnjb-2.2.7~dfsg0/src/songid.c:360: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(&tagbuffer[index], label, labelsz);
data/libnjb-2.2.7~dfsg0/src/songid.c:383: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(data, tagbuffer, *tagsize);
data/libnjb-2.2.7~dfsg0/src/songid.c:434: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(data+(*datap), unistr, binlen);
data/libnjb-2.2.7~dfsg0/src/unicode.c:105: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(data, unicstr, length*2+2);
data/libnjb-2.2.7~dfsg0/src/unicode.c:118:12:  [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.
  unsigned char buffer[MAX_STRING_LENGTH];
data/libnjb-2.2.7~dfsg0/src/unicode.c:148:12:  [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.
  unsigned char buffer[MAX_STRING_LENGTH];
data/libnjb-2.2.7~dfsg0/src/unicode.c:267: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.
	  unsigned char buffer[MAX_STRING_LENGTH*2];
data/libnjb-2.2.7~dfsg0/sample/files.c:52: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).
    if (strlen(lang) > 5) {
data/libnjb-2.2.7~dfsg0/sample/files.c:53:25:  [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(&lang[strlen(lang)-5], "UTF-8")) {
data/libnjb-2.2.7~dfsg0/sample/fwupgrade.c:60:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  bread = read(fd, buffer, BUFFERSIZE);
data/libnjb-2.2.7~dfsg0/sample/fwupgrade.c:266: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).
    if (strlen(lang) > 5) {
data/libnjb-2.2.7~dfsg0/sample/fwupgrade.c:267:25:  [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(&lang[strlen(lang)-5], "UTF-8")) {
data/libnjb-2.2.7~dfsg0/sample/fwupgrade.c:349: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).
      dexor_fw_image(&buffer[offset+4], zimglen, known_key, strlen(known_key));
data/libnjb-2.2.7~dfsg0/sample/getowner.c:34: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).
	  if (strlen(lang) > 5) {
data/libnjb-2.2.7~dfsg0/sample/getowner.c:35:24:  [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(&lang[strlen(lang)-5], "UTF-8")) {
data/libnjb-2.2.7~dfsg0/sample/pl.c:83: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).
    if (strlen(lang) > 5) {
data/libnjb-2.2.7~dfsg0/sample/pl.c:84:25:  [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(&lang[strlen(lang)-5], "UTF-8")) {
data/libnjb-2.2.7~dfsg0/sample/playlists.c:52: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).
    if (strlen(lang) > 5) {
data/libnjb-2.2.7~dfsg0/sample/playlists.c:53:25:  [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(&lang[strlen(lang)-5], "UTF-8")) {
data/libnjb-2.2.7~dfsg0/sample/sendfile.c:55:45:  [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 (foldername[0] != '\\' || foldername[strlen(foldername)-1] != '\\') {
data/libnjb-2.2.7~dfsg0/sample/sendfile.c:73: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).
    if (strlen(lang) > 5) {
data/libnjb-2.2.7~dfsg0/sample/sendfile.c:74:25:  [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(&lang[strlen(lang)-5], "UTF-8")) {
data/libnjb-2.2.7~dfsg0/sample/sendtr.c:20: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).
  p = in + strlen(in) - 1;
data/libnjb-2.2.7~dfsg0/sample/sendtr.c:156: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).
    if (strlen(lang) > 5) {
data/libnjb-2.2.7~dfsg0/sample/sendtr.c:157:25:  [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(&lang[strlen(lang)-5], "UTF-8")) {
data/libnjb-2.2.7~dfsg0/sample/sendtr.c:181: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).
    if (!strlen(pcodec)) {
data/libnjb-2.2.7~dfsg0/sample/sendtr.c:190: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).
    if (!strlen(ptitle))
data/libnjb-2.2.7~dfsg0/sample/sendtr.c:198: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).
    if (!strlen(palbum))
data/libnjb-2.2.7~dfsg0/sample/sendtr.c:205: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).
    if (!strlen(partist))
data/libnjb-2.2.7~dfsg0/sample/sendtr.c:212: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).
    if (!strlen(pgenre))
data/libnjb-2.2.7~dfsg0/sample/sendtr.c:219: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).
      if ( strlen(pnum) ) {
data/libnjb-2.2.7~dfsg0/sample/sendtr.c:230: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).
      if ( strlen(pnum) ) {
data/libnjb-2.2.7~dfsg0/sample/sendtr.c:241: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).
      if ( strlen(pnum) ) {
data/libnjb-2.2.7~dfsg0/sample/setowner.c:64: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).
    if (strlen(lang) > 5) {
data/libnjb-2.2.7~dfsg0/sample/setowner.c:65:25:  [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(&lang[strlen(lang)-5], "UTF-8")) {
data/libnjb-2.2.7~dfsg0/sample/setpbm.c:15:9:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    c = fgetc (f);
data/libnjb-2.2.7~dfsg0/sample/setpbm.c:18:27:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	while (!feof (f) && (c = fgetc (f)) != '\n')
data/libnjb-2.2.7~dfsg0/sample/setpbm.c:54:7:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  c = fgetc (f);
data/libnjb-2.2.7~dfsg0/sample/settime.c:124: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).
  if ( strlen(pnum) ) {
data/libnjb-2.2.7~dfsg0/sample/settime.c:129: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).
  if ( strlen(pnum) ) {
data/libnjb-2.2.7~dfsg0/sample/settime.c:134: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).
  if ( strlen(pnum) ) {
data/libnjb-2.2.7~dfsg0/sample/settime.c:139: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).
  if ( strlen(pnum) ) {
data/libnjb-2.2.7~dfsg0/sample/settime.c:144: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).
  if ( strlen(pnum) ) {
data/libnjb-2.2.7~dfsg0/sample/settime.c:149: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).
  if ( strlen(pnum) ) {
data/libnjb-2.2.7~dfsg0/sample/settime.c:154: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).
  if ( strlen(pnum) ) {
data/libnjb-2.2.7~dfsg0/sample/tagtr.c:84: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).
    if (strlen(lang) > 5) {
data/libnjb-2.2.7~dfsg0/sample/tagtr.c:85:25:  [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(&lang[strlen(lang)-5], "UTF-8")) {
data/libnjb-2.2.7~dfsg0/sample/tagtr.c:98: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).
  if ( ! strlen(pcodec) ) pcodec= NULL;
data/libnjb-2.2.7~dfsg0/sample/tagtr.c:101: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).
  if ( ! strlen(ptitle) ) ptitle= NULL;
data/libnjb-2.2.7~dfsg0/sample/tagtr.c:104: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).
  if ( ! strlen(palbum) ) palbum= NULL;
data/libnjb-2.2.7~dfsg0/sample/tagtr.c:107: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).
  if ( ! strlen(partist) ) partist= NULL;
data/libnjb-2.2.7~dfsg0/sample/tagtr.c:110: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).
  if ( ! strlen(pgenre) ) pgenre= NULL;
data/libnjb-2.2.7~dfsg0/sample/tagtr.c:113: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).
  if ( ! strlen(pfilename) ) pfilename= NULL;
data/libnjb-2.2.7~dfsg0/sample/tagtr.c:116: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).
  if ( strlen(pnum) ) {
data/libnjb-2.2.7~dfsg0/sample/tagtr.c:123: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).
  if ( strlen(pnum) ) {
data/libnjb-2.2.7~dfsg0/sample/tagtr.c:130: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).
  if ( strlen(pnum) ) {
data/libnjb-2.2.7~dfsg0/sample/tagtr.c:140: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).
    if ( strlen(pnum) ) {
data/libnjb-2.2.7~dfsg0/sample/tracks.c:66: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).
    if (strlen(lang) > 5) {
data/libnjb-2.2.7~dfsg0/sample/tracks.c:67:25:  [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(&lang[strlen(lang)-5], "UTF-8")) {
data/libnjb-2.2.7~dfsg0/src/datafile.c:259:21:  [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 = (u_int16_t) strlen(filename) + 1;
data/libnjb-2.2.7~dfsg0/src/procedure.c:50: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).
  p = in + strlen(in) - 1;
data/libnjb-2.2.7~dfsg0/src/procedure.c:761:7:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
      strncpy((char *) oname, tmp, OWNER_STRING_LENGTH);
data/libnjb-2.2.7~dfsg0/src/procedure.c:764:7:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
      strncpy((char *) oname, name, OWNER_STRING_LENGTH);
data/libnjb-2.2.7~dfsg0/src/procedure.c:1405:21:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      if ( (bread = read(fd, &block[bufbottom], readsize)) < 1 ) {
data/libnjb-2.2.7~dfsg0/src/procedure.c:2940:21:  [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).
	tmpstring = malloc(strlen(frame->data.strval)+6);
data/libnjb-2.2.7~dfsg0/src/protocol.c:665:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
       	strncpy((char *) name, &data[1], OWNER_STRING_LENGTH);
data/libnjb-2.2.7~dfsg0/src/protocol.c:1104:6:  [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(200000);
data/libnjb-2.2.7~dfsg0/src/protocol.c:1436: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).
	size= strlen(name) + 1;
data/libnjb-2.2.7~dfsg0/src/protocol.c:1529: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).
	size= strlen(name) + 1;
data/libnjb-2.2.7~dfsg0/src/protocol3.c:638: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).
  u_int16_t strlen;
data/libnjb-2.2.7~dfsg0/src/protocol3.c:789:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
  strncpy(name, tmp, OWNER_STRING_LENGTH);
data/libnjb-2.2.7~dfsg0/src/songid.c:254:25:  [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).
    u_int16_t labelsz = strlen(label) + 1;
data/libnjb-2.2.7~dfsg0/src/songid.c:280: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).
	  u_int16_t frame_unicode_label_len = strlen(frame_unicode_label)+1;
data/libnjb-2.2.7~dfsg0/src/songid.c:328:25:  [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).
      frame_ascii_len = strlen(frame_ascii_content)+1;
data/libnjb-2.2.7~dfsg0/src/songid.c:854:25:  [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).
  frame->label = malloc(strlen(label)+1);
data/libnjb-2.2.7~dfsg0/src/songid.c:856:31:  [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).
  frame->data.strval = malloc(strlen(value)+1);
data/libnjb-2.2.7~dfsg0/src/songid.c:926:25:  [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).
  frame->label = malloc(strlen(label)+1);
data/libnjb-2.2.7~dfsg0/src/songid.c:959:25:  [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).
  frame->label = malloc(strlen(label)+1);
data/libnjb-2.2.7~dfsg0/src/unicode.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).
  for (i = 0; i < strlen((char *) str); i++) {
data/libnjb-2.2.7~dfsg0/src/unicode.c:322: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).
	  data = (unsigned char *) malloc(2 * strlen((char *) str) + 2);
data/libnjb-2.2.7~dfsg0/src/unicode.c:328:20:  [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(i = 0; i <= strlen((char *) str); i++){

ANALYSIS SUMMARY:

Hits = 258
Lines analyzed = 18914 in approximately 0.55 seconds (34373 lines/second)
Physical Source Lines of Code (SLOC) = 12011
Hits@level = [0] 411 [1]  74 [2] 144 [3]  32 [4]   8 [5]   0
Hits@level+ = [0+] 669 [1+] 258 [2+] 184 [3+]  40 [4+]   8 [5+]   0
Hits/KSLOC@level+ = [0+] 55.6989 [1+] 21.4803 [2+] 15.3193 [3+] 3.33028 [4+] 0.666056 [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.