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/scute-1.5.0/src/gpgsm.h
Examining data/scute-1.5.0/src/p11-getinfo.c
Examining data/scute-1.5.0/src/sexp-parse.h
Examining data/scute-1.5.0/src/p11-setoperationstate.c
Examining data/scute-1.5.0/src/p11-closeallsessions.c
Examining data/scute-1.5.0/src/p11-createobject.c
Examining data/scute-1.5.0/src/p11-sign.c
Examining data/scute-1.5.0/src/error-mapping.h
Examining data/scute-1.5.0/src/p11-waitforslotevent.c
Examining data/scute-1.5.0/src/p11-initialize.c
Examining data/scute-1.5.0/src/p11-findobjectsinit.c
Examining data/scute-1.5.0/src/p11-signencryptupdate.c
Examining data/scute-1.5.0/src/p11-verifyupdate.c
Examining data/scute-1.5.0/src/p11-generaterandom.c
Examining data/scute-1.5.0/src/p11-findobjects.c
Examining data/scute-1.5.0/src/p11-seedrandom.c
Examining data/scute-1.5.0/src/p11-verifyrecoverinit.c
Examining data/scute-1.5.0/src/get-path.c
Examining data/scute-1.5.0/src/p11-derivekey.c
Examining data/scute-1.5.0/src/p11-signfinal.c
Examining data/scute-1.5.0/src/p11-signrecover.c
Examining data/scute-1.5.0/src/p11-generatekeypair.c
Examining data/scute-1.5.0/src/p11-getfunctionstatus.c
Examining data/scute-1.5.0/src/error-mapping.c
Examining data/scute-1.5.0/src/settings.h
Examining data/scute-1.5.0/src/p11-findobjectsfinal.c
Examining data/scute-1.5.0/src/agent.h
Examining data/scute-1.5.0/src/p11-closesession.c
Examining data/scute-1.5.0/src/p11-wrapkey.c
Examining data/scute-1.5.0/src/p11-digestkey.c
Examining data/scute-1.5.0/src/p11-decrypt.c
Examining data/scute-1.5.0/src/p11-signinit.c
Examining data/scute-1.5.0/src/p11-verifyrecover.c
Examining data/scute-1.5.0/src/slots.c
Examining data/scute-1.5.0/src/p11-setattributevalue.c
Examining data/scute-1.5.0/src/p11-encrypt.c
Examining data/scute-1.5.0/src/p11-decryptinit.c
Examining data/scute-1.5.0/src/p11-getfunctionlist.c
Examining data/scute-1.5.0/src/p11-digestencryptupdate.c
Examining data/scute-1.5.0/src/cert-object.c
Examining data/scute-1.5.0/src/p11-getslotlist.c
Examining data/scute-1.5.0/src/p11-getmechanisminfo.c
Examining data/scute-1.5.0/src/p11-finalize.c
Examining data/scute-1.5.0/src/p11-copyobject.c
Examining data/scute-1.5.0/src/debug.c
Examining data/scute-1.5.0/src/p11-initpin.c
Examining data/scute-1.5.0/src/p11-getoperationstate.c
Examining data/scute-1.5.0/src/table.h
Examining data/scute-1.5.0/src/p11-signrecoverinit.c
Examining data/scute-1.5.0/src/p11-destroyobject.c
Examining data/scute-1.5.0/src/p11-decryptdigestupdate.c
Examining data/scute-1.5.0/src/cert-gpgsm.c
Examining data/scute-1.5.0/src/p11-encryptupdate.c
Examining data/scute-1.5.0/src/p11-opensession.c
Examining data/scute-1.5.0/src/p11-decryptfinal.c
Examining data/scute-1.5.0/src/table.c
Examining data/scute-1.5.0/src/p11-decryptupdate.c
Examining data/scute-1.5.0/src/pkcs11.h
Examining data/scute-1.5.0/src/p11-logout.c
Examining data/scute-1.5.0/src/p11-getslotinfo.c
Examining data/scute-1.5.0/src/p11-encryptinit.c
Examining data/scute-1.5.0/src/debug.h
Examining data/scute-1.5.0/src/p11-verifyfinal.c
Examining data/scute-1.5.0/src/p11-gettokeninfo.c
Examining data/scute-1.5.0/src/p11-signupdate.c
Examining data/scute-1.5.0/src/p11-getsessioninfo.c
Examining data/scute-1.5.0/src/p11-getobjectsize.c
Examining data/scute-1.5.0/src/p11-encryptfinal.c
Examining data/scute-1.5.0/src/p11-digestfinal.c
Examining data/scute-1.5.0/src/locking.c
Examining data/scute-1.5.0/src/p11-getattributevalue.c
Examining data/scute-1.5.0/src/p11-setpin.c
Examining data/scute-1.5.0/src/locking.h
Examining data/scute-1.5.0/src/p11-inittoken.c
Examining data/scute-1.5.0/src/p11-verifyinit.c
Examining data/scute-1.5.0/src/p11-cancelfunction.c
Examining data/scute-1.5.0/src/p11-unwrapkey.c
Examining data/scute-1.5.0/src/slots.h
Examining data/scute-1.5.0/src/p11-getmechanismlist.c
Examining data/scute-1.5.0/src/p11-decryptverifyupdate.c
Examining data/scute-1.5.0/src/p11-verify.c
Examining data/scute-1.5.0/src/support.h
Examining data/scute-1.5.0/src/p11-digestupdate.c
Examining data/scute-1.5.0/src/p11-digestinit.c
Examining data/scute-1.5.0/src/cert.h
Examining data/scute-1.5.0/src/p11-digest.c
Examining data/scute-1.5.0/src/p11-login.c
Examining data/scute-1.5.0/src/p11-generatekey.c
Examining data/scute-1.5.0/src/cryptoki.h
Examining data/scute-1.5.0/src/gpgsm.c
Examining data/scute-1.5.0/src/agent.c
Examining data/scute-1.5.0/tests/t-getslotinfo.c
Examining data/scute-1.5.0/tests/t-link.c
Examining data/scute-1.5.0/tests/t-getsessioninfo.c
Examining data/scute-1.5.0/tests/t-getfunctionlist.c
Examining data/scute-1.5.0/tests/t-gettokeninfo.c
Examining data/scute-1.5.0/tests/t-initialize.c
Examining data/scute-1.5.0/tests/t-generaterandom.c
Examining data/scute-1.5.0/tests/t-findobjects.c
Examining data/scute-1.5.0/tests/t-opensession.c
Examining data/scute-1.5.0/tests/t-getinfo.c
Examining data/scute-1.5.0/tests/t-auth.c
Examining data/scute-1.5.0/tests/t-getmechanisminfo.c
Examining data/scute-1.5.0/tests/t-getmechanismlist.c
Examining data/scute-1.5.0/tests/t-getattribute.c
Examining data/scute-1.5.0/tests/t-closeallsessions.c
Examining data/scute-1.5.0/tests/t-support.h
Examining data/scute-1.5.0/tests/t-getslotlist.c

