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/krb5-sync-3.1/util/messages.h
Examining data/krb5-sync-3.1/util/xmalloc.h
Examining data/krb5-sync-3.1/util/messages.c
Examining data/krb5-sync-3.1/util/messages-krb5.h
Examining data/krb5-sync-3.1/util/messages-krb5.c
Examining data/krb5-sync-3.1/util/xmalloc.c
Examining data/krb5-sync-3.1/util/macros.h
Examining data/krb5-sync-3.1/tests/util/messages-krb5-t.c
Examining data/krb5-sync-3.1/tests/util/messages-t.c
Examining data/krb5-sync-3.1/tests/util/xmalloc.c
Examining data/krb5-sync-3.1/tests/portable/snprintf-t.c
Examining data/krb5-sync-3.1/tests/portable/snprintf.c
Examining data/krb5-sync-3.1/tests/portable/reallocarray-t.c
Examining data/krb5-sync-3.1/tests/portable/asprintf.c
Examining data/krb5-sync-3.1/tests/portable/mkstemp.c
Examining data/krb5-sync-3.1/tests/portable/reallocarray.c
Examining data/krb5-sync-3.1/tests/portable/asprintf-t.c
Examining data/krb5-sync-3.1/tests/portable/mkstemp-t.c
Examining data/krb5-sync-3.1/tests/runtests.c
Examining data/krb5-sync-3.1/tests/tap/kerberos.c
Examining data/krb5-sync-3.1/tests/tap/messages.h
Examining data/krb5-sync-3.1/tests/tap/string.c
Examining data/krb5-sync-3.1/tests/tap/basic.c
Examining data/krb5-sync-3.1/tests/tap/messages.c
Examining data/krb5-sync-3.1/tests/tap/sync.c
Examining data/krb5-sync-3.1/tests/tap/process.c
Examining data/krb5-sync-3.1/tests/tap/kerberos.h
Examining data/krb5-sync-3.1/tests/tap/basic.h
Examining data/krb5-sync-3.1/tests/tap/string.h
Examining data/krb5-sync-3.1/tests/tap/sync.h
Examining data/krb5-sync-3.1/tests/tap/macros.h
Examining data/krb5-sync-3.1/tests/tap/process.h
Examining data/krb5-sync-3.1/tests/plugin/queuing-t.c
Examining data/krb5-sync-3.1/tests/plugin/queue-only-t.c
Examining data/krb5-sync-3.1/tests/plugin/mit-t.c
Examining data/krb5-sync-3.1/tests/plugin/heimdal-t.c
Examining data/krb5-sync-3.1/portable/dummy.c
Examining data/krb5-sync-3.1/portable/system.h
Examining data/krb5-sync-3.1/portable/krb5.h
Examining data/krb5-sync-3.1/portable/snprintf.c
Examining data/krb5-sync-3.1/portable/asprintf.c
Examining data/krb5-sync-3.1/portable/mkstemp.c
Examining data/krb5-sync-3.1/portable/reallocarray.c
Examining data/krb5-sync-3.1/portable/krb5-extra.c
Examining data/krb5-sync-3.1/portable/stdbool.h
Examining data/krb5-sync-3.1/portable/krb5-profile.c
Examining data/krb5-sync-3.1/portable/strndup.c
Examining data/krb5-sync-3.1/portable/macros.h
Examining data/krb5-sync-3.1/portable/kadmin.h
Examining data/krb5-sync-3.1/tools/krb5-sync.c
Examining data/krb5-sync-3.1/plugin/internal.h
Examining data/krb5-sync-3.1/plugin/vector.c
Examining data/krb5-sync-3.1/plugin/error.c
Examining data/krb5-sync-3.1/plugin/queue.c
Examining data/krb5-sync-3.1/plugin/general.c
Examining data/krb5-sync-3.1/plugin/logging.c
Examining data/krb5-sync-3.1/plugin/instance.c
Examining data/krb5-sync-3.1/plugin/heimdal.c
Examining data/krb5-sync-3.1/plugin/ad.c
Examining data/krb5-sync-3.1/plugin/mit.c
Examining data/krb5-sync-3.1/plugin/config.c

FINAL RESULTS:

