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/mcabber-1.1.2/mcabber/hbuf.h
Examining data/mcabber-1.1.2/mcabber/utf8.h
Examining data/mcabber-1.1.2/mcabber/compl.h
Examining data/mcabber-1.1.2/mcabber/main.c
Examining data/mcabber-1.1.2/mcabber/hooks.h
Examining data/mcabber-1.1.2/mcabber/xmpp.c
Examining data/mcabber-1.1.2/mcabber/modules.h
Examining data/mcabber-1.1.2/mcabber/caps.c
Examining data/mcabber-1.1.2/mcabber/xmpp_iq.c
Examining data/mcabber-1.1.2/mcabber/hbuf.c
Examining data/mcabber-1.1.2/mcabber/xmpp_muc.c
Examining data/mcabber-1.1.2/mcabber/otr.h
Examining data/mcabber-1.1.2/mcabber/commands.h
Examining data/mcabber-1.1.2/mcabber/screen.h
Examining data/mcabber-1.1.2/mcabber/xmpp_iqrequest.c
Examining data/mcabber-1.1.2/mcabber/compl.c
Examining data/mcabber-1.1.2/mcabber/xmpp_iq.h
Examining data/mcabber-1.1.2/mcabber/xmpp_iqrequest.h
Examining data/mcabber-1.1.2/mcabber/histolog.h
Examining data/mcabber-1.1.2/mcabber/xmpp_s10n.c
Examining data/mcabber-1.1.2/mcabber/caps.h
Examining data/mcabber-1.1.2/mcabber/pgp.c
Examining data/mcabber-1.1.2/mcabber/utf8.c
Examining data/mcabber-1.1.2/mcabber/fifo.h
Examining data/mcabber-1.1.2/mcabber/events.c
Examining data/mcabber-1.1.2/mcabber/help.c
Examining data/mcabber-1.1.2/mcabber/logprint.h
Examining data/mcabber-1.1.2/mcabber/roster.h
Examining data/mcabber-1.1.2/mcabber/carbons.h
Examining data/mcabber-1.1.2/mcabber/hooks.c
Examining data/mcabber-1.1.2/mcabber/xmpp_helper.c
Examining data/mcabber-1.1.2/mcabber/settings.h
Examining data/mcabber-1.1.2/mcabber/roster.c
Examining data/mcabber-1.1.2/mcabber/xmpp_s10n.h
Examining data/mcabber-1.1.2/mcabber/modules.c
Examining data/mcabber-1.1.2/mcabber/utils.h
Examining data/mcabber-1.1.2/mcabber/xmpp_helper.h
Examining data/mcabber-1.1.2/mcabber/nohtml.h
Examining data/mcabber-1.1.2/mcabber/pgp.h
Examining data/mcabber-1.1.2/mcabber/events.h
Examining data/mcabber-1.1.2/mcabber/carbons.c
Examining data/mcabber-1.1.2/mcabber/fifo_internal.c
Examining data/mcabber-1.1.2/mcabber/api.h
Examining data/mcabber-1.1.2/mcabber/otr.c
Examining data/mcabber-1.1.2/mcabber/main.h
Examining data/mcabber-1.1.2/mcabber/xmpp.h
Examining data/mcabber-1.1.2/mcabber/histolog.c
Examining data/mcabber-1.1.2/mcabber/xmpp_muc.h
Examining data/mcabber-1.1.2/mcabber/nohtml.c
Examining data/mcabber-1.1.2/mcabber/settings.c
Examining data/mcabber-1.1.2/mcabber/commands.c
Examining data/mcabber-1.1.2/mcabber/help.h
Examining data/mcabber-1.1.2/mcabber/screen.c
Examining data/mcabber-1.1.2/mcabber/xmpp_defines.h
Examining data/mcabber-1.1.2/mcabber/utils.c
Examining data/mcabber-1.1.2/modules/beep/beep.c
Examining data/mcabber-1.1.2/modules/urlregex/urlregex.c
Examining data/mcabber-1.1.2/modules/xttitle/xttitle.c
Examining data/mcabber-1.1.2/modules/fifo/fifo.c