FINAL RESULTS:

data/scute-1.5.0/src/agent.c:99:7:  [4] (shell) popen:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
  p = popen (buffer, "r");
data/scute-1.5.0/src/cert-gpgsm.c:351: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 (cert->keyid, field[4]);
data/scute-1.5.0/src/cert-gpgsm.c:408:6:  [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 (cert->fpr, field[9]);
data/scute-1.5.0/src/cert-gpgsm.c:413:6:  [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 (cert->chain_id, field[12]);
data/scute-1.5.0/src/cert-gpgsm.c:422:6:  [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 (cert->grip, field[9]);
data/scute-1.5.0/src/debug.h:48:9:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
        fprintf (_scute_debug_stream, \
data/scute-1.5.0/src/get-path.c:170:15:  [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 (result, tmp);
data/scute-1.5.0/src/get-path.c:243: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 (stpcpy (stpcpy (result, tmp), "\\"), name);
data/scute-1.5.0/src/get-path.c:245:7:  [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 (result, F_OK))
data/scute-1.5.0/src/get-path.c:267:11:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
          strcpy (stpcpy (stpcpy (result, path), "\\"), name);
data/scute-1.5.0/src/get-path.c:268:15:  [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 (result, F_OK))
data/scute-1.5.0/src/support.h:60: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  gpgrt_snprintf
data/scute-1.5.0/tests/t-getfunctionlist.c:38:21:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
#define DO_ONE(fnc) printf (#fnc ": %p %c= %p \n", fnc, \
data/scute-1.5.0/tests/t-getmechanisminfo.c:107:8:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	      printf ("%s" #sym, any ? " | " : "");	\
data/scute-1.5.0/tests/t-getsessioninfo.c:98:8:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	      printf ("%s" #sym, any ? " | " : "");	\
data/scute-1.5.0/tests/t-gettokeninfo.c:100:8:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	      printf ("%s" #sym, any ? " | " : "");	\
data/scute-1.5.0/tests/t-link.c:34:21:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
#define DO_ONE(fnc) printf (#fnc ": %p\n", fnc)
data/scute-1.5.0/src/agent.c:231:17:  [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.
  dft_display = getenv ("DISPLAY");
data/scute-1.5.0/src/agent.c:237:17:  [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.
  dft_ttyname = getenv ("GPG_TTY");
data/scute-1.5.0/src/agent.c:247:17:  [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.
  dft_ttytype = getenv ("TERM");
data/scute-1.5.0/src/agent.c:291:20:  [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.
  dft_xauthority = getenv ("XAUTHORITY");
data/scute-1.5.0/src/agent.c:299:28:  [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.
  dft_pinentry_user_data = getenv ("PINENTRY_USER_DATA");
data/scute-1.5.0/src/debug.c:95:11:  [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.
      e = getenv ("SCUTE_DEBUG");
data/scute-1.5.0/src/get-path.c:50:15:  [3] (misc) LoadLibrary:
  Ensure that the full path to the library is specified, or current directory
  may be used (CWE-829, CWE-20). Use registry entry or GetWindowsDirectory to
  find library path, if you aren't already.
  void * hd = LoadLibrary (name);
data/scute-1.5.0/src/agent.c:89: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[255];
data/scute-1.5.0/src/agent.c:193: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 version[20];
data/scute-1.5.0/src/agent.c:203:25:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
  agent_version_major = atoi (version);
data/scute-1.5.0/src/agent.c:205:28:  [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).
  agent_version_minor = s? atoi (s+1) : 0;
data/scute-1.5.0/src/agent.c:435: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 (ptr, line, src - line);
data/scute-1.5.0/src/agent.c:521:31:  [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).
          parm->chv1_cached = atoi (p);
data/scute-1.5.0/src/agent.c:528:36:  [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).
              parm->chvmaxlen[i] = atoi (p);
data/scute-1.5.0/src/agent.c:536:35:  [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).
              parm->chvretry[i] = atoi (p);
data/scute-1.5.0/src/agent.c:547: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).
      int no = atoi (line);
data/scute-1.5.0/src/agent.c:561: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).
      int no = atoi (line);
data/scute-1.5.0/src/agent.c:588:13:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
	      no = atoi (line);
data/scute-1.5.0/src/agent.c:592: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 (parm->grip1, grip, 40);
data/scute-1.5.0/src/agent.c:597: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 (parm->grip2, grip, 40);
data/scute-1.5.0/src/agent.c:602: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 (parm->grip3, grip, 40);
data/scute-1.5.0/src/agent.c:746: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[MAX_SIGNATURE_LEN];
data/scute-1.5.0/src/agent.c:761: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 (&sig->data[sig->len], buffer, length);
data/scute-1.5.0/src/agent.c:822: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 (result, s, n);
data/scute-1.5.0/src/agent.c:850:19:  [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 unsigned char rmd160_prefix[15] = /* Object ID is 1.3.36.3.2.1 */
data/scute-1.5.0/src/agent.c:853:19:  [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 unsigned char sha1_prefix[15] =   /* (1.3.14.3.2.26) */
data/scute-1.5.0/src/agent.c:856:19:  [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 unsigned char sha224_prefix[19] = /* (2.16.840.1.101.3.4.2.4) */
data/scute-1.5.0/src/agent.c:860:19:  [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 unsigned char sha256_prefix[19] = /* (2.16.840.1.101.3.4.2.1) */
data/scute-1.5.0/src/agent.c:864:19:  [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 unsigned char sha384_prefix[19] = /* (2.16.840.1.101.3.4.2.2) */
data/scute-1.5.0/src/agent.c:868:19:  [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 unsigned char sha512_prefix[19] = /* (2.16.840.1.101.3.4.2.3) */
data/scute-1.5.0/src/agent.c:909: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 cmd[150];
data/scute-1.5.0/src/agent.c:915: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 pretty_data[2 * MAX_DATA_LEN + 1];
data/scute-1.5.0/src/agent.c:969: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 cmd[150];
data/scute-1.5.0/src/agent.c:1023: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 (cert_s->cert_der + cert_s->cert_der_len, data, data_len);
data/scute-1.5.0/src/agent.c:1035: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 cmd[150];
data/scute-1.5.0/src/agent.c:1081: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 (request->buffer, line, len);
data/scute-1.5.0/src/agent.c:1089: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 command[16];
data/scute-1.5.0/src/agent.h:48:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char *private_do[4];	/* Malloced.  */
data/scute-1.5.0/src/agent.h:52: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 cafpr1[20];
data/scute-1.5.0/src/agent.h:53: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 cafpr2[20];
data/scute-1.5.0/src/agent.h:54: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 cafpr3[20];
data/scute-1.5.0/src/agent.h:58: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 fpr1[20];
data/scute-1.5.0/src/agent.h:59: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 fpr2[20];
data/scute-1.5.0/src/agent.h:60: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 fpr3[20];
data/scute-1.5.0/src/agent.h:73: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 grip1[41];
data/scute-1.5.0/src/agent.h:74: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 grip2[41];
data/scute-1.5.0/src/agent.h:75: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 grip3[41];
data/scute-1.5.0/src/cert-gpgsm.c:63: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 pending[MAX_LINE_LEN + 1];
data/scute-1.5.0/src/cert-gpgsm.c:273: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 *field[NR_FIELDS];
data/scute-1.5.0/src/cert-gpgsm.c:334: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).
	  int i = atoi (field[2]);
data/scute-1.5.0/src/cert-gpgsm.c:343: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).
	  int i = atoi (field[3]);
data/scute-1.5.0/src/cert-gpgsm.c:548: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 cmd[COMMANDLINELEN];
data/scute-1.5.0/src/cert-gpgsm.c:649: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 (exp->buffer + exp->buffer_len, line, line_len);
data/scute-1.5.0/src/cert-gpgsm.c:663: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 cmd[COMMANDLINELEN];
data/scute-1.5.0/src/cert-object.c:81: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 (&broken_time, b_time, sizeof (*b_time));
data/scute-1.5.0/src/cert-object.c:399: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 (attr[i].pValue, val, size);
data/scute-1.5.0/src/cert-object.c:551: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 certptr[40];
data/scute-1.5.0/src/cert-object.c:690: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 certptr[40];
data/scute-1.5.0/src/cert.h:62: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 keyid[17];
data/scute-1.5.0/src/cert.h:86: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 fpr[41];
data/scute-1.5.0/src/cert.h:89: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 grip[41];
data/scute-1.5.0/src/cert.h:92: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 chain_id[41];
data/scute-1.5.0/src/debug.c:102:25:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
	  _scute_debug_flags = atoi (e);
data/scute-1.5.0/src/debug.c:119:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		      memcpy (p, s1, s2 - s1);
data/scute-1.5.0/src/debug.c:122:14:  [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).
		      fp = fopen (p,"a");
data/scute-1.5.0/src/get-path.c:259: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 path[MAX_PATH];
data/scute-1.5.0/src/p11-findobjects.c:71: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 (phObject, oids, sizeof (CK_OBJECT_HANDLE) * count);
data/scute-1.5.0/src/p11-getattributevalue.c:89: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 (pTemplate[ulCount].pValue,
data/scute-1.5.0/src/p11-getslotinfo.c:80:34:  [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).
  pInfo->firmwareVersion.major = atoi (s);
data/scute-1.5.0/src/p11-getslotinfo.c:82:37:  [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).
  pInfo->firmwareVersion.minor = s? atoi (s+1): 0;
data/scute-1.5.0/src/pkcs11.h:198: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 manufacturer_id[32];
data/scute-1.5.0/src/pkcs11.h:200: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 library_description[32];
data/scute-1.5.0/src/pkcs11.h:215: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 slot_description[64];
data/scute-1.5.0/src/pkcs11.h:216: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 manufacturer_id[32];
data/scute-1.5.0/src/pkcs11.h:231: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 label[32];
data/scute-1.5.0/src/pkcs11.h:232: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 manufacturer_id[32];
data/scute-1.5.0/src/pkcs11.h:233: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 model[16];
data/scute-1.5.0/src/pkcs11.h:234: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 serial_number[16];
data/scute-1.5.0/src/pkcs11.h:248: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 utc_time[16];
data/scute-1.5.0/src/pkcs11.h:473: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 year[4];
data/scute-1.5.0/src/pkcs11.h:474: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 month[2];
data/scute-1.5.0/src/pkcs11.h:475: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 day[2];
data/scute-1.5.0/tests/t-generaterandom.c:78:20:  [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[16];
data/scute-1.5.0/src/agent.c:105:13:  [1] (buffer) fscanf:
  It's unclear if the %s limit in the format string is small enough
  (CWE-120). Check that the limit is sufficiently small, or use a different
  input function.
      ret = fscanf (p, "D %254s\nOK\n", buffer);
data/scute-1.5.0/src/agent.c:200:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
  strncpy (version, buffer, length);
data/scute-1.5.0/src/agent.c:368: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).
  buffer = malloc (strlen (src) + 1);
data/scute-1.5.0/src/cert-gpgsm.c:114:7:  [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 (timestamp) >= 15 && timestamp[8] == 'T')
data/scute-1.5.0/src/cert-gpgsm.c:166:17:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      if (len < strlen (src) + 1)
data/scute-1.5.0/src/cert-gpgsm.c:175:22:  [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).
      dest = malloc (strlen (src) + 1);
data/scute-1.5.0/src/cert-gpgsm.c:350: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).
      if (fields >= 5 && strlen (field[4]) <= sizeof (cert->keyid) - 1)
data/scute-1.5.0/src/cert-gpgsm.c:407: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 (fields >= 10 && strlen (field[9]) <= sizeof (cert->fpr) - 1)
data/scute-1.5.0/src/cert-gpgsm.c:411: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 (fields >= 13 && strlen (field[12])
data/scute-1.5.0/src/cert-gpgsm.c:421: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 (fields >= 10 && strlen (field[9]) <= sizeof (cert->grip) - 1)
data/scute-1.5.0/src/cert-gpgsm.c:598:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      got = read (output_fds[0], cert->cert_der + cert->cert_der_len,
data/scute-1.5.0/src/cert-gpgsm.c:727: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 (cert->fpr) != 40)
data/scute-1.5.0/src/cert-object.c:553:36:  [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).
    one_attr_ext (CKA_ID, certptr, strlen (certptr));
data/scute-1.5.0/src/cert-object.c:692:36:  [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).
    one_attr_ext (CKA_ID, certptr, strlen (certptr));
data/scute-1.5.0/src/debug.c:115:17:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		    s2 = s1 + strlen (s1);
data/scute-1.5.0/src/get-path.c:165:28:  [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).
          result = malloc (strlen (tmp)+1);
data/scute-1.5.0/src/get-path.c:236: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).
  result = malloc (strlen (tmp) + 1 + strlen (name) + 1);
data/scute-1.5.0/src/get-path.c:236:39:  [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).
  result = malloc (strlen (tmp) + 1 + strlen (name) + 1);
data/scute-1.5.0/src/get-path.c:264: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).
      result = malloc (strlen (path) + 1 + strlen (name) + 1);
data/scute-1.5.0/src/get-path.c:264:44:  [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).
      result = malloc (strlen (path) + 1 + strlen (name) + 1);
data/scute-1.5.0/src/sexp-parse.h:99: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).
  size_t toklen = strlen (token);
data/scute-1.5.0/src/slots.c:430: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).
	       || strlen (slot->info.serialno) != 32))
data/scute-1.5.0/tests/t-getfunctionlist.c:125:7:  [1] (buffer) mismatch:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
  if (mismatch)

ANALYSIS SUMMARY:

Hits = 123
Lines analyzed = 13753 in approximately 0.43 seconds (32218 lines/second)
Physical Source Lines of Code (SLOC) = 7954
Hits@level = [0] 198 [1]  23 [2]  76 [3]   7 [4]  17 [5]   0
Hits@level+ = [0+] 321 [1+] 123 [2+] 100 [3+]  24 [4+]  17 [5+]   0
Hits/KSLOC@level+ = [0+] 40.3571 [1+] 15.4639 [2+] 12.5723 [3+] 3.01735 [4+] 2.13729 [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.