data/krb5-sync-3.1/plugin/error.c:32:50:  [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.
static krb5_error_code __attribute__((__format__(printf, 3, 0)))
data/krb5-sync-3.1/plugin/general.c:74:49:  [4] (format) syslog:
  If syslog's format strings can be influenced by an attacker, they can be
  exploited (CWE-134). Use a constant format string for syslog.
    sync_config_boolean(ctx, "syslog", &config->syslog);
data/krb5-sync-3.1/plugin/internal.h:53:10:  [4] (format) syslog:
  If syslog's format strings can be influenced by an attacker, they can be
  exploited (CWE-134). Use a constant format string for syslog.
    bool syslog;
data/krb5-sync-3.1/plugin/internal.h:146:44:  [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__((__nonnull__, __format__(printf, 2, 3)));
data/krb5-sync-3.1/plugin/internal.h:148:44:  [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__((__nonnull__, __format__(printf, 2, 3)));
data/krb5-sync-3.1/plugin/internal.h:150:44:  [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__((__nonnull__, __format__(printf, 3, 4)));
data/krb5-sync-3.1/plugin/internal.h:152:44:  [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__((__nonnull__, __format__(printf, 2, 3)));
data/krb5-sync-3.1/plugin/internal.h:156:44:  [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__((__nonnull__, __format__(printf, 2, 3)));
data/krb5-sync-3.1/plugin/internal.h:158:44:  [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__((__nonnull__, __format__(printf, 2, 3)));
data/krb5-sync-3.1/plugin/internal.h:160:44:  [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__((__nonnull__, __format__(printf, 2, 3)));
data/krb5-sync-3.1/plugin/internal.h:162:44:  [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__((__nonnull__, __format__(printf, 2, 3)));
data/krb5-sync-3.1/plugin/logging.c:32:39:  [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.
static void __attribute__((__format__(printf, 3, 0)))
data/krb5-sync-3.1/plugin/logging.c:40:18:  [4] (format) syslog:
  If syslog's format strings can be influenced by an attacker, they can be
  exploited (CWE-134). Use a constant format string for syslog.
    if (!config->syslog)
data/krb5-sync-3.1/portable/asprintf.c:37:31:  [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, 2, 3)));
data/krb5-sync-3.1/portable/asprintf.c:39:31:  [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, 2, 0)));
data/krb5-sync-3.1/portable/asprintf.c:63:14:  [4] (format) vsnprintf:
  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.
    needed = vsnprintf(NULL, 0, fmt, args_copy);
data/krb5-sync-3.1/portable/asprintf.c:72:14:  [4] (format) vsnprintf:
  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.
    status = vsnprintf(*strp, needed + 1, fmt, args);
data/krb5-sync-3.1/portable/snprintf.c:22: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.
# undef snprintf
data/krb5-sync-3.1/portable/snprintf.c:23:9:  [4] (format) vsnprintf:
  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.
# undef vsnprintf
data/krb5-sync-3.1/portable/snprintf.c:24:10:  [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 test_snprintf
data/krb5-sync-3.1/portable/snprintf.c:25:10:  [4] (format) vsnprintf:
  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 vsnprintf test_vsnprintf
data/krb5-sync-3.1/portable/snprintf.c:127:5:  [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.
int snprintf (char *str, size_t count, const char *fmt, ...);
data/krb5-sync-3.1/portable/snprintf.c:128:5:  [4] (format) vsnprintf:
  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.
int vsnprintf (char *str, size_t count, const char *fmt, va_list arg);
data/krb5-sync-3.1/portable/snprintf.c:843:5:  [4] (format) vsnprintf:
  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.
int vsnprintf (char *str, size_t count, const char *fmt, va_list args)
data/krb5-sync-3.1/portable/snprintf.c:852:5:  [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.
int snprintf (char *str,size_t count,const char *fmt,...)
data/krb5-sync-3.1/portable/snprintf.c:854:5:  [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.
int snprintf (va_alist) va_dcl
data/krb5-sync-3.1/portable/snprintf.c:869:11:  [4] (format) vsnprintf:
  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.
  total = vsnprintf(str, count, fmt, ap);
data/krb5-sync-3.1/portable/snprintf.c:922:7:  [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.
      snprintf (buf1, sizeof (buf1), fp_fmt[x], fp_nums[y]);
data/krb5-sync-3.1/portable/snprintf.c:923:7:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
      sprintf (buf2, fp_fmt[x], fp_nums[y]);
data/krb5-sync-3.1/portable/snprintf.c:936:7:  [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.
      snprintf (buf1, sizeof (buf1), int_fmt[x], int_nums[y]);
data/krb5-sync-3.1/portable/snprintf.c:937:7:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
      sprintf (buf2, int_fmt[x], int_nums[y]);
data/krb5-sync-3.1/portable/system.h:78:10:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
# define snprintf _snprintf
data/krb5-sync-3.1/portable/system.h:78:19:  [4] (format) _snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
# define snprintf _snprintf
data/krb5-sync-3.1/portable/system.h:120:31:  [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, 2, 3)));
data/krb5-sync-3.1/portable/system.h:124:12:  [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.
extern int snprintf(char *, size_t, const char *, ...)
data/krb5-sync-3.1/portable/system.h:125:31:  [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, 3, 4)));
data/krb5-sync-3.1/portable/system.h:128:12:  [4] (format) vsnprintf:
  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.
extern int vsnprintf(char *, size_t, const char *, va_list);
data/krb5-sync-3.1/tests/plugin/queuing-t.c:76:8:  [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.
    ok(access("queue/.lock", F_OK) == 0, "...lock file now exists");
data/krb5-sync-3.1/tests/portable/asprintf-t.c:25:31:  [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, 2, 3)));
data/krb5-sync-3.1/tests/portable/mkstemp-t.c:62:8:  [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.
    ok(access(template, F_OK) == 0, "...and the file exists");
data/krb5-sync-3.1/tests/portable/snprintf-t.c:166:21:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
            count = sprintf(lgbuf, fp_formats[i], fp_nums[j]);
data/krb5-sync-3.1/tests/portable/snprintf-t.c:171:21:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
            count = sprintf(lgbuf, int_formats[i], int_nums[j]);
data/krb5-sync-3.1/tests/portable/snprintf-t.c:176:21:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
            count = sprintf(lgbuf, uint_formats[i], uint_nums[j]);
data/krb5-sync-3.1/tests/portable/snprintf-t.c:181:21:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
            count = sprintf(lgbuf, llong_formats[i], llong_nums[j]);
data/krb5-sync-3.1/tests/portable/snprintf-t.c:186:21:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
            count = sprintf(lgbuf, ullong_formats[i], ullong_nums[j]);
data/krb5-sync-3.1/tests/runtests.c:284:58:  [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__((__nonnull__, __noreturn__, __format__(printf, 1, 2)));
data/krb5-sync-3.1/tests/runtests.c:308:5:  [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(stderr, format, args);
data/krb5-sync-3.1/tests/runtests.c:544:13:  [4] (shell) execl:
  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.
        if (execl(path, path, (char *) 0) == -1)
data/krb5-sync-3.1/tests/runtests.c:1150:9:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
    if (access(path, X_OK) < 0)
data/krb5-sync-3.1/tests/runtests.c:1476:9:  [4] (shell) execl:
  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.
    if (execl(path, path, (char *) 0) == -1)
data/krb5-sync-3.1/tests/runtests.c:1508:13:  [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(usage_message, program, program, program, usage_extra);
data/krb5-sync-3.1/tests/runtests.c:1529: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(stderr, usage_message, program, program, program, usage_extra);
data/krb5-sync-3.1/tests/runtests.c:1561:9:  [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(banner, shortlist);
data/krb5-sync-3.1/tests/tap/basic.c:134:13:  [4] (format) vprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
            vprintf(format, args);              \
data/krb5-sync-3.1/tests/tap/basic.c:431:9:  [4] (format) vprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
        vprintf(format, args);
data/krb5-sync-3.1/tests/tap/basic.c:587:5:  [4] (format) vprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    vprintf(format, args);
data/krb5-sync-3.1/tests/tap/basic.c:609:5:  [4] (format) vprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    vprintf(format, args);
data/krb5-sync-3.1/tests/tap/basic.c:630:5:  [4] (format) vprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    vprintf(format, args);
data/krb5-sync-3.1/tests/tap/basic.c:652:5:  [4] (format) vprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    vprintf(format, args);
data/krb5-sync-3.1/tests/tap/basic.c:841:13:  [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(path, R_OK) == 0)
data/krb5-sync-3.1/tests/tap/basic.c:882:9:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
    if (access(path, X_OK) < 0)
data/krb5-sync-3.1/tests/tap/basic.h:66:45:  [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__((__noreturn__, __format__(printf, 1, 2)));
data/krb5-sync-3.1/tests/tap/basic.h:75:31:  [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, 2, 3)));
data/krb5-sync-3.1/tests/tap/basic.h:77:31:  [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, 2, 0)));
data/krb5-sync-3.1/tests/tap/basic.h:79:31:  [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/krb5-sync-3.1/tests/tap/basic.h:86:31:  [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, 3, 4)));
data/krb5-sync-3.1/tests/tap/basic.h:88:31:  [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, 2, 3)));
data/krb5-sync-3.1/tests/tap/basic.h:95:31:  [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, 3, 4)));
data/krb5-sync-3.1/tests/tap/basic.h:97:31:  [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, 3, 4)));
data/krb5-sync-3.1/tests/tap/basic.h:99:31:  [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, 3, 4)));
data/krb5-sync-3.1/tests/tap/basic.h:103:58:  [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__((__noreturn__, __nonnull__, __format__(printf, 1, 2)));
data/krb5-sync-3.1/tests/tap/basic.h:105:58:  [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__((__noreturn__, __nonnull__, __format__(printf, 1, 2)));
data/krb5-sync-3.1/tests/tap/basic.h:109:44:  [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__((__nonnull__, __format__(printf, 1, 2)));
data/krb5-sync-3.1/tests/tap/basic.h:111:44:  [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__((__nonnull__, __format__(printf, 1, 2)));
data/krb5-sync-3.1/tests/tap/kerberos.c:194:18:  [4] (shell) system:
  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.
        status = system(command);
data/krb5-sync-3.1/tests/tap/kerberos.h:111:58:  [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__((__noreturn__, __nonnull__, __format__(printf, 3, 4)));
data/krb5-sync-3.1/tests/tap/kerberos.h:115:44:  [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__((__nonnull__, __format__(printf, 3, 4)));
data/krb5-sync-3.1/tests/tap/messages.c:50:39:  [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.
static void __attribute__((__format__(printf, 2, 0)))
data/krb5-sync-3.1/tests/tap/process.c:195:5:  [4] (shell) execvp:
  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.
    execvp(argv[0], argv);
data/krb5-sync-3.1/tests/tap/process.c:454:13:  [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.
        if (execv(argv[0], (char *const *) argv) < 0)
data/krb5-sync-3.1/tests/tap/process.c:464:42:  [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.
    for (i = 0; i < PROCESS_WAIT * 10 && access(pidfile, F_OK) != 0; i++) {
data/krb5-sync-3.1/tests/tap/process.c:474:9:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
    if (access(pidfile, F_OK) != 0) {
data/krb5-sync-3.1/tests/tap/process.h:54:31:  [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, 5, 6), __nonnull__(1)));
data/krb5-sync-3.1/tests/tap/string.h:43:44:  [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__((__nonnull__, __format__(printf, 2, 3)));
data/krb5-sync-3.1/tests/tap/string.h:45:44:  [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__((__nonnull__, __format__(printf, 2, 0)));
data/krb5-sync-3.1/tests/tap/sync.c:110:13:  [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(path, F_OK) == 0)
data/krb5-sync-3.1/tests/util/messages-t.c:95:39:  [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.
static void __attribute__((__format__(printf, 2, 0)))
data/krb5-sync-3.1/tests/util/messages-t.c:98:5:  [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(stderr, format, args);
data/krb5-sync-3.1/tests/util/xmalloc.c:267:39:  [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.
static void __attribute__((__format__(printf, 2, 3)))
data/krb5-sync-3.1/util/messages-krb5.h:47:58:  [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__((__nonnull__, __noreturn__, __format__(printf, 3, 4)));
data/krb5-sync-3.1/util/messages-krb5.h:49:44:  [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__((__nonnull__, __format__(printf, 3, 4)));
data/krb5-sync-3.1/util/messages.c:195:5:  [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(stdout, fmt, args);
data/krb5-sync-3.1/util/messages.c:213:5:  [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(stderr, fmt, args);
data/krb5-sync-3.1/util/messages.c:228:39:  [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.
static void __attribute__((__format__(printf, 3, 0)))
data/krb5-sync-3.1/util/messages.c:240:14:  [4] (format) vsnprintf:
  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.
    status = vsnprintf(buffer, len + 1, fmt, args);
data/krb5-sync-3.1/util/messages.c:300:14:  [4] (format) vsnprintf:
  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.
    length = vsnprintf(NULL, 0, format, args);
data/krb5-sync-3.1/util/messages.c:319:14:  [4] (format) vsnprintf:
  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.
    length = vsnprintf(NULL, 0, format, args);
data/krb5-sync-3.1/util/messages.c:339:14:  [4] (format) vsnprintf:
  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.
    length = vsnprintf(NULL, 0, format, args);
data/krb5-sync-3.1/util/messages.c:358:14:  [4] (format) vsnprintf:
  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.
    length = vsnprintf(NULL, 0, format, args);
data/krb5-sync-3.1/util/messages.c:378:14:  [4] (format) vsnprintf:
  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.
    length = vsnprintf(NULL, 0, format, args);
data/krb5-sync-3.1/util/messages.c:397:14:  [4] (format) vsnprintf:
  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.
    length = vsnprintf(NULL, 0, format, args);
data/krb5-sync-3.1/util/messages.c:417:14:  [4] (format) vsnprintf:
  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.
    length = vsnprintf(NULL, 0, format, args);
data/krb5-sync-3.1/util/messages.h:50:44:  [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__((__nonnull__, __format__(printf, 1, 2)));
data/krb5-sync-3.1/util/messages.h:52:44:  [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__((__nonnull__, __format__(printf, 1, 2)));
data/krb5-sync-3.1/util/messages.h:54:44:  [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__((__nonnull__, __format__(printf, 1, 2)));
data/krb5-sync-3.1/util/messages.h:56:44:  [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__((__nonnull__, __format__(printf, 1, 2)));
data/krb5-sync-3.1/util/messages.h:58:44:  [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__((__nonnull__, __format__(printf, 1, 2)));
data/krb5-sync-3.1/util/messages.h:60:58:  [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__((__nonnull__, __noreturn__, __format__(printf, 1, 2)));
data/krb5-sync-3.1/util/messages.h:62:58:  [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__((__nonnull__, __noreturn__, __format__(printf, 1, 2)));
data/krb5-sync-3.1/util/messages.h:87:31:  [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, 2, 0), __nonnull__));
data/krb5-sync-3.1/util/messages.h:89:31:  [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, 2, 0), __nonnull__));
data/krb5-sync-3.1/util/messages.h:91:31:  [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, 2, 0), __nonnull__));
data/krb5-sync-3.1/util/messages.h:93:31:  [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, 2, 0), __nonnull__));
data/krb5-sync-3.1/util/messages.h:95:31:  [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, 2, 0), __nonnull__));
data/krb5-sync-3.1/util/messages.h:97:31:  [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, 2, 0), __nonnull__));
data/krb5-sync-3.1/util/messages.h:99:31:  [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, 2, 0), __nonnull__));
data/krb5-sync-3.1/util/messages.h:101:31:  [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, 2, 0), __nonnull__));
data/krb5-sync-3.1/util/messages.h:105:31:  [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, 2, 0)));
data/krb5-sync-3.1/util/xmalloc.c:229:18:  [4] (format) vsnprintf:
  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.
        status = vsnprintf(NULL, 0, fmt, args_copy);
data/krb5-sync-3.1/util/xmalloc.c:253:18:  [4] (format) vsnprintf:
  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.
        status = vsnprintf(NULL, 0, fmt, args_copy);
data/krb5-sync-3.1/util/xmalloc.c:276:18:  [4] (format) vsnprintf:
  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.
        status = vsnprintf(NULL, 0, fmt, args_copy);
data/krb5-sync-3.1/util/xmalloc.h:93:44:  [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__((__nonnull__, __format__(printf, 2, 0)));
data/krb5-sync-3.1/util/xmalloc.h:98:44:  [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__((__nonnull__, __format__(printf, 4, 5)));
data/krb5-sync-3.1/util/xmalloc.h:101:44:  [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__((__nonnull__, __format__(printf, 2, 3)));
data/krb5-sync-3.1/tests/runtests.c:1502:22:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
    while ((option = getopt(argc, argv, "b:hl:os:v")) != EOF) {
data/krb5-sync-3.1/tests/runtests.c:1537:9:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    if (getenv("C_TAP_VERBOSE") != NULL)
data/krb5-sync-3.1/tests/tap/basic.c:837:16:  [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.
        base = getenv(envs[i]);
data/krb5-sync-3.1/tests/tap/basic.c:878:13:  [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.
    build = getenv("BUILD");
data/krb5-sync-3.1/tools/krb5-sync.c:174:22:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
    while ((option = getopt(argc, argv, "def:p:")) != EOF) {
data/krb5-sync-3.1/plugin/ad.c:275: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 *strvals[2];
data/krb5-sync-3.1/plugin/ad.c:380: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(value, vals[0]->bv_val, vals[0]->bv_len);
data/krb5-sync-3.1/plugin/queue.c:66:10:  [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(lockpath, O_RDWR | O_CREAT, 0644);
data/krb5-sync-3.1/plugin/queue.c:268:14:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        fd = open(path, O_WRONLY | O_CREAT | O_EXCL, 0600);
data/krb5-sync-3.1/portable/krb5-profile.c:60: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.
        const char *names[5];
data/krb5-sync-3.1/portable/mkstemp.c:37:9:  [2] (tmpfile) mkstemp:
  Potential for temporary file vulnerability in some circumstances. Some
  older Unix-like systems create temp files with permission to write by all
  by default, so be sure to set the umask to override this. Also, some older
  Unix systems might fail to use O_EXCL when opening the file, so make sure
  that O_EXCL is used by the library (CWE-377).
# undef mkstemp
data/krb5-sync-3.1/portable/mkstemp.c:38:10:  [2] (tmpfile) mkstemp:
  Potential for temporary file vulnerability in some circumstances. Some
  older Unix-like systems create temp files with permission to write by all
  by default, so be sure to set the umask to override this. Also, some older
  Unix systems might fail to use O_EXCL when opening the file, so make sure
  that O_EXCL is used by the library (CWE-377).
# define mkstemp test_mkstemp
data/krb5-sync-3.1/portable/mkstemp.c:50:1:  [2] (tmpfile) mkstemp:
  Potential for temporary file vulnerability in some circumstances. Some
  older Unix-like systems create temp files with permission to write by all
  by default, so be sure to set the umask to override this. Also, some older
  Unix systems might fail to use O_EXCL when opening the file, so make sure
  that O_EXCL is used by the library (CWE-377).
mkstemp(char *template)
data/krb5-sync-3.1/portable/mkstemp.c:88:14:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        fd = open(template, O_RDWR | O_CREAT | O_EXCL, 0600);
data/krb5-sync-3.1/portable/snprintf.c:515: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 convert[24];
data/krb5-sync-3.1/portable/snprintf.c:645: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 iconvert[24];
data/krb5-sync-3.1/portable/snprintf.c:646: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 fconvert[24];
data/krb5-sync-3.1/portable/snprintf.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 buf1[LONG_STRING];
data/krb5-sync-3.1/portable/snprintf.c:881: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 buf2[LONG_STRING];
data/krb5-sync-3.1/portable/strndup.c:52: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(copy, s, length);
data/krb5-sync-3.1/portable/system.h:104:25:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
#  define va_copy(d, s) memcpy(&(d), &(s), sizeof(va_list))
data/krb5-sync-3.1/portable/system.h:131:12:  [2] (tmpfile) mkstemp:
  Potential for temporary file vulnerability in some circumstances. Some
  older Unix-like systems create temp files with permission to write by all
  by default, so be sure to set the umask to override this. Also, some older
  Unix systems might fail to use O_EXCL when opening the file, so make sure
  that O_EXCL is used by the library (CWE-377).
extern int mkstemp(char *);
data/krb5-sync-3.1/tests/plugin/queue-only-t.c:33: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.
    const char *setup_argv[6];
data/krb5-sync-3.1/tests/portable/mkstemp-t.c:36: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 buffer[256];
data/krb5-sync-3.1/tests/portable/reallocarray-t.c:42: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(p, "123456789", 10);
data/krb5-sync-3.1/tests/portable/reallocarray-t.c:46: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(p + 9, "0123456789", 11);
data/krb5-sync-3.1/tests/portable/snprintf-t.c:106: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 buf[128];
data/krb5-sync-3.1/tests/portable/snprintf-t.c:124: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 lgbuf[128];
data/krb5-sync-3.1/tests/runtests.c:389: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(p, s, len);
data/krb5-sync-3.1/tests/runtests.c:434: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(result + offset, string, strlen(string));
data/krb5-sync-3.1/tests/runtests.c:523: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).
        infd = open("/dev/null", O_RDONLY);
data/krb5-sync-3.1/tests/runtests.c:534:17:  [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).
        errfd = open("/dev/null", O_WRONLY);
data/krb5-sync-3.1/tests/runtests.c:1035: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 buffer[BUFSIZ];
data/krb5-sync-3.1/tests/runtests.c:1176: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.
    const char *bases[3], *suffix, *base;
data/krb5-sync-3.1/tests/runtests.c:1178: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.
    const char *suffixes[3] = { "-t", ".t", "" };
data/krb5-sync-3.1/tests/runtests.c:1217: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 buffer[BUFSIZ];
data/krb5-sync-3.1/tests/runtests.c:1229: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).
    file = fopen(filename, "r");
data/krb5-sync-3.1/tests/tap/basic.c:177: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(result + offset, string, strlen(string));
data/krb5-sync-3.1/tests/tap/basic.c:669:18:  [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).
    file->file = fopen(file->name, "r");
data/krb5-sync-3.1/tests/tap/basic.c:792: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(p, s, len);
data/krb5-sync-3.1/tests/tap/basic.c:816: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(copy, s, length);
data/krb5-sync-3.1/tests/tap/kerberos.c:166: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 principal[BUFSIZ], *command;
data/krb5-sync-3.1/tests/tap/kerberos.c:177: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).
    file = fopen(path, "r");
data/krb5-sync-3.1/tests/tap/kerberos.c:292: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 buffer[BUFSIZ];
data/krb5-sync-3.1/tests/tap/kerberos.c:324:16:  [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).
        file = fopen(path, "r");
data/krb5-sync-3.1/tests/tap/kerberos.c:363:16:  [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).
        file = fopen(path, "r");
data/krb5-sync-3.1/tests/tap/kerberos.c:432: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.
    const char *argv[3];
data/krb5-sync-3.1/tests/tap/process.c:371: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 buffer[BUFSIZ];
data/krb5-sync-3.1/tests/tap/process.c:374: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).
    file = fopen(path, "r");
data/krb5-sync-3.1/tests/tap/process.c:424:14:  [2] (tmpfile) mkstemp:
  Potential for temporary file vulnerability in some circumstances. Some
  older Unix-like systems create temp files with permission to write by all
  by default, so be sure to set the umask to override this. Also, some older
  Unix systems might fail to use O_EXCL when opening the file, so make sure
  that O_EXCL is used by the library (CWE-377).
    log_fd = mkstemp(process->logfile);
data/krb5-sync-3.1/tests/tap/sync.c:57:10:  [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(file, O_CREAT | O_WRONLY, 0666);
data/krb5-sync-3.1/tests/tap/sync.c:98: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 buffer[BUFSIZ];
data/krb5-sync-3.1/tests/tap/sync.c:134: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).
    file = fopen(path, "r");
data/krb5-sync-3.1/tests/util/messages-t.c:183: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 buff[32];
data/krb5-sync-3.1/tests/util/messages-t.c:202:5:  [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(buff, "%d", EPERM);
data/krb5-sync-3.1/tests/util/xmalloc.c:185: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(string, "test", 5);
data/krb5-sync-3.1/tests/util/xmalloc.c:193: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(string, "test", 4);
data/krb5-sync-3.1/tools/krb5-sync.c:98: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 buffer[BUFSIZ];
data/krb5-sync-3.1/tools/krb5-sync.c:108: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).
    queue = fopen(filename, "r");
data/krb5-sync-3.1/util/xmalloc.c:185: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(p, s, len);
data/krb5-sync-3.1/util/xmalloc.c:211: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(copy, s, length);
data/krb5-sync-3.1/plugin/ad.c:159: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).
                                        strlen(config->ad_realm),
data/krb5-sync-3.1/plugin/config.c:76: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).
    realm_data->length = strlen(realm);
data/krb5-sync-3.1/plugin/instance.c:57: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).
    code = krb5_build_principal(ctx, &princ, strlen(realm), realm,
data/krb5-sync-3.1/plugin/queue.c:41: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).
        result = write((fd), (s), strlen(s));                           \
data/krb5-sync-3.1/plugin/queue.c:42: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).
        if (result < 0 || (size_t) result != strlen(s)) {               \
data/krb5-sync-3.1/plugin/queue.c:205: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).
        if (strncmp(prefix, entry->d_name, strlen(prefix)) == 0) {
data/krb5-sync-3.1/portable/mkstemp.c:64: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).
    length = strlen(template);
data/krb5-sync-3.1/portable/snprintf.c:479:13:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    strln = strlen (value);
data/krb5-sync-3.1/tests/portable/mkstemp-t.c:71: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).
    length = strlen(template);
data/krb5-sync-3.1/tests/portable/mkstemp-t.c:74:20:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    is_int(length, read(fd, buffer, length), "...and the data is there");
data/krb5-sync-3.1/tests/runtests.c:384: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).
    len = strlen(s) + 1;
data/krb5-sync-3.1/tests/runtests.c:420: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).
        if (length >= UINT_MAX - strlen(string)) {
data/krb5-sync-3.1/tests/runtests.c:424: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).
        length += strlen(string);
data/krb5-sync-3.1/tests/runtests.c:434: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).
        memcpy(result + offset, string, strlen(string));
data/krb5-sync-3.1/tests/runtests.c:435: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).
        offset += strlen(string);
data/krb5-sync-3.1/tests/runtests.c:665:32:  [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).
                    ts->reason[strlen(ts->reason) - 1] = '\0';
data/krb5-sync-3.1/tests/runtests.c:728: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).
        bail = skip_whitespace(bail + strlen("Bail out!"));
data/krb5-sync-3.1/tests/runtests.c:732: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).
            length = strlen(bail);
data/krb5-sync-3.1/tests/runtests.c:748: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).
    if (line[strlen(line) - 1] != '\n')
data/krb5-sync-3.1/tests/runtests.c:1235:18:  [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).
        length = strlen(buffer) - 1;
data/krb5-sync-3.1/tests/runtests.c:1244:13:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        if (strlen(testname) == 0)
data/krb5-sync-3.1/tests/runtests.c:1354:18:  [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).
        length = strlen(current->ts->file);
data/krb5-sync-3.1/tests/runtests.c:1379: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).
            for (i = strlen(ts->file); i < longest; i++)