FINAL RESULTS:

data/mcabber-1.1.2/mcabber/histolog.c:85:11:  [5] (race) readlink:
  This accepts filename arguments; if an attacker can move those files or
  change the link content, a race condition results. Also, it does not
  terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach.
      if (readlink(path, log_jid, bufstat.st_size) < 0) return NULL;
data/mcabber-1.1.2/mcabber/utils.c:354:11:  [5] (race) chmod:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchmod( ) instead.
      if (chmod(name, newmode)) {
data/mcabber-1.1.2/mcabber/utils.c:961:3:  [5] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings. Risk is high; the length parameter
  appears to be a constant, instead of computing the number of characters
  left.
  strncat(fcmd+1, cmd, INPUTLINE_LENGTH-1);
data/mcabber-1.1.2/mcabber/hbuf.c:224: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(line, text);
data/mcabber-1.1.2/mcabber/hooks.c:869: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(extcmd, extcmd, arg_type, arg_info, bjid, arg_data,
data/mcabber-1.1.2/mcabber/main.c:179:17:  [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.
  FILE *outfp = popen(command, "r");
data/mcabber-1.1.2/mcabber/main.c:222: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(v_fmt, v);
data/mcabber-1.1.2/mcabber/pgp.c:266: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(data, prefix);
data/mcabber-1.1.2/mcabber/pgp.c:267:3:  [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(data, gpg_data);
data/mcabber-1.1.2/mcabber/pgp.c:268:3:  [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(data, suffix);
data/mcabber-1.1.2/mcabber/pgp.c:415: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(data, prefix);
data/mcabber-1.1.2/mcabber/pgp.c:416:3:  [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(data, gpg_data);
data/mcabber-1.1.2/mcabber/pgp.c:417:3:  [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(data, suffix);
data/mcabber-1.1.2/mcabber/screen.c:3473:5:  [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(multiline, line);
data/mcabber-1.1.2/mcabber/screen.c:3783:12:  [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).
    if (l) strcpy(inputLine, l);
data/mcabber-1.1.2/mcabber/screen.c:3857:10:  [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).
  if (l) strcpy(inputLine, l);
data/mcabber-1.1.2/mcabber/screen.c:3863:10:  [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).
  if (l) strcpy(inputLine, l);
data/mcabber-1.1.2/mcabber/screen.c:3870:5:  [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(inputLine, l);
data/mcabber-1.1.2/mcabber/screen.c:3882:5:  [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(inputLine, l);
data/mcabber-1.1.2/mcabber/screen.c:4014: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(tmpLine, ptr_inputline);
data/mcabber-1.1.2/mcabber/screen.c:4015: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(ptr_inputline, text);
data/mcabber-1.1.2/mcabber/screen.c:4017: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(ptr_inputline, tmpLine);
data/mcabber-1.1.2/mcabber/screen.c:4478: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(inputLine, l);
data/mcabber-1.1.2/mcabber/screen.c:4494: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(inputLine + 1, l + cmd_len);
data/mcabber-1.1.2/mcabber/screen.c:4563:17:  [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(inputLine, mkcmdstr("quit"));
data/mcabber-1.1.2/mcabber/screen.c:4845: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(tmpLine, ptr_inputline);
data/mcabber-1.1.2/mcabber/screen.c:4847: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(ptr_inputline, tmpLine);
data/mcabber-1.1.2/mcabber/main.c:283:7:  [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.
  p = getenv("GPG_AGENT_INFO");
data/mcabber-1.1.2/mcabber/main.c:409:13:  [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.
    int c = getopt(argc, argv, "hVf:");
data/mcabber-1.1.2/mcabber/pgp.c:338:15:  [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.
    char *p = getenv("GPG_AGENT_INFO");
data/mcabber-1.1.2/mcabber/pgp.c:408:15:  [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.
    char *p = getenv("GPG_AGENT_INFO");
data/mcabber-1.1.2/mcabber/settings.c:124: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_dir = getenv("HOME");
data/mcabber-1.1.2/mcabber/settings.c:142:37:  [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.
    char *xdg_config_dir = g_strdup(getenv("XDG_CONFIG_HOME"));
data/mcabber-1.1.2/mcabber/settings.c:207:30:  [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.
      const char *home_dir = getenv("HOME");
data/mcabber-1.1.2/mcabber/utils.c:164:21:  [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.
    char *homedir = getenv("HOME");
data/mcabber-1.1.2/mcabber/utils.c:378: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.
    tmpdir = getenv(tmpvars[i]);
data/mcabber-1.1.2/mcabber/xmpp.c:795:51:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
    g_timeout_add_seconds(RECONNECTION_TIMEOUT + (random() % 90L),
data/mcabber-1.1.2/mcabber/xmpp.c:1828:3:  [3] (random) srandom:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
  srandom(time(NULL));
data/mcabber-1.1.2/mcabber/xmpp.c:1835:40:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
    tab[0] = (unsigned int) (0xffff * (random() / (RAND_MAX + 1.0)));
data/mcabber-1.1.2/mcabber/xmpp.c:1836:40:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
    tab[1] = (unsigned int) (0xffff * (random() / (RAND_MAX + 1.0)));
data/mcabber-1.1.2/mcabber/caps.c:462:8:  [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_WRONLY|O_CREAT|O_EXCL, S_IRUSR|S_IWUSR);
data/mcabber-1.1.2/mcabber/commands.c:1541: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).
  fd = fopen(filename, "r");
data/mcabber-1.1.2/mcabber/commands.c:1812:22:  [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).
  scr_buffer_percent(atoi((*arg1 ? arg1 : arg2)));
data/mcabber-1.1.2/mcabber/commands.c:1942:7:  [2] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant string.
      strcat(buffer, " (pending)");
data/mcabber-1.1.2/mcabber/commands.c:1974: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 tbuf[128];
data/mcabber-1.1.2/mcabber/commands.c:3158: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 tbuf[128];
data/mcabber-1.1.2/mcabber/commands.h:10: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 name[32];
data/mcabber-1.1.2/mcabber/fifo_internal.c:118:12:  [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 (name, O_RDONLY|O_NONBLOCK);
data/mcabber-1.1.2/mcabber/hbuf.c:473: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 pref[96];
data/mcabber-1.1.2/mcabber/hbuf.c:481: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, "w");
data/mcabber-1.1.2/mcabber/help.c:98: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        lang[6];
data/mcabber-1.1.2/mcabber/histolog.c:107: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 str_ts[20];
data/mcabber-1.1.2/mcabber/histolog.c:143: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, "a");
data/mcabber-1.1.2/mcabber/histolog.c:195: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/mcabber-1.1.2/mcabber/histolog.c:285:19:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
    len = (guint) atoi(&data[22]);
data/mcabber-1.1.2/mcabber/histolog.c:465: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(statefile_xp, "w");
data/mcabber-1.1.2/mcabber/histolog.c:517: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 bjid[1024];
data/mcabber-1.1.2/mcabber/histolog.c:526: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(statefile_xp, "r");
data/mcabber-1.1.2/mcabber/hooks.c:576: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 os[2] = " \0";
data/mcabber-1.1.2/mcabber/hooks.c:577: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 ns[2] = " \0";
data/mcabber-1.1.2/mcabber/hooks.c:606: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 ns[2] = " \0";
data/mcabber-1.1.2/mcabber/hooks.c:784: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 status_str[2];
data/mcabber-1.1.2/mcabber/hooks.c:836: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).
    fd = mkstemp(datafname);
data/mcabber-1.1.2/mcabber/nohtml.c:139: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(&html[j], "&amp;", 5);
data/mcabber-1.1.2/mcabber/nohtml.c:143: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(&html[j], "&apos;", 6);
data/mcabber-1.1.2/mcabber/nohtml.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(&html[j], "&quot;", 6);
data/mcabber-1.1.2/mcabber/nohtml.c:151: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(&html[j], "&lt;", 4);
data/mcabber-1.1.2/mcabber/nohtml.c:155: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(&html[j], "&gt;", 4);
data/mcabber-1.1.2/mcabber/nohtml.c:159: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(&html[j], "<br/>", 5);
data/mcabber-1.1.2/mcabber/otr.c:61:48:  [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 *accountname,
data/mcabber-1.1.2/mcabber/otr.c:62:48:  [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 *protocol,
data/mcabber-1.1.2/mcabber/otr.c:63:48:  [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 *username,
data/mcabber-1.1.2/mcabber/otr.c:64:51:  [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 fingerprint[20]);
data/mcabber-1.1.2/mcabber/otr.c:278: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 fpr[45], *tr;
data/mcabber-1.1.2/mcabber/otr.c:666: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 readable[45] = "";
data/mcabber-1.1.2/mcabber/otr.c:758:38:  [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 *accountname, const char *protocol,
data/mcabber-1.1.2/mcabber/otr.c:758:63:  [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 *accountname, const char *protocol,
data/mcabber-1.1.2/mcabber/otr.c:759:38:  [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 *username,
data/mcabber-1.1.2/mcabber/otr.c:760:41:  [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 fingerprint[20])
data/mcabber-1.1.2/mcabber/otr.c:763: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 readable[45];
data/mcabber-1.1.2/mcabber/screen.c:146: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       inputLine[INPUTLINE_LENGTH+1];
data/mcabber-1.1.2/mcabber/screen.c:148: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       maskLine[INPUTLINE_LENGTH+1];
data/mcabber-1.1.2/mcabber/screen.c:156: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   cmdhisto_backup[INPUTLINE_LENGTH+1];
data/mcabber-1.1.2/mcabber/screen.c:260: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).
  result = atoi(name);
data/mcabber-1.1.2/mcabber/screen.c:793: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).
    new_mode = atoi(new_value);
data/mcabber-1.1.2/mcabber/screen.c:944: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 strtimestamp[64];
data/mcabber-1.1.2/mcabber/screen.c:963: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 strtimestamp[64];
data/mcabber-1.1.2/mcabber/screen.c:1117: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 date[64];
data/mcabber-1.1.2/mcabber/screen.c:1124:5:  [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(date, "           ");
data/mcabber-1.1.2/mcabber/screen.c:1181: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 pref[96];
data/mcabber-1.1.2/mcabber/screen.c:2108: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 space[2] = " ";
data/mcabber-1.1.2/mcabber/screen.c:2813: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 strfilter[imstatus_size+1];
data/mcabber-1.1.2/mcabber/screen.c:3815: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 tabstr[9];
data/mcabber-1.1.2/mcabber/screen.c:4006: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 tmpLine[INPUTLINE_LENGTH+1];
data/mcabber-1.1.2/mcabber/screen.c:4465: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 mask[INPUTLINE_LENGTH+1];
data/mcabber-1.1.2/mcabber/screen.c:4488: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(mask + cmd_len, inputLine + 1, str_len + 1);
data/mcabber-1.1.2/mcabber/screen.c:4535:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    static char search_cmd[INPUTLINE_LENGTH+1] = "";
data/mcabber-1.1.2/mcabber/screen.c:4567:17:  [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(inputLine + 13, inputLine + 1, 10);
data/mcabber-1.1.2/mcabber/screen.c:4568:17:  [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(inputLine + 1, "roster down ", 12);
data/mcabber-1.1.2/mcabber/screen.c:4583:15:  [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(search_cmd + cmd_len, inputLine + 1, str_len + 1);
data/mcabber-1.1.2/mcabber/screen.c:4682: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 down_cmd[24];
data/mcabber-1.1.2/mcabber/screen.c:4692: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 up_cmd[24];
data/mcabber-1.1.2/mcabber/screen.c:4705:17:  [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 fold_cmd[256];
data/mcabber-1.1.2/mcabber/screen.c:4714:17:  [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(fold_cmd + cmd_len, g->data, grp_len + 1);
data/mcabber-1.1.2/mcabber/screen.c:4739:17:  [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 fold_cmd[256];
data/mcabber-1.1.2/mcabber/screen.c:4748:17:  [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(fold_cmd + cmd_len, g->data, grp_len + 1);
data/mcabber-1.1.2/mcabber/screen.c:4838: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 tmpLine[INPUTLINE_LENGTH+1];
data/mcabber-1.1.2/mcabber/settings.c:135: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).
  if ((fp = fopen(sfilename->str, "r")) != NULL) {
data/mcabber-1.1.2/mcabber/settings.c:161:19:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        if ((fp = fopen(sfilename->str, "r")) != NULL) {
data/mcabber-1.1.2/mcabber/settings.c:218:15:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if ((fp = fopen(def_filename, "r")) == NULL) {
data/mcabber-1.1.2/mcabber/settings.c:237:15:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if ((fp = fopen(filename, "r")) == NULL) {
data/mcabber-1.1.2/mcabber/settings.c:453:22:  [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 (setval) return atoi(setval);
data/mcabber-1.1.2/mcabber/utf8.c:78: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 code[5];
data/mcabber-1.1.2/mcabber/utils.c:33: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 idnprep[1024];
data/mcabber-1.1.2/mcabber/utils.c:225: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, "a");
data/mcabber-1.1.2/mcabber/utils.c:261:17:  [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).
    new_level = atoi(new_value);
data/mcabber-1.1.2/mcabber/utils.c:306: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 *fp = fopen(FName, "a+");
data/mcabber-1.1.2/mcabber/utils.c:417: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[32];
data/mcabber-1.1.2/mcabber/utils.c:730: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(p, "(...)");
data/mcabber-1.1.2/mcabber/utils.c:884:43:  [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.
        if (bm_equal (*ne_ptr, ((unsigned char *) needle)[0], icase))
data/mcabber-1.1.2/mcabber/utils.c:956: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 fcmd[INPUTLINE_LENGTH+1];
data/mcabber-1.1.2/mcabber/xmpp.c:59:1:  [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 imstatus2char[imstatus_size+1] = {
data/mcabber-1.1.2/mcabber/xmpp.c:718: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 fpr[3*FINGERPRINT_LENGTH] = {0};
data/mcabber-1.1.2/mcabber/xmpp.c:753: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 fpr[3*FINGERPRINT_LENGTH] = {0};
data/mcabber-1.1.2/mcabber/xmpp.c:1424:11:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
      if (atoi(p) == 409) {
data/mcabber-1.1.2/mcabber/xmpp.c:1439:19:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
    int rawprio = atoi(p);
data/mcabber-1.1.2/mcabber/xmpp.c:1754: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 fpr[FINGERPRINT_LENGTH] = {0};
data/mcabber-1.1.2/mcabber/xmpp.c:2445: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 mdate[20];
data/mcabber-1.1.2/mcabber/xmpp_helper.c:333: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 strprio[8];
data/mcabber-1.1.2/mcabber/xmpp_helper.c:384:28:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
    desc = defaulterrormsg(atoi(s));
data/mcabber-1.1.2/mcabber/xmpp_iqrequest.c:409:9:  [2] (integer) atol:
  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).
    s = atol(p);
data/mcabber-1.1.2/mcabber/xmpp_muc.c:516:19:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
          switch (atoi(codestr)) {
data/mcabber-1.1.2/mcabber/xmpp_muc.c:897:17:  [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).
        switch (atoi(codestr)) {
data/mcabber-1.1.2/modules/xttitle/xttitle.c:62:20:  [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).
      all_unread = atoi(args->value);
data/mcabber-1.1.2/modules/xttitle/xttitle.c:64:20:  [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).
      muc_unread = atoi(args->value);
data/mcabber-1.1.2/modules/xttitle/xttitle.c:66:23:  [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).
      muc_attention = atoi(args->value);
data/mcabber-1.1.2/mcabber/commands.c:128:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
  strncpy(n_cmd->name, name, 32-1);
data/mcabber-1.1.2/mcabber/commands.c:490:50:  [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).
      && (strncasecmp(xpline, mkcmdstr("msay "), strlen(mkcmdstr("msay "))))) {
data/mcabber-1.1.2/mcabber/commands.c:1370: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).
      *arg += strlen(*arg) - (parlist[1] ? strlen(parlist[1]) : 0);
data/mcabber-1.1.2/mcabber/commands.c:1370: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).
      *arg += strlen(*arg) - (parlist[1] ? strlen(parlist[1]) : 0);
data/mcabber-1.1.2/mcabber/commands.c:2057:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120). Risk is low because the source is a
  constant string.
  strncpy(buffer, "Room members:", 127);
data/mcabber-1.1.2/mcabber/commands.c:2318: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).
      gsize len = strlen(key);
data/mcabber-1.1.2/mcabber/compl.c:209: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).
  size_t len = strlen(prefix);
data/mcabber-1.1.2/mcabber/compl.c:227: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(word) != len) {
data/mcabber-1.1.2/mcabber/compl.c:297: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).
    c->len_compl = strlen(r);
data/mcabber-1.1.2/mcabber/hbuf.c:136: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).
  textlen = strlen(text);
data/mcabber-1.1.2/mcabber/histolog.c:381: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).
    int l = strlen(root_dir);
data/mcabber-1.1.2/mcabber/hooks.c:226: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).
      mucnicklen = strlen(resname) + 2;
data/mcabber-1.1.2/mcabber/hooks.c:227:37:  [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(msg, COMMAND_ME, strlen(COMMAND_ME)))
data/mcabber-1.1.2/mcabber/hooks.c:232: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 (!strncmp(msg, COMMAND_ME, strlen(COMMAND_ME))) {
data/mcabber-1.1.2/mcabber/hooks.c:295: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).
        if (!strncmp(msg, COMMAND_ME, strlen(COMMAND_ME))) {
data/mcabber-1.1.2/mcabber/hooks.c:319:29:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            rightb = msgptr+strlen(nick);
data/mcabber-1.1.2/mcabber/hooks.c:458: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 (!strncmp(msg, COMMAND_ME, strlen(COMMAND_ME))) {
data/mcabber-1.1.2/mcabber/hooks.c:465: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 (!strncmp(msg, COMMAND_ME, strlen(COMMAND_ME))) {
data/mcabber-1.1.2/mcabber/hooks.c:843: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).
      size_t data_locale_len = strlen(data_locale);
data/mcabber-1.1.2/mcabber/main.c:210: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).
  size_t i = strlen(pwd);
data/mcabber-1.1.2/mcabber/main.c:302: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).
    memset((char*)pp, 0, strlen(pp));
data/mcabber-1.1.2/mcabber/main.c:315: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).
        memset(typed_passwd, 0, strlen(typed_passwd));
data/mcabber-1.1.2/mcabber/modules.c:292:17:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    gsize len = strlen(module->name);
data/mcabber-1.1.2/mcabber/nohtml.c:46: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).
  html_len = (int)strlen(htmlbuf);
data/mcabber-1.1.2/mcabber/nohtml.c:105:21:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  oldlen = newlen = strlen(text);
data/mcabber-1.1.2/mcabber/otr.c:204: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).
    l = strlen(xp_conf_dir);
data/mcabber-1.1.2/mcabber/otr.c:618: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).
                              strlen(secret));
data/mcabber-1.1.2/mcabber/otr.c:644: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).
                             strlen(secret));
data/mcabber-1.1.2/mcabber/pgp.c:142: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).
    ssize_t len = strlen(gpg.passphrase);
data/mcabber-1.1.2/mcabber/pgp.c:149: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).
    mlock(gpg.passphrase, strlen(gpg.passphrase));
data/mcabber-1.1.2/mcabber/pgp.c:223: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(gpg.passphrase);
data/mcabber-1.1.2/mcabber/pgp.c:265:56:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  data = g_new(char, sizeof(prefix) + sizeof(suffix) + strlen(gpg_data));
data/mcabber-1.1.2/mcabber/pgp.c:270:51:  [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 = gpgme_data_new_from_mem(&data_sign, data, strlen(data), 0);
data/mcabber-1.1.2/mcabber/pgp.c:272:53:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    err = gpgme_data_new_from_mem(&data_text, text, strlen(text), 0);
data/mcabber-1.1.2/mcabber/pgp.c:353:48:  [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 = gpgme_data_new_from_mem(&in, gpg_data, strlen(gpg_data), 0);
data/mcabber-1.1.2/mcabber/pgp.c:414:56:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  data = g_new(char, sizeof(prefix) + sizeof(suffix) + strlen(gpg_data));
data/mcabber-1.1.2/mcabber/pgp.c:419: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).
  err = gpgme_data_new_from_mem(&in, data, strlen(data), 0);
data/mcabber-1.1.2/mcabber/pgp.c:496:50:  [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 = gpgme_data_new_from_mem(&in, gpg_data, strlen(gpg_data), 0);
data/mcabber-1.1.2/mcabber/screen.c:1326:17:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
          snick[strlen(snick)-1] = '>';
data/mcabber-1.1.2/mcabber/screen.c:1328:17:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
          mnick[strlen(mnick)-1] = ' ';
data/mcabber-1.1.2/mcabber/screen.c:1533: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).
      mucnicklen = strlen(nicklocaltmp);
data/mcabber-1.1.2/mcabber/screen.c:3454: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).
    int len = strlen(multiline)+strlen(line)+2;
data/mcabber-1.1.2/mcabber/screen.c:3454: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).
    int len = strlen(multiline)+strlen(line)+2;
data/mcabber-1.1.2/mcabber/screen.c:3472:5:  [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(multiline, "\n");
data/mcabber-1.1.2/mcabber/screen.c:3537:7:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
      strncpy(cmdhisto_backup, mask, INPUTLINE_LENGTH);
data/mcabber-1.1.2/mcabber/screen.c:4007: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).
  int len = strlen(text);
data/mcabber-1.1.2/mcabber/screen.c:4009: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(inputLine) + len >= INPUTLINE_LENGTH) {
data/mcabber-1.1.2/mcabber/screen.c:4256: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(seqstr) > MAX_KEYSEQ_LENGTH) {
data/mcabber-1.1.2/mcabber/screen.c:4466: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).
  size_t cmd_len = strlen(mask);
data/mcabber-1.1.2/mcabber/screen.c:4467: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).
  size_t str_len = strlen(inputLine) - 1;
data/mcabber-1.1.2/mcabber/screen.c:4469:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
  strncpy(mask, mkcmdstr("roster search "), INPUTLINE_LENGTH);
data/mcabber-1.1.2/mcabber/screen.c:4565: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(inputLine) <= 9) {
data/mcabber-1.1.2/mcabber/screen.c:4575: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).
              size_t str_len = strlen(inputLine) - 1;
data/mcabber-1.1.2/mcabber/screen.c:4577:15:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
              strncpy(search_cmd, mkcmdstr("roster search "), INPUTLINE_LENGTH);
data/mcabber-1.1.2/mcabber/screen.c:4578:25:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
              cmd_len = strlen(search_cmd);
data/mcabber-1.1.2/mcabber/screen.c:4681:17:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                strlen(inputLine) <= 9) {
data/mcabber-1.1.2/mcabber/screen.c:4691:17:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                strlen(inputLine) <= 9) {
data/mcabber-1.1.2/mcabber/screen.c:4708:17:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
                strncpy(fold_cmd, mkcmdstr("group fold "), 32);
data/mcabber-1.1.2/mcabber/screen.c:4709: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).
                cmd_len = strlen(fold_cmd);
data/mcabber-1.1.2/mcabber/screen.c:4710: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).
                grp_len = strlen(g->data);
data/mcabber-1.1.2/mcabber/screen.c:4742:17:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
                strncpy(fold_cmd, mkcmdstr("group unfold "), 32);
data/mcabber-1.1.2/mcabber/screen.c:4743: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).
                cmd_len = strlen(fold_cmd);
data/mcabber-1.1.2/mcabber/screen.c:4744: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).
                grp_len = strlen(g->data);
data/mcabber-1.1.2/mcabber/screen.c:4841: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(inputLine) + 4 > INPUTLINE_LENGTH)
data/mcabber-1.1.2/mcabber/utils.c:203: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(hex) != fpr_len*3 - 1)
data/mcabber-1.1.2/mcabber/utils.c:564: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).
    if ((*resource == '\0') || strlen(resource) > 1023)
data/mcabber-1.1.2/mcabber/utils.c:567:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(idnprep, resource, sizeof(idnprep));
data/mcabber-1.1.2/mcabber/utils.c:573: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).
    domlen = strlen(domain);
data/mcabber-1.1.2/mcabber/utils.c:729:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (strlen(p) >= 5)
data/mcabber-1.1.2/mcabber/utils.c:763: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).
  xtext = g_new(char, strlen(text) + 1 + 8*n);
data/mcabber-1.1.2/mcabber/utils.c:801: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).
  xtext = g_new(char, strlen(text) + 1);
data/mcabber-1.1.2/mcabber/utils.c:912: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).
  needlelen = strlen (needle);
data/mcabber-1.1.2/mcabber/utils.c:918:36:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                                   strlen (haystack),
data/mcabber-1.1.2/mcabber/utils.c:945: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 (ignore_case && !strncasecmp(str, word, strlen(word)))
data/mcabber-1.1.2/mcabber/utils.c:947:48:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  else if (!ignore_case && !strncmp(str, word, strlen(word)))
data/mcabber-1.1.2/mcabber/xmpp.c:616:8:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  lk = strlen(key);
data/mcabber-1.1.2/mcabber/xmpp.c:617: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).
  lek = strlen(expectedkey);
data/mcabber-1.1.2/mcabber/xmpp.c:1724: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 (msg[strlen(msg)-1] == '\n')
data/mcabber-1.1.2/mcabber/xmpp.c:1725: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).
      msg[strlen(msg)-1] = '\0';
data/mcabber-1.1.2/mcabber/xmpp_iq.c:562: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).
    param = node+strlen(MCABBER_CAPS_NODE)+1;

ANALYSIS SUMMARY:

Hits = 216
Lines analyzed = 27101 in approximately 0.88 seconds (30793 lines/second)
Physical Source Lines of Code (SLOC) = 20518
Hits@level = [0]  70 [1]  80 [2]  96 [3]  13 [4]  24 [5]   3
Hits@level+ = [0+] 286 [1+] 216 [2+] 136 [3+]  40 [4+]  27 [5+]   3
Hits/KSLOC@level+ = [0+] 13.939 [1+] 10.5273 [2+] 6.62833 [3+] 1.94951 [4+] 1.31592 [5+] 0.146213
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.