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/poldi-0.4.2+git20161115.553060d/src/assuan/assuan-buffer.c
Examining data/poldi-0.4.2+git20161115.553060d/src/assuan/assuan-client.c
Examining data/poldi-0.4.2+git20161115.553060d/src/assuan/assuan-connect.c
Examining data/poldi-0.4.2+git20161115.553060d/src/assuan/assuan-defs.h
Examining data/poldi-0.4.2+git20161115.553060d/src/assuan/assuan-handler.c
Examining data/poldi-0.4.2+git20161115.553060d/src/assuan/assuan-inquire.c
Examining data/poldi-0.4.2+git20161115.553060d/src/assuan/assuan-io-pth.c
Examining data/poldi-0.4.2+git20161115.553060d/src/assuan/assuan-io.c
Examining data/poldi-0.4.2+git20161115.553060d/src/assuan/assuan-listen.c
Examining data/poldi-0.4.2+git20161115.553060d/src/assuan/assuan-logging.c
Examining data/poldi-0.4.2+git20161115.553060d/src/assuan/assuan-pipe-connect.c
Examining data/poldi-0.4.2+git20161115.553060d/src/assuan/assuan-pipe-server.c
Examining data/poldi-0.4.2+git20161115.553060d/src/assuan/assuan-socket-connect.c
Examining data/poldi-0.4.2+git20161115.553060d/src/assuan/assuan-socket-server.c
Examining data/poldi-0.4.2+git20161115.553060d/src/assuan/assuan-socket.c
Examining data/poldi-0.4.2+git20161115.553060d/src/assuan/assuan-uds.c
Examining data/poldi-0.4.2+git20161115.553060d/src/assuan/assuan-util.c
Examining data/poldi-0.4.2+git20161115.553060d/src/assuan/assuan.h
Examining data/poldi-0.4.2+git20161115.553060d/src/assuan/funopen.c
Examining data/poldi-0.4.2+git20161115.553060d/src/assuan/isascii.c
Examining data/poldi-0.4.2+git20161115.553060d/src/assuan/memrchr.c
Examining data/poldi-0.4.2+git20161115.553060d/src/assuan/putc_unlocked.c
Examining data/poldi-0.4.2+git20161115.553060d/src/assuan/setenv.c
Examining data/poldi-0.4.2+git20161115.553060d/src/assuan/stpcpy.c
Examining data/poldi-0.4.2+git20161115.553060d/src/pam/auth-method-localdb/auth-localdb.c
Examining data/poldi-0.4.2+git20161115.553060d/src/pam/auth-method-localdb/defs-localdb.h
Examining data/poldi-0.4.2+git20161115.553060d/src/pam/auth-method-localdb/key-lookup.c
Examining data/poldi-0.4.2+git20161115.553060d/src/pam/auth-method-localdb/key-lookup.h
Examining data/poldi-0.4.2+git20161115.553060d/src/pam/auth-method-localdb/usersdb.c
Examining data/poldi-0.4.2+git20161115.553060d/src/pam/auth-method-localdb/usersdb.h
Examining data/poldi-0.4.2+git20161115.553060d/src/pam/auth-method-x509/auth-x509.c
Examining data/poldi-0.4.2+git20161115.553060d/src/pam/auth-method-x509/dirmngr.c
Examining data/poldi-0.4.2+git20161115.553060d/src/pam/auth-method-x509/dirmngr.h
Examining data/poldi-0.4.2+git20161115.553060d/src/pam/auth-methods.h
Examining data/poldi-0.4.2+git20161115.553060d/src/pam/auth-support/conv.c
Examining data/poldi-0.4.2+git20161115.553060d/src/pam/auth-support/conv.h
Examining data/poldi-0.4.2+git20161115.553060d/src/pam/auth-support/ctx.h
Examining data/poldi-0.4.2+git20161115.553060d/src/pam/auth-support/getpin-cb.c
Examining data/poldi-0.4.2+git20161115.553060d/src/pam/auth-support/getpin-cb.h
Examining data/poldi-0.4.2+git20161115.553060d/src/pam/auth-support/wait-for-card.c
Examining data/poldi-0.4.2+git20161115.553060d/src/pam/auth-support/wait-for-card.h
Examining data/poldi-0.4.2+git20161115.553060d/src/pam/pam_poldi.c
Examining data/poldi-0.4.2+git20161115.553060d/src/poldi.h
Examining data/poldi-0.4.2+git20161115.553060d/src/scd/scd.c
Examining data/poldi-0.4.2+git20161115.553060d/src/scd/scd.h
Examining data/poldi-0.4.2+git20161115.553060d/src/util/convert.c
Examining data/poldi-0.4.2+git20161115.553060d/src/util/filenames.c
Examining data/poldi-0.4.2+git20161115.553060d/src/util/filenames.h
Examining data/poldi-0.4.2+git20161115.553060d/src/util/membuf.c
Examining data/poldi-0.4.2+git20161115.553060d/src/util/membuf.h
Examining data/poldi-0.4.2+git20161115.553060d/src/util/simplelog.c
Examining data/poldi-0.4.2+git20161115.553060d/src/util/simplelog.h
Examining data/poldi-0.4.2+git20161115.553060d/src/util/simpleparse.c
Examining data/poldi-0.4.2+git20161115.553060d/src/util/simpleparse.h
Examining data/poldi-0.4.2+git20161115.553060d/src/util/support.c
Examining data/poldi-0.4.2+git20161115.553060d/src/util/support.h
Examining data/poldi-0.4.2+git20161115.553060d/src/util/util-local.h
Examining data/poldi-0.4.2+git20161115.553060d/src/util/util.h
Examining data/poldi-0.4.2+git20161115.553060d/tests/pam-test.c
Examining data/poldi-0.4.2+git20161115.553060d/tests/parse-test.c