data/krb5-sync-3.1/tests/tap/basic.c:165: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).
        if (length >= UINT_MAX - strlen(string))
data/krb5-sync-3.1/tests/tap/basic.c:167: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).
        length += strlen(string);
data/krb5-sync-3.1/tests/tap/basic.c:177: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).
        memcpy(result + offset, string, strlen(string));
data/krb5-sync-3.1/tests/tap/basic.c:178: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).
        offset += strlen(string);
data/krb5-sync-3.1/tests/tap/basic.c:232: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).
            length = strlen(file->buffer);
data/krb5-sync-3.1/tests/tap/basic.c:788: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).
    len = strlen(s) + 1;
data/krb5-sync-3.1/tests/tap/kerberos.c:186: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).
    if (principal[strlen(principal) - 1] != '\n')
data/krb5-sync-3.1/tests/tap/kerberos.c:188:15:  [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).
    principal[strlen(principal) - 1] = '\0';
data/krb5-sync-3.1/tests/tap/kerberos.c:331: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).
        if (buffer[strlen(buffer) - 1] != '\n')
data/krb5-sync-3.1/tests/tap/kerberos.c:333:16:  [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[strlen(buffer) - 1] = '\0';
data/krb5-sync-3.1/tests/tap/kerberos.c:338: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).
        if (buffer[strlen(buffer) - 1] != '\n')
data/krb5-sync-3.1/tests/tap/kerberos.c:340:16:  [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[strlen(buffer) - 1] = '\0';
data/krb5-sync-3.1/tests/tap/kerberos.c:367: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).
        if (buffer[strlen(buffer) - 1] != '\n')
data/krb5-sync-3.1/tests/tap/kerberos.c:369:16:  [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[strlen(buffer) - 1] = '\0';
data/krb5-sync-3.1/tests/tap/process.c:136:19:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            ret = read(fds[0], buf + count, buflen - count - 1);
data/krb5-sync-3.1/tools/krb5-sync.c:74:16:  [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 (buffer[strlen(buffer) - 1] != '\n')
data/krb5-sync-3.1/tools/krb5-sync.c:76: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).
    buffer[strlen(buffer) - 1] = '\0';
data/krb5-sync-3.1/util/xmalloc.c:179: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).
    len = strlen(s) + 1;

ANALYSIS SUMMARY:

Hits = 226
Lines analyzed = 12202 in approximately 0.57 seconds (21469 lines/second)
Physical Source Lines of Code (SLOC) = 7166
Hits@level = [0]  78 [1]  41 [2]  56 [3]   5 [4] 124 [5]   0
Hits@level+ = [0+] 304 [1+] 226 [2+] 185 [3+] 129 [4+] 124 [5+]   0
Hits/KSLOC@level+ = [0+] 42.4226 [1+] 31.5378 [2+] 25.8164 [3+] 18.0017 [4+] 17.3039 [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.