FINAL RESULTS:

data/poldi-0.4.2+git20161115.553060d/src/assuan/assuan-defs.h:282:26:  [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.
 __attribute__ ((format (printf,1,2)))
data/poldi-0.4.2+git20161115.553060d/src/assuan/assuan-handler.c:560:15:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
              sprintf (errline, "ERR %d %.50s <%.30s>%s%.100s",
data/poldi-0.4.2+git20161115.553060d/src/assuan/assuan-handler.c:595:15:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
              sprintf (errline, "ERR %d %.50s <%.30s>%s%.100s",
data/poldi-0.4.2+git20161115.553060d/src/assuan/assuan-handler.c:603:13:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
            sprintf (errline, "ERR %d %.50s%s%.100s",
data/poldi-0.4.2+git20161115.553060d/src/assuan/assuan-handler.c:867:7:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
      strcpy (buf+3, line);
data/poldi-0.4.2+git20161115.553060d/src/assuan/assuan-handler.c:894:7:  [4] (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).
      strcat (buffer, keyword);
data/poldi-0.4.2+git20161115.553060d/src/assuan/assuan-handler.c:898:11:  [4] (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).
          strcat (buffer, text);
data/poldi-0.4.2+git20161115.553060d/src/assuan/assuan-handler.c:905:7:  [4] (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).
      strcat (helpbuf, keyword);
data/poldi-0.4.2+git20161115.553060d/src/assuan/assuan-handler.c:909:11:  [4] (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).
          strcat (helpbuf, text);
data/poldi-0.4.2+git20161115.553060d/src/assuan/assuan-inquire.c:163: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 (cmdbuf, "INQUIRE "), keyword);
data/poldi-0.4.2+git20161115.553060d/src/assuan/assuan-inquire.c:370: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 (cmdbuf, "INQUIRE "), keyword);
data/poldi-0.4.2+git20161115.553060d/src/assuan/assuan-listen.c:45:9:  [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 (buf, line);
data/poldi-0.4.2+git20161115.553060d/src/assuan/assuan-listen.c:49: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 (buf+3, line);
data/poldi-0.4.2+git20161115.553060d/src/assuan/assuan-logging.c:113:3:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
  vfprintf (fp, format, arg_ptr );
data/poldi-0.4.2+git20161115.553060d/src/assuan/assuan-pipe-connect.c:333:11:  [4] (shell) execv:
  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.
          execv (name, (char *const *) argv); 
data/poldi-0.4.2+git20161115.553060d/src/assuan/assuan-pipe-connect.c:515:11:  [4] (shell) execv:
  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.
          execv (name, (char *const *) argv); 
data/poldi-0.4.2+git20161115.553060d/src/scd/scd.c:114:11:  [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.
  input = popen (GNUPG_DEFAULT_GPGCONF " --list-dirs agent-socket", "r");
data/poldi-0.4.2+git20161115.553060d/src/scd/scd.c:841:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
  sprintf (line, "GETINFO %s", what);
data/poldi-0.4.2+git20161115.553060d/src/util/simplelog.c:314:7:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
      vfprintf (stream, fmt, ap);
data/poldi-0.4.2+git20161115.553060d/src/util/simpleparse.c:148:3:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
  fprintf (handle->stream_stdout,
data/poldi-0.4.2+git20161115.553060d/tests/pam-test.c:60:3:  [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 (PROGRAM_NAME " " PROGRAM_VERSION "\n");
data/poldi-0.4.2+git20161115.553060d/src/assuan/assuan-logging.c:45:24:  [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.
      full_logging = !!getenv ("ASSUAN_FULL_LOGGING");
data/poldi-0.4.2+git20161115.553060d/src/assuan/assuan-logging.c:257:12:  [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.
  handle = LoadLibrary ("libgpg-error-0.dll");
data/poldi-0.4.2+git20161115.553060d/src/assuan/assuan-pipe-server.c:128: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.
      s = getenv ("_assuan_connection_fd");
data/poldi-0.4.2+git20161115.553060d/src/assuan/assuan-pipe-server.c:154: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.
      s = getenv ("_assuan_pipe_connect_pid");
data/poldi-0.4.2+git20161115.553060d/src/util/filenames.c:54:14:  [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.
      home = getenv ("HOME");
data/poldi-0.4.2+git20161115.553060d/tests/pam-test.c:131:11:  [3] (buffer) getopt_long:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
      c = getopt_long (argc, argv, "vhu:",
data/poldi-0.4.2+git20161115.553060d/src/assuan/assuan-buffer.c:111: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 (line, ctx->inbound.attic.line, atticlen);
data/poldi-0.4.2+git20161115.553060d/src/assuan/assuan-buffer.c:147:11:  [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 (ctx->inbound.attic.line, line, atticlen + nread);
data/poldi-0.4.2+git20161115.553060d/src/assuan/assuan-buffer.c:182: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 (ctx->inbound.attic.line, endp + 1, len);
data/poldi-0.4.2+git20161115.553060d/src/assuan/assuan-buffer.c:392:15:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
              sprintf (line, "%%%02X", *(unsigned char*)buffer);
data/poldi-0.4.2+git20161115.553060d/src/assuan/assuan-client.c:166: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).
      rc = atoi (line);
data/poldi-0.4.2+git20161115.553060d/src/assuan/assuan-defs.h:117: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 line[LINELENGTH];
data/poldi-0.4.2+git20161115.553060d/src/assuan/assuan-defs.h:122: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 line[LINELENGTH];
data/poldi-0.4.2+git20161115.553060d/src/assuan/assuan-defs.h:132: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 line[LINELENGTH];
data/poldi-0.4.2+git20161115.553060d/src/assuan/assuan-handler.c:145: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 buf[ASSUAN_LINELENGTH];
data/poldi-0.4.2+git20161115.553060d/src/assuan/assuan-handler.c:539: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 errline[300];
data/poldi-0.4.2+git20161115.553060d/src/assuan/assuan-handler.c:542:9:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
        sprintf (errline, "ERR %d server fault (%.50s)",
data/poldi-0.4.2+git20161115.553060d/src/assuan/assuan-handler.c:550: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.
          char ebuf[50];
data/poldi-0.4.2+git20161115.553060d/src/assuan/assuan-handler.c:592:15:  [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 ebuf[50];
data/poldi-0.4.2+git20161115.553060d/src/assuan/assuan-handler.c:866: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 (buf, "OK ");
data/poldi-0.4.2+git20161115.553060d/src/assuan/assuan-handler.c:880: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[256];
data/poldi-0.4.2+git20161115.553060d/src/assuan/assuan-handler.c:893: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 (buffer, "S ");
data/poldi-0.4.2+git20161115.553060d/src/assuan/assuan-handler.c:904: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 (helpbuf, "S ");
data/poldi-0.4.2+git20161115.553060d/src/assuan/assuan-inquire.c:91: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 (mb->buf + mb->len, buf, len);
data/poldi-0.4.2+git20161115.553060d/src/assuan/assuan-inquire.c:142: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 cmdbuf[LINELENGTH-10]; /* (10 = strlen ("INQUIRE ")+CR,LF) */
data/poldi-0.4.2+git20161115.553060d/src/assuan/assuan-inquire.c:207:24:  [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 tmp[1];
data/poldi-0.4.2+git20161115.553060d/src/assuan/assuan-inquire.c:297: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 tmp[1];
data/poldi-0.4.2+git20161115.553060d/src/assuan/assuan-inquire.c:356: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 cmdbuf[LINELENGTH-10]; /* (10 = strlen ("INQUIRE ")+CR,LF) */
data/poldi-0.4.2+git20161115.553060d/src/assuan/assuan-listen.c:48:11:  [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 (buf, "OK ");
data/poldi-0.4.2+git20161115.553060d/src/assuan/assuan-logging.c:35:8:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static char prefix_buffer[80];
data/poldi-0.4.2+git20161115.553060d/src/assuan/assuan-logging.c:235:10:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  static char strerr[256];
data/poldi-0.4.2+git20161115.553060d/src/assuan/assuan-pipe-connect.c:190: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 mypidstr[50];
data/poldi-0.4.2+git20161115.553060d/src/assuan/assuan-pipe-connect.c:199:3:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
  sprintf (mypidstr, "%lu", (unsigned long)getpid ());
data/poldi-0.4.2+git20161115.553060d/src/assuan/assuan-pipe-connect.c:248: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.
          char errbuf[512];
data/poldi-0.4.2+git20161115.553060d/src/assuan/assuan-pipe-connect.c:284:24:  [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).
              int fd = open ("/dev/null", O_WRONLY);
data/poldi-0.4.2+git20161115.553060d/src/assuan/assuan-pipe-connect.c:376: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 mypidstr[50];
data/poldi-0.4.2+git20161115.553060d/src/assuan/assuan-pipe-connect.c:385:3:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
  sprintf (mypidstr, "%lu", (unsigned long)getpid ());
data/poldi-0.4.2+git20161115.553060d/src/assuan/assuan-pipe-connect.c:426: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.
          char errbuf[512];
data/poldi-0.4.2+git20161115.553060d/src/assuan/assuan-pipe-connect.c:433:16:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
          fd = open ("/dev/null", O_RDONLY);
data/poldi-0.4.2+git20161115.553060d/src/assuan/assuan-pipe-connect.c:440:16:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
          fd = open ("/dev/null", O_WRONLY);
data/poldi-0.4.2+git20161115.553060d/src/assuan/assuan-pipe-connect.c:458:20:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
              fd = open ("/dev/null", O_WRONLY);
data/poldi-0.4.2+git20161115.553060d/src/assuan/assuan-pipe-connect.c:499:11:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
          sprintf (mypidstr, "%d", fds[1]);
data/poldi-0.4.2+git20161115.553060d/src/assuan/assuan-pipe-connect.c:658: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 mypidstr[50];
data/poldi-0.4.2+git20161115.553060d/src/assuan/assuan-pipe-connect.c:677:3:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
  sprintf (mypidstr, "%lu", (unsigned long)getpid ());
data/poldi-0.4.2+git20161115.553060d/src/assuan/assuan-pipe-server.c:99: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).
  if ( fstat (atoi (s), &buf ) )
data/poldi-0.4.2+git20161115.553060d/src/assuan/assuan-pipe-server.c:134:49:  [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).
          ctx->inbound.fd  = ctx->outbound.fd = atoi (s);
data/poldi-0.4.2+git20161115.553060d/src/assuan/assuan-socket.c:108: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[50], *p;
data/poldi-0.4.2+git20161115.553060d/src/assuan/assuan-socket.c:112:8:  [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 (fname, "rb");
data/poldi-0.4.2+git20161115.553060d/src/assuan/assuan-socket.c:123:10:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
  aval = atoi (buffer);
data/poldi-0.4.2+git20161115.553060d/src/assuan/assuan-socket.c:138: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 (nonce, p, 16);
data/poldi-0.4.2+git20161115.553060d/src/assuan/assuan-socket.c:195: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 nonce[16];
data/poldi-0.4.2+git20161115.553060d/src/assuan/assuan-socket.c:251: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 nonce[16];
data/poldi-0.4.2+git20161115.553060d/src/assuan/assuan-socket.c:262:16:  [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).
      filefd = open (unaddr->sun_path, 
data/poldi-0.4.2+git20161115.553060d/src/assuan/assuan-socket.c:349: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], *p;
data/poldi-0.4.2+git20161115.553060d/src/assuan/assuan-uds.c:91:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char control[CMSG_SPACE(sizeof (int))];
data/poldi-0.4.2+git20161115.553060d/src/assuan/assuan-uds.c:147: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 (buf, (char*)ctx->uds.buffer + ctx->uds.bufferoffset, len);
data/poldi-0.4.2+git20161115.553060d/src/assuan/assuan-uds.c:203: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 control[CMSG_SPACE(sizeof (int))];
data/poldi-0.4.2+git20161115.553060d/src/assuan/assuan-uds.c:207: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[80];
data/poldi-0.4.2+git20161115.553060d/src/assuan/assuan.h:411: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 nonce[16];
data/poldi-0.4.2+git20161115.553060d/src/assuan/assuan.h:427: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           sun_path[108-2-4]; 
data/poldi-0.4.2+git20161115.553060d/src/assuan/setenv.c:161:4:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	  char new_value[namelen + 1 + vallen];
data/poldi-0.4.2+git20161115.553060d/src/assuan/setenv.c:169: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 (new_value, name, namelen);
data/poldi-0.4.2+git20161115.553060d/src/assuan/setenv.c:171: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 (&new_value[namelen + 1], value, vallen);
data/poldi-0.4.2+git20161115.553060d/src/assuan/setenv.c:187:8:  [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 (new_environ[size], new_value, namelen + 1 + vallen);
data/poldi-0.4.2+git20161115.553060d/src/assuan/setenv.c:189:8:  [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 (new_environ[size], name, namelen);
data/poldi-0.4.2+git20161115.553060d/src/assuan/setenv.c:191:8:  [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 (&new_environ[size][namelen + 1], value, vallen);
data/poldi-0.4.2+git20161115.553060d/src/assuan/setenv.c:201: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 ((char *) new_environ, (char *) __environ,
data/poldi-0.4.2+git20161115.553060d/src/assuan/setenv.c:219:4:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	  char new_value[namelen + 1 + vallen];
data/poldi-0.4.2+git20161115.553060d/src/assuan/setenv.c:227: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 (new_value, name, namelen);
data/poldi-0.4.2+git20161115.553060d/src/assuan/setenv.c:229: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 (&new_value[namelen + 1], value, vallen);
data/poldi-0.4.2+git20161115.553060d/src/assuan/setenv.c:244:8:  [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 (np, new_value, namelen + 1 + vallen);
data/poldi-0.4.2+git20161115.553060d/src/assuan/setenv.c:246:8:  [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 (np, name, namelen);
data/poldi-0.4.2+git20161115.553060d/src/assuan/setenv.c:248:8:  [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 (&np[namelen + 1], value, vallen);
data/poldi-0.4.2+git20161115.553060d/src/pam/auth-method-localdb/usersdb.c:69:13:  [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).
  usersdb = fopen (POLDI_USERS_DB_FILE, "r");
data/poldi-0.4.2+git20161115.553060d/src/pam/auth-method-x509/dirmngr.c:296: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 line[ASSUAN_LINELENGTH];
data/poldi-0.4.2+git20161115.553060d/src/scd/scd.c:167:8:  [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 (res, databuf, datalen);
data/poldi-0.4.2+git20161115.553060d/src/scd/scd.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.
      const char *argv[5];
data/poldi-0.4.2+git20161115.553060d/src/scd/scd.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 (p, line, s-line);
data/poldi-0.4.2+git20161115.553060d/src/scd/scd.c:481: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/poldi-0.4.2+git20161115.553060d/src/scd/scd.c:553: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 (*serialno, line, n);
data/poldi-0.4.2+git20161115.553060d/src/scd/scd.c:700: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 *p, line[ASSUAN_LINELENGTH];
data/poldi-0.4.2+git20161115.553060d/src/scd/scd.c:723:3:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
  sprintf (line, "SETDATA ");
data/poldi-0.4.2+git20161115.553060d/src/scd/scd.c:762: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 (p, sigbuf, sigbuflen);
data/poldi-0.4.2+git20161115.553060d/src/scd/scd.c:782: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 line[ASSUAN_LINELENGTH];
data/poldi-0.4.2+git20161115.553060d/src/scd/scd.c:833: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 line[ASSUAN_LINELENGTH];
data/poldi-0.4.2+git20161115.553060d/src/scd/scd.c:862: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 (res, databuf, datalen);
data/poldi-0.4.2+git20161115.553060d/src/scd/scd.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 fpr1[20];
data/poldi-0.4.2+git20161115.553060d/src/scd/scd.h:42: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/poldi-0.4.2+git20161115.553060d/src/scd/scd.h:43: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/poldi-0.4.2+git20161115.553060d/src/util/membuf.c:84: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 (mb->buf + mb->len, buf, len);
data/poldi-0.4.2+git20161115.553060d/src/util/simplelog.c: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 prefix[LOG_PREFIX_LENGTH];
data/poldi-0.4.2+git20161115.553060d/src/util/simplelog.c:78:12:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  stream = fopen (filename, "a");
data/poldi-0.4.2+git20161115.553060d/src/util/simpleparse.c:62:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
typedef char token_t[TOKENSIZE];
data/poldi-0.4.2+git20161115.553060d/src/util/simpleparse.c:455: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 (list->tokens[list->size], item, item_length);
data/poldi-0.4.2+git20161115.553060d/src/util/simpleparse.c:744:8:  [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 (filename, "r");
data/poldi-0.4.2+git20161115.553060d/src/util/support.c:239:12:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
      fp = fopen (filename, "r");
data/poldi-0.4.2+git20161115.553060d/src/assuan/assuan-buffer.c:274:30:  [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 prefixlen = prefix? strlen (prefix):0;
data/poldi-0.4.2+git20161115.553060d/src/assuan/assuan-buffer.c:346:23:  [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 = s? (s-line) : strlen (line);
data/poldi-0.4.2+git20161115.553060d/src/assuan/assuan-handler.c:95: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).
          for (p = value + strlen(value) - 1; p > value && spacep (p); p--)
data/poldi-0.4.2+git20161115.553060d/src/assuan/assuan-handler.c:187: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).
      memset (line, ' ', endp? (endp-line):strlen(line));
data/poldi-0.4.2+git20161115.553060d/src/assuan/assuan-handler.c:863:33:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      char *buf = xtrymalloc (3+strlen(line)+1);
data/poldi-0.4.2+git20161115.553060d/src/assuan/assuan-handler.c:890: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).
  n = 2 + strlen (keyword) + 1 + strlen (text) + 1;
data/poldi-0.4.2+git20161115.553060d/src/assuan/assuan-handler.c:890:34:  [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).
  n = 2 + strlen (keyword) + 1 + strlen (text) + 1;
data/poldi-0.4.2+git20161115.553060d/src/assuan/assuan-handler.c:897:11:  [1] (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 character.
          strcat (buffer, " ");
data/poldi-0.4.2+git20161115.553060d/src/assuan/assuan-handler.c:908:11:  [1] (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 character.
          strcat (helpbuf, " ");
data/poldi-0.4.2+git20161115.553060d/src/assuan/assuan-inquire.c:147:33:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  if (!ctx || !keyword || (10 + strlen (keyword) >= sizeof (cmdbuf)))
data/poldi-0.4.2+git20161115.553060d/src/assuan/assuan-inquire.c:358:33:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  if (!ctx || !keyword || (10 + strlen (keyword) >= sizeof (cmdbuf)))
data/poldi-0.4.2+git20161115.553060d/src/assuan/assuan-io.c:90:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  return read (fd, buffer, size);
data/poldi-0.4.2+git20161115.553060d/src/assuan/assuan-listen.c:41:33:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      char *buf = xtrymalloc (3+strlen(line)+1);
data/poldi-0.4.2+git20161115.553060d/src/assuan/assuan-listen.c:100:47:  [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).
      rc = _assuan_write_line (ctx, "OK ", p, strlen (p));
data/poldi-0.4.2+git20161115.553060d/src/assuan/assuan-logging.c:85:7:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
      strncpy (prefix_buffer, text, sizeof (prefix_buffer)-1);
data/poldi-0.4.2+git20161115.553060d/src/assuan/assuan-logging.c:118:35:  [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 (format && *format && format[strlen(format)-1] == '\n')
data/poldi-0.4.2+git20161115.553060d/src/assuan/assuan-pipe-connect.c:340:30:  [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).
          writen (1, errbuf, strlen (errbuf));
data/poldi-0.4.2+git20161115.553060d/src/assuan/assuan-pipe-connect.c:522:35:  [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).
          writen (fds[1], errbuf, strlen (errbuf));
data/poldi-0.4.2+git20161115.553060d/src/assuan/assuan-pipe-connect.c:561: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).
      n += strlen (s) + 1 + 2;  /* (1 space, 2 quoting */
data/poldi-0.4.2+git20161115.553060d/src/assuan/assuan-socket-connect.c:51: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).
	               + strlen ((ptr)->sun_path))
data/poldi-0.4.2+git20161115.553060d/src/assuan/assuan-socket-connect.c:116: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 (name)+1 >= sizeof srvr_addr.sun_path)
data/poldi-0.4.2+git20161115.553060d/src/assuan/assuan-socket-connect.c:135:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
  strncpy (srvr_addr.sun_path, name, sizeof (srvr_addr.sun_path) - 1);
data/poldi-0.4.2+git20161115.553060d/src/assuan/assuan-uds.c:221: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).
  iovec.iov_len = strlen (buffer);
data/poldi-0.4.2+git20161115.553060d/src/assuan/setenv.c:119: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).
  const size_t namelen = strlen (name);
data/poldi-0.4.2+git20161115.553060d/src/assuan/setenv.c:120:41:  [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).
  const size_t vallen = value != NULL ? strlen (value) + 1 : 0;
data/poldi-0.4.2+git20161115.553060d/src/assuan/setenv.c:287:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  len = strlen (name);
data/poldi-0.4.2+git20161115.553060d/src/pam/auth-method-x509/auth-x509.c:125:5:  [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 (arg), strerror (errno));
data/poldi-0.4.2+git20161115.553060d/src/pam/auth-method-x509/auth-x509.c:137:5:  [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 (arg), strerror (errno));
data/poldi-0.4.2+git20161115.553060d/src/pam/auth-method-x509/auth-x509.c:302: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).
  size_t subject_len = strlen (subject);
data/poldi-0.4.2+git20161115.553060d/src/pam/auth-method-x509/auth-x509.c:303: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).
  size_t x509_domain_len = strlen (x509_domain);
data/poldi-0.4.2+git20161115.553060d/src/pam/auth-method-x509/auth-x509.c:341:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
  strncpy (name, address + 1, name_len);
data/poldi-0.4.2+git20161115.553060d/src/pam/auth-support/getpin-cb.c:72: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 (buffer) < 6)	/* FIXME? is it really minimum of 6 bytes? */
data/poldi-0.4.2+git20161115.553060d/src/pam/auth-support/getpin-cb.c:81: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 (buffer) >= pin_size)
data/poldi-0.4.2+git20161115.553060d/src/pam/auth-support/getpin-cb.c:88:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
  strncpy (pin, buffer, pin_size - 1);
data/poldi-0.4.2+git20161115.553060d/src/pam/auth-support/getpin-cb.c:146: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).
  *info_frobbed = xtrymalloc (strlen (info) + 1);
data/poldi-0.4.2+git20161115.553060d/src/pam/auth-support/getpin-cb.c:215: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).
			 (unsigned int) strlen (info));
data/poldi-0.4.2+git20161115.553060d/src/scd/scd.c:372: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).
  buffer = d = xtrymalloc (strlen ((const char*)s)+1);
data/poldi-0.4.2+git20161115.553060d/src/scd/scd.c:724:14:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  p = line + strlen (line);
data/poldi-0.4.2+git20161115.553060d/src/util/filenames.c:46: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).
  n = strlen (first_part) + 1;
data/poldi-0.4.2+git20161115.553060d/src/util/filenames.c:48: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).
    n += strlen (s) + 1;
data/poldi-0.4.2+git20161115.553060d/src/util/filenames.c:56: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).
	n += strlen (home);
data/poldi-0.4.2+git20161115.553060d/src/util/membuf.c:92:27:  [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).
  put_membuf (mb, string, strlen (string));
data/poldi-0.4.2+git20161115.553060d/src/util/simplelog.c:211:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
  strncpy (handle->prefix, prefix, sizeof (handle->prefix) - 1);
data/poldi-0.4.2+git20161115.553060d/src/util/simpleparse.c:191: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 ((j = strlen (specs[i].long_opt)) > indent && j < 35)
data/poldi-0.4.2+git20161115.553060d/src/util/support.c:206:46:  [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).
  err = gcry_sexp_sscan (sexp, NULL, string, strlen (string));

ANALYSIS SUMMARY:

Hits = 162
Lines analyzed = 14199 in approximately 0.38 seconds (37511 lines/second)
Physical Source Lines of Code (SLOC) = 9494
Hits@level = [0]  57 [1]  45 [2]  90 [3]   6 [4]  21 [5]   0
Hits@level+ = [0+] 219 [1+] 162 [2+] 117 [3+]  27 [4+]  21 [5+]   0
Hits/KSLOC@level+ = [0+] 23.0672 [1+] 17.0634 [2+] 12.3236 [3+] 2.8439 [4+] 2.21192 [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.