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/putty-0.74/agentf.c
Examining data/putty-0.74/aqsync.c
Examining data/putty-0.74/be_all.c
Examining data/putty-0.74/be_all_s.c
Examining data/putty-0.74/be_misc.c
Examining data/putty-0.74/be_none.c
Examining data/putty-0.74/be_nos_s.c
Examining data/putty-0.74/be_nossh.c
Examining data/putty-0.74/be_ssh.c
Examining data/putty-0.74/callback.c
Examining data/putty-0.74/cgtest.c
Examining data/putty-0.74/cmdgen.c
Examining data/putty-0.74/cmdline.c
Examining data/putty-0.74/conf.c
Examining data/putty-0.74/config.c
Examining data/putty-0.74/cproxy.c
Examining data/putty-0.74/defs.h
Examining data/putty-0.74/dialog.c
Examining data/putty-0.74/dialog.h
Examining data/putty-0.74/ecc.c
Examining data/putty-0.74/ecc.h
Examining data/putty-0.74/errsock.c
Examining data/putty-0.74/fuzzterm.c
Examining data/putty-0.74/import.c
Examining data/putty-0.74/ldisc.c
Examining data/putty-0.74/ldisc.h
Examining data/putty-0.74/logging.c
Examining data/putty-0.74/mainchan.c
Examining data/putty-0.74/marshal.c
Examining data/putty-0.74/marshal.h
Examining data/putty-0.74/memory.c
Examining data/putty-0.74/minibidi.c
Examining data/putty-0.74/misc.c
Examining data/putty-0.74/misc.h
Examining data/putty-0.74/miscucs.c
Examining data/putty-0.74/mpint.c
Examining data/putty-0.74/mpint.h
Examining data/putty-0.74/mpint_i.h
Examining data/putty-0.74/network.h
Examining data/putty-0.74/nocmdline.c
Examining data/putty-0.74/nocproxy.c
Examining data/putty-0.74/nogss.c
Examining data/putty-0.74/noprint.c
Examining data/putty-0.74/noshare.c
Examining data/putty-0.74/noterm.c
Examining data/putty-0.74/notiming.c
Examining data/putty-0.74/nullplug.c
Examining data/putty-0.74/pageant.c
Examining data/putty-0.74/pageant.h
Examining data/putty-0.74/pgssapi.c
Examining data/putty-0.74/pgssapi.h
Examining data/putty-0.74/pinger.c
Examining data/putty-0.74/portfwd.c
Examining data/putty-0.74/pproxy.c
Examining data/putty-0.74/proxy.c
Examining data/putty-0.74/proxy.h
Examining data/putty-0.74/pscp.c
Examining data/putty-0.74/psftp.c
Examining data/putty-0.74/psftp.h
Examining data/putty-0.74/psftpcommon.c
Examining data/putty-0.74/putty.h
Examining data/putty-0.74/puttymem.h
Examining data/putty-0.74/puttyps.h
Examining data/putty-0.74/raw.c
Examining data/putty-0.74/resource.h
Examining data/putty-0.74/rlogin.c
Examining data/putty-0.74/scpserver.c
Examining data/putty-0.74/sercfg.c
Examining data/putty-0.74/sesschan.c
Examining data/putty-0.74/sessprep.c
Examining data/putty-0.74/settings.c
Examining data/putty-0.74/sftp.c
Examining data/putty-0.74/sftp.h
Examining data/putty-0.74/sftpcommon.c
Examining data/putty-0.74/sftpserver.c
Examining data/putty-0.74/ssh.c
Examining data/putty-0.74/ssh.h
Examining data/putty-0.74/ssh1bpp.c
Examining data/putty-0.74/ssh1censor.c
Examining data/putty-0.74/ssh1connection-client.c
Examining data/putty-0.74/ssh1connection-server.c
Examining data/putty-0.74/ssh1connection.c
Examining data/putty-0.74/ssh1connection.h
Examining data/putty-0.74/ssh1login-server.c
Examining data/putty-0.74/ssh1login.c
Examining data/putty-0.74/ssh2bpp-bare.c
Examining data/putty-0.74/ssh2bpp.c
Examining data/putty-0.74/ssh2censor.c
Examining data/putty-0.74/ssh2connection-client.c
Examining data/putty-0.74/ssh2connection-server.c
Examining data/putty-0.74/ssh2connection.c
Examining data/putty-0.74/ssh2connection.h
Examining data/putty-0.74/ssh2kex-client.c
Examining data/putty-0.74/ssh2kex-server.c
Examining data/putty-0.74/ssh2transhk.c
Examining data/putty-0.74/ssh2transport.c
Examining data/putty-0.74/ssh2transport.h
Examining data/putty-0.74/ssh2userauth-server.c
Examining data/putty-0.74/ssh2userauth.c
Examining data/putty-0.74/sshaes.c
Examining data/putty-0.74/ssharcf.c
Examining data/putty-0.74/sshauxcrypt.c
Examining data/putty-0.74/sshbcrypt.c
Examining data/putty-0.74/sshblowf.c
Examining data/putty-0.74/sshblowf.h
Examining data/putty-0.74/sshbpp.h
Examining data/putty-0.74/sshccp.c
Examining data/putty-0.74/sshchan.h
Examining data/putty-0.74/sshcommon.c
Examining data/putty-0.74/sshcr.h
Examining data/putty-0.74/sshcrc.c
Examining data/putty-0.74/sshcrcda.c
Examining data/putty-0.74/sshdes.c
Examining data/putty-0.74/sshdh.c
Examining data/putty-0.74/sshdss.c
Examining data/putty-0.74/sshdssg.c
Examining data/putty-0.74/sshecc.c
Examining data/putty-0.74/sshecdsag.c
Examining data/putty-0.74/sshgss.h
Examining data/putty-0.74/sshgssc.c
Examining data/putty-0.74/sshgssc.h
Examining data/putty-0.74/sshhmac.c
Examining data/putty-0.74/sshmac.c
Examining data/putty-0.74/sshmd5.c
Examining data/putty-0.74/sshnogss.c
Examining data/putty-0.74/sshppl.h
Examining data/putty-0.74/sshprime.c
Examining data/putty-0.74/sshprng.c
Examining data/putty-0.74/sshpubk.c
Examining data/putty-0.74/sshrand.c
Examining data/putty-0.74/sshrsa.c
Examining data/putty-0.74/sshrsag.c
Examining data/putty-0.74/sshserver.c
Examining data/putty-0.74/sshserver.h
Examining data/putty-0.74/sshsh256.c
Examining data/putty-0.74/sshsh512.c
Examining data/putty-0.74/sshsha.c
Examining data/putty-0.74/sshshare.c
Examining data/putty-0.74/sshsignals.h
Examining data/putty-0.74/sshttymodes.h
Examining data/putty-0.74/sshverstring.c
Examining data/putty-0.74/sshzlib.c
Examining data/putty-0.74/storage.h
Examining data/putty-0.74/stripctrl.c
Examining data/putty-0.74/telnet.c
Examining data/putty-0.74/terminal.c
Examining data/putty-0.74/terminal.h
Examining data/putty-0.74/testback.c
Examining data/putty-0.74/testcrypt.c
Examining data/putty-0.74/testcrypt.h
Examining data/putty-0.74/testsc.c
Examining data/putty-0.74/testzlib.c
Examining data/putty-0.74/time.c
Examining data/putty-0.74/timing.c
Examining data/putty-0.74/tree234.c
Examining data/putty-0.74/tree234.h
Examining data/putty-0.74/utils.c
Examining data/putty-0.74/version.c
Examining data/putty-0.74/version.h
Examining data/putty-0.74/wcwidth.c
Examining data/putty-0.74/wildcard.c
Examining data/putty-0.74/x11fwd.c
Examining data/putty-0.74/licence.h
Examining data/putty-0.74/empty.h
Examining data/putty-0.74/charset/charset.h
Examining data/putty-0.74/charset/enum.c
Examining data/putty-0.74/charset/fromucs.c
Examining data/putty-0.74/charset/internal.h
Examining data/putty-0.74/charset/localenc.c
Examining data/putty-0.74/charset/macenc.c
Examining data/putty-0.74/charset/mimeenc.c
Examining data/putty-0.74/charset/sbcs.c
Examining data/putty-0.74/charset/slookup.c
Examining data/putty-0.74/charset/toucs.c
Examining data/putty-0.74/charset/utf8.c
Examining data/putty-0.74/charset/xenc.c
Examining data/putty-0.74/charset/sbcsdat.c
Examining data/putty-0.74/contrib/cygtermd/main.c
Examining data/putty-0.74/contrib/cygtermd/malloc.c
Examining data/putty-0.74/contrib/cygtermd/malloc.h
Examining data/putty-0.74/contrib/cygtermd/pty.c
Examining data/putty-0.74/contrib/cygtermd/pty.h
Examining data/putty-0.74/contrib/cygtermd/sel.c
Examining data/putty-0.74/contrib/cygtermd/sel.h
Examining data/putty-0.74/contrib/cygtermd/telnet.c
Examining data/putty-0.74/contrib/cygtermd/telnet.h
Examining data/putty-0.74/test/sclog/sclog.c
Examining data/putty-0.74/unix/gtkapp.c
Examining data/putty-0.74/unix/gtkask.c
Examining data/putty-0.74/unix/gtkcfg.c
Examining data/putty-0.74/unix/gtkcols.c
Examining data/putty-0.74/unix/gtkcols.h
Examining data/putty-0.74/unix/gtkcomm.c
Examining data/putty-0.74/unix/gtkcompat.h
Examining data/putty-0.74/unix/gtkdlg.c
Examining data/putty-0.74/unix/gtkfont.c
Examining data/putty-0.74/unix/gtkfont.h
Examining data/putty-0.74/unix/gtkmain.c
Examining data/putty-0.74/unix/gtkmisc.c
Examining data/putty-0.74/unix/gtkmisc.h
Examining data/putty-0.74/unix/gtkwin.c
Examining data/putty-0.74/unix/osxlaunch.c
Examining data/putty-0.74/unix/procnet.c
Examining data/putty-0.74/unix/unix.h
Examining data/putty-0.74/unix/ux_x11.c
Examining data/putty-0.74/unix/uxagentc.c
Examining data/putty-0.74/unix/uxagentsock.c
Examining data/putty-0.74/unix/uxcfg.c
Examining data/putty-0.74/unix/uxcons.c
Examining data/putty-0.74/unix/uxfdsock.c
Examining data/putty-0.74/unix/uxgen.c
Examining data/putty-0.74/unix/uxgss.c
Examining data/putty-0.74/unix/uxmisc.c
Examining data/putty-0.74/unix/uxnet.c
Examining data/putty-0.74/unix/uxnogtk.c
Examining data/putty-0.74/unix/uxnoise.c
Examining data/putty-0.74/unix/uxpeer.c
Examining data/putty-0.74/unix/uxpgnt.c
Examining data/putty-0.74/unix/uxplink.c
Examining data/putty-0.74/unix/uxpoll.c
Examining data/putty-0.74/unix/uxprint.c
Examining data/putty-0.74/unix/uxproxy.c
Examining data/putty-0.74/unix/uxpterm.c
Examining data/putty-0.74/unix/uxpty.c
Examining data/putty-0.74/unix/uxputty.c
Examining data/putty-0.74/unix/uxsel.c
Examining data/putty-0.74/unix/uxser.c
Examining data/putty-0.74/unix/uxserver.c
Examining data/putty-0.74/unix/uxsftp.c
Examining data/putty-0.74/unix/uxsftpserver.c
Examining data/putty-0.74/unix/uxshare.c
Examining data/putty-0.74/unix/uxsignal.c
Examining data/putty-0.74/unix/uxstore.c
Examining data/putty-0.74/unix/uxucs.c
Examining data/putty-0.74/unix/uxutils.c
Examining data/putty-0.74/unix/x11misc.c
Examining data/putty-0.74/unix/x11misc.h
Examining data/putty-0.74/unix/xkeysym.c
Examining data/putty-0.74/unix/xpmptcfg.c
Examining data/putty-0.74/unix/xpmpterm.c
Examining data/putty-0.74/unix/xpmpucfg.c
Examining data/putty-0.74/unix/xpmputty.c
Examining data/putty-0.74/windows/rcstuff.h
Examining data/putty-0.74/windows/sizetip.c
Examining data/putty-0.74/windows/win_res.h
Examining data/putty-0.74/windows/wincapi.c
Examining data/putty-0.74/windows/wincapi.h
Examining data/putty-0.74/windows/wincfg.c
Examining data/putty-0.74/windows/wincons.c
Examining data/putty-0.74/windows/winctrls.c
Examining data/putty-0.74/windows/windefs.c
Examining data/putty-0.74/windows/windlg.c
Examining data/putty-0.74/windows/window.c
Examining data/putty-0.74/windows/wingss.c
Examining data/putty-0.74/windows/winhandl.c
Examining data/putty-0.74/windows/winhelp.c
Examining data/putty-0.74/windows/winhelp.h
Examining data/putty-0.74/windows/winhsock.c
Examining data/putty-0.74/windows/winjump.c
Examining data/putty-0.74/windows/winmisc.c
Examining data/putty-0.74/windows/winmiscs.c
Examining data/putty-0.74/windows/winnet.c
Examining data/putty-0.74/windows/winnohlp.c
Examining data/putty-0.74/windows/winnoise.c
Examining data/putty-0.74/windows/winnojmp.c
Examining data/putty-0.74/windows/winnpc.c
Examining data/putty-0.74/windows/winnps.c
Examining data/putty-0.74/windows/winpgen.c
Examining data/putty-0.74/windows/winpgnt.c
Examining data/putty-0.74/windows/winpgntc.c
Examining data/putty-0.74/windows/winplink.c
Examining data/putty-0.74/windows/winprint.c
Examining data/putty-0.74/windows/winproxy.c
Examining data/putty-0.74/windows/winsecur.c
Examining data/putty-0.74/windows/winsecur.h
Examining data/putty-0.74/windows/winser.c
Examining data/putty-0.74/windows/winsftp.c
Examining data/putty-0.74/windows/winshare.c
Examining data/putty-0.74/windows/winstore.c
Examining data/putty-0.74/windows/winstuff.h
Examining data/putty-0.74/windows/wintime.c
Examining data/putty-0.74/windows/winucs.c
Examining data/putty-0.74/windows/winutils.c
Examining data/putty-0.74/windows/winx11.c

FINAL RESULTS:

data/putty-0.74/unix/uxpty.c:364:5:  [5] (race) chown:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchown( ) instead.
    chown(pty->name, getuid(), gp ? gp->gr_gid : -1);
data/putty-0.74/unix/uxpty.c:365:5:  [5] (race) chmod:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchmod( ) instead.
    chmod(pty->name, 0600);
data/putty-0.74/unix/uxsftpserver.c:435:28:  [5] (race) chown:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchown( ) instead.
            if (api_prefix(chown)(api_arg, attrs.uid, attrs.gid) < 0)   \
data/putty-0.74/unix/uxsftpserver.c:438:28:  [5] (race) chmod:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchmod( ) instead.
            if (api_prefix(chmod)(api_arg, attrs.permissions) < 0)      \
data/putty-0.74/cmdgen.c:1210:11:  [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.
    ret = system(buf);
data/putty-0.74/cmdgen.c:1219: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(fmt, ap);
data/putty-0.74/cmdgen.c:1280: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(fmt, ap);
data/putty-0.74/cmdgen.c:1314:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(filename, "test-%s.ppk", keytypes[i]);
data/putty-0.74/cmdgen.c:1315:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(pubfilename, "test-%s.pub", keytypes[i]);
data/putty-0.74/cmdgen.c:1316:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(osfilename, "test-%s.os", keytypes[i]);
data/putty-0.74/cmdgen.c:1317:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(scfilename, "test-%s.sc", keytypes[i]);
data/putty-0.74/cmdgen.c:1318:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(tmpfilename1, "test-%s.tmp1", keytypes[i]);
data/putty-0.74/cmdgen.c:1319:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(tmpfilename2, "test-%s.tmp2", keytypes[i]);
data/putty-0.74/cmdgen.c:1337:17:  [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.
            if (system(cmdbuf) ||
data/putty-0.74/contrib/cygtermd/main.c:41: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, ap);
data/putty-0.74/contrib/cygtermd/malloc.c:41: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(r,s);
data/putty-0.74/contrib/cygtermd/pty.c:176:25:  [4] (misc) getlogin:
  It's often easy to fool getlogin. Sometimes it does not work at all,
  because some program messed up the utmp file. Often, it gives only the
  first 8 characters of the login name. The user currently logged in on the
  controlling tty of our program need not be the user who started it. Avoid
  getlogin() for security-related purposes (CWE-807). Use getpwuid(geteuid())
  and extract the desired information instead.
                login = getlogin();
data/putty-0.74/contrib/cygtermd/pty.c:190:9:  [4] (shell) execv:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
        execv(program_args[0], program_args);
data/putty-0.74/defs.h:51:29:  [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, fmt_index, ellipsis_index)))
data/putty-0.74/import.c:1783: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(line + len - 1, line2);
data/putty-0.74/logging.c:355:13:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
            sprintf(dumpdata, "  %08"SIZEx"%*s\r\n",
data/putty-0.74/misc.c:194:13:  [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(key, q);
data/putty-0.74/pscp.c:2222: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, p, ap);
data/putty-0.74/psftp.c:1883:16:  [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.
    exitcode = system(cmd->words[1]);
data/putty-0.74/psftp.c:2760: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, p, ap);
data/putty-0.74/scpserver.c:416: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(namebuf + pathname.len + handle.len, wc);
data/putty-0.74/settings.c:459:18:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
            p += sprintf(p, "%s%s", (p > buf ? "," : ""), s);
data/putty-0.74/settings.c:720:13:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
            sprintf(buf2 + strlen(buf2), "%s%d",
data/putty-0.74/sshpubk.c:1413: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(p, comment);
data/putty-0.74/sshpubk.c:1501:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(fingerprint_str + i*3, "%02x%s", digest[i], i==15 ? "" : ":");
data/putty-0.74/telnet.c:372:13:  [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((char *)(b + 4), termspeed);
data/putty-0.74/terminal.c:4700:33:  [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(term->id_string, lbuf);
data/putty-0.74/terminal.c:6931:14:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
        p += sprintf(p, code == 1 ? "\x1B[H" : "\x1BOw");
data/putty-0.74/test/sclog/sclog.c:315:13:  [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(fileline, sizeof(fileline), " = %s:%"PRIu64,
data/putty-0.74/testcrypt.c:43: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, p, ap);
data/putty-0.74/testsc.c:89: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, p, ap);
data/putty-0.74/tree234.c:36:17:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
#define LOG(x) (printf x)
data/putty-0.74/tree234.c:1080: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, ap);
data/putty-0.74/unix/gtkask.c:144: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(ctx->passphrase + ctx->passlen, str);
data/putty-0.74/unix/gtkask.c:608: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, p, ap);
data/putty-0.74/unix/gtkfont.c:272: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(p, xlfd);
data/putty-0.74/unix/gtkfont.c:1030:22:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
            p += 1 + sprintf(p, "%s (%s)", xlfd->family_name, xlfd->foundry);
data/putty-0.74/unix/gtkfont.c:1036:22:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
            p += 1 + sprintf(p, "%s-%s", xlfd->charset_registry,
data/putty-0.74/unix/gtkfont.c:1044:18:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
            p += sprintf(p, "%s", xlfd->weight_name[0] ? xlfd->weight_name :
data/putty-0.74/unix/gtkfont.c:1058:22:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
                p += sprintf(p, " %s", xlfd->setwidth_name);
data/putty-0.74/unix/gtkfont.c:1064:22:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
                p += sprintf(p, " %s", xlfd->add_style_name);
data/putty-0.74/unix/gtkfont.c:1094:18:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
            p += sprintf(
data/putty-0.74/unix/gtkfont.c:2994: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(p, realfontname);
data/putty-0.74/unix/gtkfont.c:2998: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(p, family);
data/putty-0.74/unix/gtkfont.c:3004: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(p, charset);
data/putty-0.74/unix/gtkfont.c:3010: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(p, style);
data/putty-0.74/unix/gtkfont.c:3016: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(p, stylekey);
data/putty-0.74/unix/gtkmain.c:136:9:  [4] (shell) execv:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
        execv("/proc/self/exe", args);
data/putty-0.74/unix/gtkmain.c:137:9:  [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(progname, args);
data/putty-0.74/unix/gtkmain.c:300: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, p, ap);
data/putty-0.74/unix/gtkwin.c:4214: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, p, ap);
data/putty-0.74/unix/osxlaunch.c:325: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(path_copy, path);
data/putty-0.74/unix/osxlaunch.c:332: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(ret, ret_orig);
data/putty-0.74/unix/osxlaunch.c:349: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(ret, str1);
data/putty-0.74/unix/osxlaunch.c:350: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(ret + len1, str2);
data/putty-0.74/unix/osxlaunch.c:463:5:  [4] (shell) execv:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
    execv(realbin, new_argv);
data/putty-0.74/unix/uxagentc.c:151: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(addr.sun_path, name);
data/putty-0.74/unix/uxcons.c:224:13:  [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, wrongmsg_batch, keytype, fingerprint);
data/putty-0.74/unix/uxcons.c:227: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, wrongmsg, keytype, fingerprint);
data/putty-0.74/unix/uxcons.c:232:13:  [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, absentmsg_batch, keytype, fingerprint);
data/putty-0.74/unix/uxcons.c:235: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, absentmsg, keytype, fingerprint);
data/putty-0.74/unix/uxcons.c:257: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, abandoned);
data/putty-0.74/unix/uxcons.c:282: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, msg_batch, algtype, algname);
data/putty-0.74/unix/uxcons.c:286:5:  [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, msg, algtype, algname);
data/putty-0.74/unix/uxcons.c:305: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, abandoned);
data/putty-0.74/unix/uxcons.c:336: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, msg_batch, algname, betteralgs);
data/putty-0.74/unix/uxcons.c:340:5:  [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, msg, algname, betteralgs);
data/putty-0.74/unix/uxcons.c:359: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, abandoned);
data/putty-0.74/unix/uxcons.c:391: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, msgtemplate_batch, FILENAME_MAX, filename->path);
data/putty-0.74/unix/uxcons.c:395:5:  [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, msgtemplate, FILENAME_MAX, filename->path);
data/putty-0.74/unix/uxgen.c:26:17:  [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(default_devices[i], R_OK) == 0) {
data/putty-0.74/unix/uxmisc.c:121:12:  [4] (misc) getlogin:
  It's often easy to fool getlogin. Sometimes it does not work at all,
  because some program messed up the utmp file. Often, it gives only the
  first 8 characters of the login name. The user currently logged in on the
  controlling tty of our program need not be the user who started it. Avoid
  getlogin() for security-related purposes (CWE-807). Use getpwuid(geteuid())
  and extract the desired information instead.
    user = getlogin();
data/putty-0.74/unix/uxnet.c:711: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(u.su.sun_path, sock->addr->hostname);
data/putty-0.74/unix/uxnoise.c:62:10:  [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.
    fp = popen("ps -axu 2>/dev/null", "r");
data/putty-0.74/unix/uxnoise.c:73:10:  [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.
    fp = popen("ls -al /tmp 2>/dev/null", "r");
data/putty-0.74/unix/uxpgnt.c:39: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(pageant_logfp, fmt, ap);
data/putty-0.74/unix/uxpgnt.c:848:13:  [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(exec_args[0], exec_args);
data/putty-0.74/unix/uxprint.c:20:15:  [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.
    ret->fp = popen(printer, "w");
data/putty-0.74/unix/uxproxy.c:65: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.
            execl("/bin/sh", "sh", "-c", cmd, (void *)NULL);
data/putty-0.74/unix/uxpty.c:332:21:  [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.
                    access(master_name, R_OK | W_OK) == 0) {
data/putty-0.74/unix/uxpty.c:340:21:  [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(pty->name, master_name);
data/putty-0.74/unix/uxpty.c:346:25:  [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.
                        access(pty->name, R_OK | W_OK) == 0)
data/putty-0.74/unix/uxpty.c:1184:17:  [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/putty-0.74/unix/uxpty.c:1219:21:  [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.
                    execl(shell, shell, "-c", cmd, (void *)NULL);
data/putty-0.74/unix/uxpty.c:1228:17:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
                sprintf(shellname, "-%s", p);
data/putty-0.74/unix/uxpty.c:1231: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.
            execl(getenv("SHELL"), shellname, (void *)NULL);
data/putty-0.74/unix/uxserver.c:54: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, p, ap);
data/putty-0.74/unix/uxserver.c:64: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, p, ap);
data/putty-0.74/unix/uxstore.c:120:24:  [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 (xdg_dir && access(xdg_dir, F_OK) == 0) {
data/putty-0.74/unix/uxstore.c:133:24:  [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 (old_dir && access(old_dir, F_OK) == 0) {
data/putty-0.74/unix/uxstore.c:137:25:  [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 (old_dir2 && access(old_dir2, F_OK) == 0) {
data/putty-0.74/unix/uxstore.c:141: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(old_dir3, F_OK) == 0) {
data/putty-0.74/utils.c:192: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, p, ap);
data/putty-0.74/utils.c:257: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(p, s);
data/putty-0.74/utils.c:280: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(p, s1);
data/putty-0.74/utils.c:288: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(q, sn);
data/putty-0.74/utils.c:326: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.
#define vsnprintf _vsnprintf
data/putty-0.74/utils.c:373:19:  [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 len = vsnprintf(buf + oldlen, size - oldlen, fmt, aq);
data/putty-0.74/windows/wincapi.c:16:20:  [4] (crypto) crypt:
  The crypt functions use a poor one-way hashing algorithm; since they only
  accept passwords of 8 characters or fewer and only a two-byte salt, they
  are excessively vulnerable to dictionary attacks given today's faster
  computing equipment (CWE-327). Use a different algorithm, such as SHA-256,
  with a larger, non-repeating salt.
    static HMODULE crypt;
data/putty-0.74/windows/wincapi.c:21:22:  [4] (crypto) crypt:
  The crypt functions use a poor one-way hashing algorithm; since they only
  accept passwords of 8 characters or fewer and only a two-byte salt, they
  are excessively vulnerable to dictionary attacks given today's faster
  computing equipment (CWE-327). Use a different algorithm, such as SHA-256,
  with a larger, non-repeating salt.
        successful = crypt &&
data/putty-0.74/windows/wincapi.c:25:47:  [4] (crypto) crypt:
  The crypt functions use a poor one-way hashing algorithm; since they only
  accept passwords of 8 characters or fewer and only a two-byte salt, they
  are excessively vulnerable to dictionary attacks given today's faster
  computing equipment (CWE-327). Use a different algorithm, such as SHA-256,
  with a larger, non-repeating salt.
            GET_WINDOWS_FUNCTION_NO_TYPECHECK(crypt, CryptProtectMemory)
data/putty-0.74/windows/wincapi.c:27:34:  [4] (crypto) crypt:
  The crypt functions use a poor one-way hashing algorithm; since they only
  accept passwords of 8 characters or fewer and only a two-byte salt, they
  are excessively vulnerable to dictionary attacks given today's faster
  computing equipment (CWE-327). Use a different algorithm, such as SHA-256,
  with a larger, non-repeating salt.
            GET_WINDOWS_FUNCTION(crypt, CryptProtectMemory)
data/putty-0.74/windows/wincons.c:158:13:  [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, wrongmsg_batch, keytype, fingerprint);
data/putty-0.74/windows/wincons.c:161: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, wrongmsg, keytype, fingerprint);
data/putty-0.74/windows/wincons.c:166:13:  [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, absentmsg_batch, keytype, fingerprint);
data/putty-0.74/windows/wincons.c:169: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, absentmsg, keytype, fingerprint);
data/putty-0.74/windows/wincons.c:187: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, abandoned);
data/putty-0.74/windows/wincons.c:212: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, msg_batch, algtype, algname);
data/putty-0.74/windows/wincons.c:216:5:  [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, msg, algtype, algname);
data/putty-0.74/windows/wincons.c:229: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, abandoned);
data/putty-0.74/windows/wincons.c:260: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, msg_batch, algname, betteralgs);
data/putty-0.74/windows/wincons.c:264:5:  [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, msg, algname, betteralgs);
data/putty-0.74/windows/wincons.c:277: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, abandoned);
data/putty-0.74/windows/wincons.c:337: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, msgtemplate_batch, FILENAME_MAX, filename->path);
data/putty-0.74/windows/wincons.c:341:5:  [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, msgtemplate, FILENAME_MAX, filename->path);
data/putty-0.74/windows/winctrls.c:431:13:  [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(q, p);
data/putty-0.74/windows/windlg.c:243:13:  [4] (shell) ShellExecute:
  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.
            ShellExecute(hwnd, "open",
data/putty-0.74/windows/window.c:4765: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(window_name, title);
data/putty-0.74/windows/window.c:4774: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(icon_name, title);
data/putty-0.74/windows/winmiscs.c:52:59:  [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.
    VirtualProtect(minefield_admin, minefield_npages * 2, access, NULL);
data/putty-0.74/windows/winnet.c:555: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(*canonicalname, realhost);
data/putty-0.74/windows/winpgen.c:322:13:  [4] (shell) ShellExecute:
  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.
            ShellExecute(hwnd, "open",
data/putty-0.74/windows/winpgen.c:800:13:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
            sprintf(msg, "Successfully imported foreign key\n"
data/putty-0.74/windows/winpgnt.c:154:13:  [4] (shell) ShellExecute:
  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.
            ShellExecute(hwnd, "open",
data/putty-0.74/windows/winpgnt.c:996:29:  [4] (shell) ShellExecute:
  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((INT_PTR)ShellExecute(hwnd, NULL, putty_path, cmdline,
data/putty-0.74/windows/winpgnt.c:1066:21:  [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(param, mii.dwTypeData);
data/putty-0.74/windows/winpgnt.c:1067:33:  [4] (shell) ShellExecute:
  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((INT_PTR)ShellExecute(hwnd, NULL, putty_path, param,
data/putty-0.74/windows/winpgnt.c:1112:9:  [4] (shell) ShellExecute:
  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 (ShellExecute(NULL, _T("open"), cmdline,
data/putty-0.74/windows/winshare.c:61: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(cryptdata, realname);
data/putty-0.74/windows/winstore.c:725:13:  [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(piterator_new, add);
data/putty-0.74/windows/winstore.c:736:21:  [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(piterator_new, piterator_old);
data/putty-0.74/windows/winutils.c:538:23:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
            q = str + sprintf(str, "%s -splat ", argv[0]);
data/putty-0.74/windows/winutils.c:552:13:  [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.
            system(str);
data/putty-0.74/windows/winutils.c:568:39:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
                        p = teststr + sprintf(teststr, "%s -split ", argv[0]);
data/putty-0.74/windows/winutils.c:581:25:  [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.
                        system(teststr);
data/putty-0.74/cmdgen.c:1296: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("CGTEST_VERBOSE"))
data/putty-0.74/contrib/cygtermd/pty.c:161: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.
            shell = getenv("SHELL");
data/putty-0.74/fuzzterm.c:196:23:  [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.
        return dupstr(getenv("TERM"));
data/putty-0.74/sftp.h:335:12:  [3] (buffer) realpath:
  This function does not protect against buffer overflows, and some
  implementations can overflow internally (CWE-120/CWE-785!). Ensure that the
  destination buffer is at least of size MAXPATHLEN, andto protect against
  implementation problems, the input argument should also be checked to
  ensure it is no larger than MAXPATHLEN.
    void (*realpath)(SftpServer *srv, SftpReplyBuilder *reply,
data/putty-0.74/sftp.h:398:12:  [3] (buffer) realpath:
  This function does not protect against buffer overflows, and some
  implementations can overflow internally (CWE-120/CWE-785!). Ensure that the
  destination buffer is at least of size MAXPATHLEN, andto protect against
  implementation problems, the input argument should also be checked to
  ensure it is no larger than MAXPATHLEN.
{ srv->vt->realpath(srv, reply, path); }
data/putty-0.74/unix/gtkapp.c:324:28:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
        const char *home = getenv("HOME");
data/putty-0.74/unix/osxlaunch.c:303:27:  [3] (buffer) realpath:
  This function does not protect against buffer overflows, and some
  implementations can overflow internally (CWE-120/CWE-785!). Ensure that the
  destination buffer is at least of size MAXPATHLEN, andto protect against
  implementation problems, the input argument should also be checked to
  ensure it is no larger than MAXPATHLEN.
    char *our_real_path = realpath(our_path, NULL);
data/putty-0.74/unix/osxlaunch.c:377:28:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    const char *oldvalue = getenv(name);
data/putty-0.74/unix/ux_x11.c:26:17:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    xauthfile = getenv("XAUTHORITY");
data/putty-0.74/unix/ux_x11.c:28: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.
        xauthfile = getenv("HOME");
data/putty-0.74/unix/ux_x11.c:126: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("TMPDIR");
data/putty-0.74/unix/uxagentc.c:20: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.
    const char *p = getenv("SSH_AUTH_SOCK");
data/putty-0.74/unix/uxagentc.c:138:12:  [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.
    name = getenv("SSH_AUTH_SOCK");
data/putty-0.74/unix/uxcons.c:625:19:  [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.
    return dupstr(getenv("DISPLAY"));
data/putty-0.74/unix/uxpgnt.c:175:29:  [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 *shell = getenv("SHELL");
data/putty-0.74/unix/uxpgnt.c:1081:19:  [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.
        display = getenv("DISPLAY");
data/putty-0.74/unix/uxplink.c:49:23:  [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.
        return dupstr(getenv("TERM"));
data/putty-0.74/unix/uxplink.c:617:19:  [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("PLINK_PROTOCOL");
data/putty-0.74/unix/uxpty.c:1217:31:  [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 *shell = getenv("SHELL");
data/putty-0.74/unix/uxpty.c:1222:27:  [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 *shell = getenv("SHELL");
data/putty-0.74/unix/uxpty.c:1231:19:  [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.
            execl(getenv("SHELL"), shellname, (void *)NULL);
data/putty-0.74/unix/uxputty.c:72:19:  [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.
        display = getenv("DISPLAY");
data/putty-0.74/unix/uxserver.c:543:32:  [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.
    ssc.session_starting_dir = getenv("HOME");
data/putty-0.74/unix/uxsftpserver.c:211:21:  [3] (buffer) realpath:
  This function does not protect against buffer overflows, and some
  implementations can overflow internally (CWE-120/CWE-785!). Ensure that the
  destination buffer is at least of size MAXPATHLEN, andto protect against
  implementation problems, the input argument should also be checked to
  ensure it is no larger than MAXPATHLEN.
    char *outpath = realpath(inpath, NULL);
data/putty-0.74/unix/uxstore.c:93: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.
        env = getenv("PUTTYDIR");
data/putty-0.74/unix/uxstore.c:97: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.
        home = getenv("HOME");
data/putty-0.74/unix/uxstore.c:106: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.
        env = getenv("XDG_CONFIG_HOME");
data/putty-0.74/unix/uxstore.c:165: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.
        env = getenv("PUTTYSESSIONS");
data/putty-0.74/unix/uxstore.c:182: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.
        env = getenv("PUTTYSSHHOSTKEYS");
data/putty-0.74/unix/uxstore.c:197: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.
        env = getenv("PUTTYRANDOMSEED");
data/putty-0.74/unix/uxucs.c:123:19:  [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 (((s = getenv("LC_ALL"))   && *s) ||
data/putty-0.74/unix/uxucs.c:124:19:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
            ((s = getenv("LC_CTYPE")) && *s) ||
data/putty-0.74/unix/uxucs.c:125:19:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
            ((s = getenv("LANG"))     && *s)) {
data/putty-0.74/windows/wingss.c:144:26:  [3] (misc) LoadLibraryEx:
  Ensure that the full path to the library is specified, or current directory
  may be used (CWE-829, CWE-20). Use registry entry or GetWindowsDirectory to
  find library path, if you aren't already.
                module = LoadLibraryEx (buffer, NULL,
data/putty-0.74/windows/wingss.c:231:18:  [3] (misc) LoadLibraryEx:
  Ensure that the full path to the library is specified, or current directory
  may be used (CWE-829, CWE-20). Use registry entry or GetWindowsDirectory to
  find library path, if you aren't already.
        module = LoadLibraryEx(path, NULL,
data/putty-0.74/windows/winmisc.c:18:19:  [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.
    return dupstr(getenv("DISPLAY"));
data/putty-0.74/windows/winmisc.c:237:11:  [3] (misc) LoadLibrary:
  Ensure that the full path to the library is specified, or current directory
  may be used (CWE-829, CWE-20). Use registry entry or GetWindowsDirectory to
  find library path, if you aren't already.
    ret = LoadLibrary(fullpath);
data/putty-0.74/windows/winplink.c:305:19:  [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("PLINK_PROTOCOL");
data/putty-0.74/windows/winproxy.c:91:5:  [3] (shell) CreateProcess:
  This causes a new process to execute and is difficult to use safely
  (CWE-78). Specify the application path in the first argument, NOT as part
  of the second, or embedded spaces could allow an attacker to force a
  different program to run.
    CreateProcess(NULL, cmd, NULL, NULL, true,
data/putty-0.74/windows/winproxy.c:91:5:  [3] (shell) CreateProcess:
  This causes a new process to execute and is difficult to use safely
  (CWE-78). Specify the application path in the first argument, NOT as part
  of the second, or embedded spaces could allow an attacker to force a
  different program to run.
    CreateProcess(NULL, cmd, NULL, NULL, true,
data/putty-0.74/agentf.c:44:14:  [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 msglen[4];
data/putty-0.74/be_misc.c:16: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 addrbuf[256], *msg;
data/putty-0.74/be_misc.c:94: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(psb->buf + psb->size, data, to_consume);
data/putty-0.74/charset/internal.h:68:14:  [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 ucs2sbcs[256];
data/putty-0.74/charset/utf8.c:243:5:  [2] (buffer) wchar_t:
  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.
    wchar_t *p, str[512];
data/putty-0.74/charset/utf8.c:282:5:  [2] (buffer) wchar_t:
  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.
    wchar_t *p, str[512];
data/putty-0.74/cmdgen.c:49: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.
const char *prompts[3];
data/putty-0.74/cmdgen.c:193:10:  [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/putty-0.74/cmdgen.c:424:32:  [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).
                        bits = atoi(p);
data/putty-0.74/cmdgen.c:676: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 default_comment[80];
data/putty-0.74/cmdgen.c:1251: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[256], *ret;
data/putty-0.74/cmdgen.c:1253:10:  [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/putty-0.74/cmdgen.c:1310: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 filename[128], osfilename[128], scfilename[128];
data/putty-0.74/cmdgen.c:1311: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 pubfilename[128], tmpfilename1[128], tmpfilename2[128];
data/putty-0.74/cmdline.c:236:51:  [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).
                    conf_set_int(conf, CONF_port, atoi(p));
data/putty-0.74/cmdline.c:557:46:  [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).
        conf_set_int(conf, CONF_ssh_nc_port, atoi(portp + 1));
data/putty-0.74/cmdline.c:570:14:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        fp = fopen(filename, "r");
data/putty-0.74/cmdline.c:576: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 readbuf[4096];
data/putty-0.74/cmdline.c:593:39:  [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).
        conf_set_int(conf, CONF_port, atoi(value));
data/putty-0.74/cmdline.c:798:32:  [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 serspeed = atoi(nextitem);
data/putty-0.74/config.c:137:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            char str[80];
data/putty-0.74/config.c:140:17:  [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(str, "%d", value);
data/putty-0.74/config.c:142:17:  [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(str, "%g", (double)value / (double)(-length));
data/putty-0.74/config.c:147:41:  [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).
                conf_set_int(conf, key, atoi(str));
data/putty-0.74/config.c:223: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[80];
data/putty-0.74/config.c:237:13:  [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(buf, "%d", conf_get_int(conf, CONF_serspeed));
data/putty-0.74/config.c:241:17:  [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(buf, "%d", conf_get_int(conf, CONF_port));
data/putty-0.74/config.c:249: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).
        int i = atoi(s);
data/putty-0.74/config.c:833: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 str[100];
data/putty-0.74/config.c:834:17:  [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(str, "%d\t(0x%02X)\t%c\t%d", i, i,
data/putty-0.74/config.c:846: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).
            n = atoi(str);
data/putty-0.74/config.c:916: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).
            cval = atoi(str);
data/putty-0.74/config.c:972:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            char buf[40];
data/putty-0.74/config.c:973:13:  [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(buf, "%d", r); dlg_editbox_set(cd->redit, dlg, buf);
data/putty-0.74/config.c:974:13:  [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(buf, "%d", g); dlg_editbox_set(cd->gedit, dlg, buf);
data/putty-0.74/config.c:975:13:  [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(buf, "%d", b); dlg_editbox_set(cd->bedit, dlg, buf);
data/putty-0.74/contrib/cygtermd/pty.c:23: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 ptyname[FILENAME_MAX];
data/putty-0.74/contrib/cygtermd/pty.c:31: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).
    master = open("/dev/ptmx", O_RDWR);
data/putty-0.74/contrib/cygtermd/pty.c:64: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 *fallback_args[2];
data/putty-0.74/contrib/cygtermd/pty.c:87:13:  [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).
    slave = open(ptyname, O_RDWR | O_NOCTTY);
data/putty-0.74/contrib/cygtermd/pty.c:120:19:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        if ((fd = open("/dev/tty", O_RDWR)) >= 0) {
data/putty-0.74/contrib/cygtermd/pty.c:133:19:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        if ((fd = open(ptyname, O_RDWR)) >= 0) {
data/putty-0.74/contrib/cygtermd/sel.c:33: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[BUFFER_GRANULE];
data/putty-0.74/contrib/cygtermd/sel.c:71: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(ch->tail->buf + ch->tail->buflen, buf, copylen);
data/putty-0.74/contrib/cygtermd/sel.c:84: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(newbuf->buf, buf, grainlen);
data/putty-0.74/contrib/cygtermd/sel.c:302: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[65536];
data/putty-0.74/contrib/cygtermd/telnet.c:202:14:  [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 b[3];
data/putty-0.74/contrib/cygtermd/telnet.c:230: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 buf[6];
data/putty-0.74/contrib/cygtermd/telnet.c:358:13:  [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(result, "%.*s=%.*s",
data/putty-0.74/contrib/cygtermd/telnet.c:373:13:  [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(telnet->shdata.termtype, "TERM=");
data/putty-0.74/contrib/cygtermd/telnet.c:538:27:  [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 const unsigned char iac[2] = { IAC, IAC };
data/putty-0.74/contrib/cygtermd/telnet.c:539:27:  [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 const unsigned char cr[2] = { CR, NUL };
data/putty-0.74/contrib/cygtermd/telnet.c:541:27:  [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 const unsigned char nl[2] = { CR, LF };
data/putty-0.74/cproxy.c:41:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char data[260];
data/putty-0.74/cproxy.c:42:14:  [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 outbuf[20];
data/putty-0.74/cproxy.c:151: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 chapbuf[514];
data/putty-0.74/cproxy.c:165: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(chapbuf+7, username, ulen);
data/putty-0.74/fuzzterm.c:17: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 blk[512];
data/putty-0.74/fuzzterm.c:187: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.
const char *const gsslibnames[0] = { };
data/putty-0.74/import.c:280: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 iv[32];
data/putty-0.74/import.c:312: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 base64_bit[4];
data/putty-0.74/import.c:423:30:  [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 out[3];
data/putty-0.74/import.c:547:18:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        unsigned char keybuf[32];
data/putty-0.74/import.c:788: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 zero[1];
data/putty-0.74/import.c:789:14:  [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 iv[8];
data/putty-0.74/import.c:989:18:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        unsigned char keybuf[32];
data/putty-0.74/import.c:1100: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 base64_bit[4];
data/putty-0.74/import.c:1144:26:  [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 out[3];
data/putty-0.74/import.c:1323:18:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        unsigned char keybuf[48];
data/putty-0.74/import.c:1489:14:  [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 bcrypt_salt[16];
data/putty-0.74/import.c:1563:22:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            unsigned char keybuf[48];
data/putty-0.74/import.c:1704: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 comment[256];                 /* allowing any length is overkill */
data/putty-0.74/import.c:1718: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 base64_bit[4];
data/putty-0.74/import.c:1809:30:  [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 out[3];
data/putty-0.74/import.c:2018:18:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        unsigned char keybuf[32], iv[8];
data/putty-0.74/import.c:2268:18:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        unsigned char keybuf[32], iv[8];
data/putty-0.74/ldisc.c:50: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 cc[2];
data/putty-0.74/ldisc.c:55: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 cc[5];
data/putty-0.74/ldisc.c:56:9:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
        sprintf(cc, "<%02X>", c);
data/putty-0.74/logging.c:87: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[256], *event;
data/putty-0.74/logging.c:282: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 dumpdata[128], smalldata[5];
data/putty-0.74/logging.c:316: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 buf[256];
data/putty-0.74/logging.c:365:17:  [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(smalldata, "XX");
data/putty-0.74/logging.c:367:32:  [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.
                c = ((unsigned char *)data)[p];
data/putty-0.74/logging.c:368:17:  [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(smalldata, "%02x", c);
data/putty-0.74/logging.c:381:17:  [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(dumpdata + 10+1+3*16+2+output_pos, "\r\n");
data/putty-0.74/logging.c:452: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[32], *bufp;
data/putty-0.74/logging.c:487:24:  [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.
                size = sprintf(buf, "%d", port);
data/putty-0.74/marshal.c:20: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[16];
data/putty-0.74/marshal.c:42:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char data[2];
data/putty-0.74/marshal.c:49:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char data[4];
data/putty-0.74/marshal.c:56:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char data[8];
data/putty-0.74/memory.c:125:13:  [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(toret, ptr, oldsize * eltsize);
data/putty-0.74/misc.c:174:22:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            unsigned char decoded[6];
data/putty-0.74/mpint.c:196: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(x->w, w, x->nw * sizeof(BignumInt));
data/putty-0.74/network.h:229:18:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        unsigned char ipv6[16];
data/putty-0.74/network.h:230:18:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        unsigned char ipv4[4];
data/putty-0.74/network.h:291: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[8192];
data/putty-0.74/nogss.c:10: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.
const char *const gsslibnames[1] = { "dummy" };
data/putty-0.74/pageant.c:224:22:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            unsigned char response_md5[16];
data/putty-0.74/pageant.c:706:14:  [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 lenbuf[4], pktbuf[AGENT_MAX_MSGLEN];
data/putty-0.74/pageant.c:948: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(ret, response+5, resplen-5);
data/putty-0.74/pageant.c:984: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(ret, response+5, resplen-5);
data/putty-0.74/portfwd.c:840: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).
        sport = atoi(sports);
data/putty-0.74/portfwd.c:866:21:  [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).
            dport = atoi(dports);
data/putty-0.74/proxy.c:145:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            char databuf[512];
data/putty-0.74/proxy.c:149:13:  [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(databuf, data.ptr, data.len);
data/putty-0.74/proxy.c:249: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 hostip[64];
data/putty-0.74/proxy.c:482:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            char addrbuf[256], *logmsg;
data/putty-0.74/proxy.c:572: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 *buf, dest[512];
data/putty-0.74/proxy.c:590:13:  [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(buf2, "Proxy-Authorization: Basic ");
data/putty-0.74/proxy.c:594:13:  [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(buf2+j, "\r\n");
data/putty-0.74/proxy.c:761: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 hostname[512];
data/putty-0.74/proxy.c:771: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 addr[4];
data/putty-0.74/proxy.c:846:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            char data[8];
data/putty-0.74/proxy.c:989:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            char data[2];
data/putty-0.74/proxy.c:1023:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            char data[2];
data/putty-0.74/proxy.c:1089:21:  [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 hostname[512];
data/putty-0.74/proxy.c:1134:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            char data[5];
data/putty-0.74/proxy.c:1151: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 buf[256];
data/putty-0.74/proxy.c:1153:17:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
                strcpy(buf, "Proxy error: ");
data/putty-0.74/proxy.c:1156:27:  [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.
                  case 1: strcat(buf, "General SOCKS server failure"); break;
data/putty-0.74/proxy.c:1157:27:  [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.
                  case 2: strcat(buf, "Connection not allowed by ruleset"); break;
data/putty-0.74/proxy.c:1158:27:  [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.
                  case 3: strcat(buf, "Network unreachable"); break;
data/putty-0.74/proxy.c:1159:27:  [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.
                  case 4: strcat(buf, "Host unreachable"); break;
data/putty-0.74/proxy.c:1160:27:  [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.
                  case 5: strcat(buf, "Connection refused"); break;
data/putty-0.74/proxy.c:1161:27:  [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.
                  case 6: strcat(buf, "TTL expired"); break;
data/putty-0.74/proxy.c:1162:27:  [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.
                  case 7: strcat(buf, "Command not supported"); break;
data/putty-0.74/proxy.c:1163:27:  [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.
                  case 8: strcat(buf, "Address type not supported"); break;
data/putty-0.74/proxy.c:1164:28:  [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.
                  default: sprintf(buf+strlen(buf),
data/putty-0.74/proxy.c:1373: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 dest[512];
data/putty-0.74/proxy.c:1453:28:  [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.
                    out += sprintf(out, "\\x%02X", (unsigned)*in & 0xFF);
data/putty-0.74/pscp.c:551:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char ch, resp, rbuf[2048];
data/putty-0.74/pscp.c:749: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 buf[80];
data/putty-0.74/pscp.c:750:9:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
        sprintf(buf, "T%lu 0 %lu 0\n", mtime, atime);
data/putty-0.74/pscp.c:967: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 buf[40];
data/putty-0.74/pscp.c:968:9:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
        sprintf(buf, "D%04o 0 ", modes);
data/putty-0.74/pscp.c:1496:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(data, vbuf, actuallen);
data/putty-0.74/pscp.c:1650: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 transbuf[PSCP_SEND_BLOCK];
data/putty-0.74/pscp.c:1893:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            char transbuf[32768];
data/putty-0.74/pscp.c:2134: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(cmd, "ls -la '");
data/putty-0.74/psftp.c:712: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 buffer[4096];
data/putty-0.74/psftp.c:1829: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).
        portnumber = atoi(cmd->words[2]);
data/putty-0.74/psftp.c:2408:14:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        fp = fopen(batchfile, "r");
data/putty-0.74/putty.h:159:5:  [2] (buffer) wchar_t:
  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.
    wchar_t unitab_scoacs[256];
data/putty-0.74/putty.h:160:5:  [2] (buffer) wchar_t:
  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.
    wchar_t unitab_line[256];
data/putty-0.74/putty.h:161:5:  [2] (buffer) wchar_t:
  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.
    wchar_t unitab_font[256];
data/putty-0.74/putty.h:162:5:  [2] (buffer) wchar_t:
  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.
    wchar_t unitab_xterm[256];
data/putty-0.74/putty.h:163:5:  [2] (buffer) wchar_t:
  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.
    wchar_t unitab_oemcp[256];
data/putty-0.74/putty.h:164:14:  [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 unitab_ctrl[256];
data/putty-0.74/rlogin.c:325: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 b[12] = { '\xFF', '\xFF', 0x73, 0x73, 0, 0, 0, 0, 0, 0, 0, 0 };
data/putty-0.74/scpserver.c:411: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(namebuf, pathname.ptr, pathname.len);
data/putty-0.74/scpserver.c:413: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(namebuf + pathname.len, handle.ptr, handle.len);
data/putty-0.74/scpserver.c:806:13:  [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(subpath_space, node->pathname.ptr, node->pathname.len);
data/putty-0.74/scpserver.c:808:13:  [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(subpath_space + node->pathname.len + 1,
data/putty-0.74/scpserver.c:987: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, pathname.ptr, pathname.len);
data/putty-0.74/sesschan.c:396: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 screensuffix[32];
data/putty-0.74/sesschan.c:411: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 hexbuf[3];
data/putty-0.74/sesschan.c:697: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 lenbuf[4];
data/putty-0.74/settings.c:699: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 buf[20], buf2[30];
data/putty-0.74/settings.c:700:9:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
        sprintf(buf, "Colour%d", i);
data/putty-0.74/settings.c:701:9:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
        sprintf(buf2, "%d,%d,%d",
data/putty-0.74/settings.c:715: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 buf[20], buf2[256];
data/putty-0.74/settings.c:717:9:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
        sprintf(buf, "Wordness%d", i);
data/putty-0.74/settings.c:1134: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 buf[20], *buf2;
data/putty-0.74/settings.c:1136:9:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
        sprintf(buf, "Colour%d", i);
data/putty-0.74/settings.c:1163: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 buf[20], *buf2, *p;
data/putty-0.74/settings.c:1165:9:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
        sprintf(buf, "Wordness%d", i);
data/putty-0.74/settings.c:1174:54:  [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).
            conf_set_int_int(conf, CONF_wordness, j, atoi(q));
data/putty-0.74/sftp.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 x[4];
data/putty-0.74/sftp.c:699: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(buffer, data.ptr, data.len);
data/putty-0.74/sftp.h:339: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).
    void (*open)(SftpServer *srv, SftpReplyBuilder *reply,
data/putty-0.74/sftp.h:402: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).
{ srv->vt->open(srv, reply, path, flags, attrs); }
data/putty-0.74/sftpcommon.c:22: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(pkt->data + pkt->length, data, length);
data/putty-0.74/ssh.c:665:30:  [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).
                *savedport = atoi(colon);
data/putty-0.74/ssh1bpp.c:142:22:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            unsigned char lenbuf[4];
data/putty-0.74/ssh1bpp.c:215:13:  [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(s->data + s->pad, decompblk, decomplen);
data/putty-0.74/ssh1login-server.c:27:14:  [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 cookie[8];
data/putty-0.74/ssh1login-server.c:28:14:  [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 session_key[32];
data/putty-0.74/ssh1login-server.c:29:14:  [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 session_id[16];
data/putty-0.74/ssh1login-server.c:39:14:  [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 auth_rsa_expected_response[16];
data/putty-0.74/ssh1login.c:34:14:  [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 session_key[32];
data/putty-0.74/ssh1login.c:43:14:  [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 cookie[8];
data/putty-0.74/ssh1login.c:44:14:  [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 session_id[16];
data/putty-0.74/ssh1login.c:184: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(s->cookie, pl.ptr, pl.len);
data/putty-0.74/ssh1login.c:789:30:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
                    unsigned char buffer[32];
data/putty-0.74/ssh2bpp-bare.c:76:22:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            unsigned char lenbuf[4];
data/putty-0.74/ssh2bpp.c:367:13:  [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(s->data, s->buf, s->maxlen);
data/putty-0.74/ssh2bpp.c:384:26:  [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 len[4];
data/putty-0.74/ssh2bpp.c:385: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(len, s->buf, 4);
data/putty-0.74/ssh2bpp.c:417:13:  [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(s->data, s->buf, 4);
data/putty-0.74/ssh2bpp.c:482:13:  [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(s->data, s->buf, s->cipherblk);
data/putty-0.74/ssh2bpp.c:547: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(s->data + 5, newpayload, newlen);
data/putty-0.74/ssh2connection.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 reason_code_buf[256];
data/putty-0.74/ssh2connection.c:114:9:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
        sprintf(reason_code_buf, "unknown reason code %#x", reason_code);
data/putty-0.74/ssh2transport.c:103:14:  [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 const char *const kexlist_descr[NKEXLIST] = {
data/putty-0.74/ssh2transport.c:1290: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(s->session_id, s->exchange_hash, sizeof(s->exchange_hash));
data/putty-0.74/ssh2transport.h:128:14:  [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 session_id[MAX_HASH_LEN];
data/putty-0.74/ssh2transport.h:178:14:  [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 exchange_hash[MAX_HASH_LEN];
data/putty-0.74/sshaes.c:237: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 *prefix, const uint16_t slices[8])
data/putty-0.74/sshaes.c:250: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 *prefix, const BignumInt slices[8])
data/putty-0.74/sshaes.c:860:13:  [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(inblk, key + 4*i, 4);
data/putty-0.74/sshaes.c:1061: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(ctx->iv.cbc.prevblk, iv, 16);
data/putty-0.74/sshaes.c:1124: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(blk, ctx->iv.cbc.prevblk, 16);
data/putty-0.74/sshaes.c:1158: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(data, blk, 16 * blocks);
data/putty-0.74/sshaes.c:1167:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(ctx->iv.cbc.prevblk, output, 16);
data/putty-0.74/sshaes.c:1168:13:  [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(output, decrypted, 16);
data/putty-0.74/ssharcf.c:11:14:  [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 i, j, s[256];
data/putty-0.74/ssharcf.c:36:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char tmp, k[256], *s;
data/putty-0.74/sshauxcrypt.c:20: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 iv[16];
data/putty-0.74/sshauxcrypt.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(keys3, vkey, 16);
data/putty-0.74/sshauxcrypt.c:53: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(keys3 + 16, vkey, 8);
data/putty-0.74/sshauxcrypt.c:114:14:  [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 key[8];
data/putty-0.74/sshbcrypt.c:35:33:  [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.
void bcrypt_hash(const unsigned char *key, int keybytes,
data/putty-0.74/sshbcrypt.c:36:33:  [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 unsigned char *salt, int saltbytes,
data/putty-0.74/sshbcrypt.c:37:27:  [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 output[32])
data/putty-0.74/sshbcrypt.c:45: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(output, "cyxOmorhcitawolBhsiftawSanyDetim", 32);
data/putty-0.74/sshbcrypt.c:53:37:  [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 unsigned char hashed_passphrase[64],
data/putty-0.74/sshbcrypt.c:54:37:  [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 unsigned char *salt, int saltbytes,
data/putty-0.74/sshbcrypt.c:55:31:  [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 output[32])
data/putty-0.74/sshbcrypt.c:57:14:  [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 hashed_salt[64];
data/putty-0.74/sshbcrypt.c:76:14:  [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 hashed_passphrase[64];
data/putty-0.74/sshbcrypt.c:77:14:  [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 block[32], outblock[32];
data/putty-0.74/sshblowf.c:488:14:  [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 dummysalt[1];
data/putty-0.74/sshccp.c:50:14:  [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 current[64];
data/putty-0.74/sshccp.c:125:18:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    static const char constant[16] = "expand 32-byte k";
data/putty-0.74/sshccp.c:759:14:  [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 nonce[16];
data/putty-0.74/sshccp.c:764:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char buffer[16];
data/putty-0.74/sshccp.c:779:14:  [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 key_copy[16];
data/putty-0.74/sshccp.c:780: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(key_copy, key.ptr, 16);
data/putty-0.74/sshccp.c:796: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(ctx->nonce, (const char *)key.ptr + 16, 16);
data/putty-0.74/sshccp.c:836: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(ctx->buffer, buf, len);
data/putty-0.74/sshccp.c:865:14:  [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 mac_iv[8];
data/putty-0.74/sshccp.c:1004:14:  [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 iv[8];
data/putty-0.74/sshcommon.c:262: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(pkt->data + pkt->length, data, len);
data/putty-0.74/sshcommon.c:577:29:  [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).
                    ival = (atoi(sval) != 0);
data/putty-0.74/sshdss.c:98:14:  [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 hash[20];
data/putty-0.74/sshdss.c:223:14:  [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 digest[20];
data/putty-0.74/sshdss.c:396:14:  [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 digest512[64];
data/putty-0.74/sshdss.c:434:14:  [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 digest[20];
data/putty-0.74/sshecc.c:315:14:  [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 hash[MAX_HASH_LEN];
data/putty-0.74/sshecc.c:837:14:  [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 hash[MAX_HASH_LEN];
data/putty-0.74/sshecc.c:930:14:  [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 hash[MAX_HASH_LEN];
data/putty-0.74/sshecc.c:1004:18:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        unsigned char digest[20];
data/putty-0.74/sshecc.c:1065:14:  [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 hash[MAX_HASH_LEN];
data/putty-0.74/sshgssc.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((char *)buf->value, msg_maj.value, msg_maj.length);
data/putty-0.74/sshgssc.c:187: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((char *)buf->value + msg_maj.length + 1, msg_min.value, msg_min.length);
data/putty-0.74/sshhmac.c:180: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(output, ctx->digest, mac->vt->len);
data/putty-0.74/sshmac.c:12:14:  [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 correct[64]; /* at least as big as all known MACs */
data/putty-0.74/sshmd5.c:15:14:  [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 block[64];
data/putty-0.74/sshmd5.c:160: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(s->block + s->blkused, q, len);
data/putty-0.74/sshmd5.c:167:13:  [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(s->block + s->blkused, q, BLKSIZE - s->blkused);
data/putty-0.74/sshmd5.c:181: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(s->block, q, len);
data/putty-0.74/sshmd5.c:186:24:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
void MD5Final(unsigned char output[16], struct MD5Context *s)
data/putty-0.74/sshmd5.c:190:14:  [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 c[64];
data/putty-0.74/sshmd5.c:216:54:  [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.
void MD5Simple(void const *p, unsigned len, unsigned char output[16])
data/putty-0.74/sshpubk.c:104:18:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        unsigned char keybuf[16];
data/putty-0.74/sshpubk.c:157: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[64];
data/putty-0.74/sshpubk.c:200: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[64];
data/putty-0.74/sshpubk.c:229: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[64];
data/putty-0.74/sshpubk.c:291:13:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
        if (atoi(bitsp) != mp_get_nbits(key.modulus)) {
data/putty-0.74/sshpubk.c:373:18:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        unsigned char keybuf[16];
data/putty-0.74/sshpubk.c:545:22:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            unsigned char decoded[3];
data/putty-0.74/sshpubk.c:615: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 header[40], *b, *encryption, *comment, *mac;
data/putty-0.74/sshpubk.c:734:18:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        unsigned char key[40];
data/putty-0.74/sshpubk.c:749: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 realmac[41];
data/putty-0.74/sshpubk.c:750:18:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        unsigned char binary[20];
data/putty-0.74/sshpubk.c:773:22:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            unsigned char mackey[20];
data/putty-0.74/sshpubk.c:798:13:  [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(realmac + 2 * i, "%02x", binary[i]);
data/putty-0.74/sshpubk.c:866: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 base64in[4];
data/putty-0.74/sshpubk.c:867:14:  [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 base64out[3];
data/putty-0.74/sshpubk.c:1066: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 header[40], *b;
data/putty-0.74/sshpubk.c:1167: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 header[40], *b, *comment;
data/putty-0.74/sshpubk.c:1232: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 out[4];
data/putty-0.74/sshpubk.c:1262:14:  [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 priv_mac[20];
data/putty-0.74/sshpubk.c:1286: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(priv_blob_encrypted, priv_blob->u, priv_blob->len);
data/putty-0.74/sshpubk.c:1291: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(priv_blob_encrypted + priv_blob->len, priv_mac,
data/putty-0.74/sshpubk.c:1297:18:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        unsigned char mackey[20];
data/putty-0.74/sshpubk.c:1319:18:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        unsigned char key[40];
data/putty-0.74/sshpubk.c:1403:18:  [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.
    p = buffer + sprintf(buffer, "%.*s ", PTRLEN_PRINTF(alg));
data/putty-0.74/sshpubk.c:1459:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            char buf[5];
data/putty-0.74/sshpubk.c:1489:14:  [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 digest[16];
data/putty-0.74/sshpubk.c:1490: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 fingerprint_str[16*3];
data/putty-0.74/sshpubk.c:1541: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[1024];
data/putty-0.74/sshrsa.c:279:14:  [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 digest[16];
data/putty-0.74/sshrsa.c:686: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(bytes + 2 + padding, asn1_prefix.ptr, asn1_prefix.len);
data/putty-0.74/sshrsa.c:838:18:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        unsigned char hash[MAX_HASH_LEN];
data/putty-0.74/sshrsa.c:918: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(out + outlen - in.len, in.ptr, in.len);
data/putty-0.74/sshrsa.c:955:14:  [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 labelhash[64];
data/putty-0.74/sshsh256.c:155: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(blk->block + blk->used, p, chunk);
data/putty-0.74/sshsh256.c:294: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, sizeof(*copy));
data/putty-0.74/sshsh512.c:16:14:  [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 block[BLKSIZE];
data/putty-0.74/sshsh512.c:228: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(s->block + s->blkused, q, len);
data/putty-0.74/sshsh512.c:235:13:  [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(s->block + s->blkused, q, BLKSIZE - s->blkused);
data/putty-0.74/sshsh512.c:244: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(s->block, q, len);
data/putty-0.74/sshsh512.c:252:14:  [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 c[BLKSIZE];
data/putty-0.74/sshsh512.c:275:14:  [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 biggerDigest[512 / 8];
data/putty-0.74/sshsh512.c:277: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(digest, biggerDigest, 384 / 8);
data/putty-0.74/sshsha.c:140: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(blk->block + blk->used, p, chunk);
data/putty-0.74/sshsha.c:277: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, sizeof(*copy));
data/putty-0.74/sshshare.c:167:14:  [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 recvbuf[0x4010];
data/putty-0.74/sshshare.c:982: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(msg->data, data, len);
data/putty-0.74/sshshare.c:1242:13:  [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(rewritten, pkt, pktlen);
data/putty-0.74/sshverstring.c:29: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 prefix[PREFIX_MAXLEN];
data/putty-0.74/sshzlib.c:109:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char data[WINSIZE];
data/putty-0.74/sshzlib.c:112:14:  [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 pending[HASHCHARS];
data/putty-0.74/sshzlib.c:198:18:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        unsigned char foo[HASHCHARS];
data/putty-0.74/sshzlib.c:363:23:  [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 const unsigned char mirrorbytes[256] = {
data/putty-0.74/sshzlib.c:852:14:  [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 lenlen[19];
data/putty-0.74/sshzlib.c:896:14:  [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 lengths[288 + 32];
data/putty-0.74/sshzlib.c:900:14:  [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 window[WINSIZE];
data/putty-0.74/sshzlib.c:910:14:  [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 lengths[288];
data/putty-0.74/stripctrl.c:29: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[SCC_BUFSIZE];
data/putty-0.74/stripctrl.c:178: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 outbuf[MB_LEN_MAX];
data/putty-0.74/stripctrl.c:220: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 outbuf[6];
data/putty-0.74/stripctrl.c:320: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(scc->buf + scc->buflen, p, to_copy);
data/putty-0.74/stripctrl.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(scc->buf, p, len);
data/putty-0.74/telnet.c:229:14:  [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 b[3];
data/putty-0.74/telnet.c:818:27:  [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 const unsigned char iac[2] = { IAC, IAC };
data/putty-0.74/telnet.c:819:27:  [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 const unsigned char cr[2] = { CR, NUL };
data/putty-0.74/telnet.c:821:27:  [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 const unsigned char nl[2] = { CR, LF };
data/putty-0.74/telnet.c:861:14:  [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 b[24];
data/putty-0.74/telnet.c:894:14:  [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 b[2];
data/putty-0.74/terminal.c:1676: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(term->id_string, "\033[?6c");
data/putty-0.74/terminal.c:3044:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            char utf8_chr[6];
data/putty-0.74/terminal.c:3279:14:  [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 localbuf[256], *chars;
data/putty-0.74/terminal.c:3291: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(localbuf, data.ptr, data.len);
data/putty-0.74/terminal.c:3985:33:  [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/putty-0.74/terminal.c:3986:33:  [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(buf, "\033[%d;%dR", term->curs.y + 1,
data/putty-0.74/terminal.c:4328:33:  [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[80];
data/putty-0.74/terminal.c:4388:43:  [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.
                                    len = sprintf(buf, "\033[3;%u;%ut",
data/putty-0.74/terminal.c:4397:43:  [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.
                                    len = sprintf(buf, "\033[4;%d;%dt", y, x);
data/putty-0.74/terminal.c:4403:43:  [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.
                                    len = sprintf(buf, "\033[8;%d;%dt",
data/putty-0.74/terminal.c:4534:29:  [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/putty-0.74/terminal.c:4537:33:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
                                strcpy(buf, "\033[2;1;1;112;112;1;0x");
data/putty-0.74/terminal.c:4694:29:  [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 lbuf[64];
data/putty-0.74/terminal.c:4695:29:  [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(term->id_string, "\033[?");
data/putty-0.74/terminal.c:4699:33:  [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(lbuf, "%u", term->esc_args[i]);
data/putty-0.74/terminal.c:5207: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(term->pre_bidi_cache[line].chars, lbefore, size * TSIZE);
data/putty-0.74/terminal.c:5208: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(term->post_bidi_cache[line].chars, lafter, size * TSIZE);
data/putty-0.74/terminal.c:5318: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(term->wcTo, term->wcFrom, nbc * sizeof(*term->wcTo));
data/putty-0.74/terminal.c:5327:13:  [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(term->ltemp, ldata->chars, ldata->size * TSIZE);
data/putty-0.74/terminal.c:5374:9:  [2] (buffer) wchar_t:
  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.
        wchar_t tch[2];
data/putty-0.74/terminal.c:5986:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            char cbuf[16], *p;
data/putty-0.74/terminal.c:5987:13:  [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(cbuf, "<U+%04x>", (ldata[top.x] & 0xFFFF));
data/putty-0.74/terminal.c:5989:13:  [2] (buffer) wchar_t:
  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.
            wchar_t cbuf[16], *p;
data/putty-0.74/terminal.c:6040:25:  [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[4];
data/putty-0.74/terminal.c:6054:29:  [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(cbuf, wbuf, rv * sizeof(wchar_t));
data/putty-0.74/terminal.c:6600: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 abuf[32];
data/putty-0.74/terminal.c:6665:23:  [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.
                len = sprintf(abuf, "\033[<%d;%d;%d%c", encstate, c, r, a == MA_RELEASE ? 'm' : 'M');
data/putty-0.74/terminal.c:6667:23:  [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.
                len = sprintf(abuf, "\033[%d;%d;%dM", encstate + 32, c, r);
data/putty-0.74/terminal.c:6669:23:  [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.
                len = sprintf(abuf, "\033[M%c%c%c", encstate + 32, c + 32, r + 32);
data/putty-0.74/terminal.c:6821:14:  [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.
        p += sprintf(p, "\x1B%c", xkey);
data/putty-0.74/terminal.c:6844:18:  [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.
            p += sprintf(p, "\x1BO%c", xkey);
data/putty-0.74/terminal.c:6846:18:  [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.
            p += sprintf(p, "\x1B[%c", xkey);
data/putty-0.74/terminal.c:6876:14:  [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.
        p += sprintf(p, "\x1B[%c", sco_codes[index]);
data/putty-0.74/terminal.c:6885:18:  [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.
            p += sprintf(p, "\x1B%c", code + 'P' - 11 - offt);
data/putty-0.74/terminal.c:6887:18:  [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.
            p += sprintf(p, "\x1BO%c", code + 'P' - 11 - offt);
data/putty-0.74/terminal.c:6889:14:  [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.
        p += sprintf(p, "\x1B[[%c", code + 'A' - 11);
data/putty-0.74/terminal.c:6892:18:  [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.
            p += sprintf(p, "\x1B%c", code + 'P' - 11);
data/putty-0.74/terminal.c:6894:18:  [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.
            p += sprintf(p, "\x1BO%c", code + 'P' - 11);
data/putty-0.74/terminal.c:6896:14:  [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.
        p += sprintf(p, "\x1B[%d~", code);
data/putty-0.74/terminal.c:6922:14:  [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.
        p += sprintf(p, "\x1B%c", " HLMEIG"[code]);
data/putty-0.74/terminal.c:6928:18:  [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.
            p += sprintf(p, "\x1B[%c", codes[code-1]);
data/putty-0.74/terminal.c:6933:14:  [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.
        p += sprintf(p, "\x1B[%d~", code);
data/putty-0.74/terminal.c:7012:26:  [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.
                    p += sprintf(p, "\x1B%c", xkey);
data/putty-0.74/terminal.c:7014:26:  [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.
                    p += sprintf(p, "\x1B?%c", xkey);
data/putty-0.74/terminal.c:7016:22:  [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.
                p += sprintf(p, "\x1BO%c", xkey);
data/putty-0.74/terminal.h:185: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 osc_string[OSC_STR_MAX + 1];
data/putty-0.74/terminal.h:188: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 id_string[1024];
data/putty-0.74/test/sclog/sclog.c:288: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 location[2048], symbol[512], fileline[1024];
data/putty-0.74/test/sclog/sclog.c:300: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 file[MAXIMUM_PATH];
data/putty-0.74/test/sclog/sclog.c:325: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(loc, location, len);
data/putty-0.74/testcrypt.c:147: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(snew_plus_get_aux(val), name, namelen+1);
data/putty-0.74/testcrypt.c:560:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            char hex[3];
data/putty-0.74/testcrypt.c:1088: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).
        infp = fopen(infile, "r");
data/putty-0.74/testcrypt.c:1097:17:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        outfp = fopen(outfile, "w");
data/putty-0.74/testsc.c:342: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 dec[64];
data/putty-0.74/testsc.c:360: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 hex[64];
data/putty-0.74/testsc.c:1511:25:  [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 *firstfp = fopen(firstfile, "rb");
data/putty-0.74/testsc.c:1518:28:  [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 *nextfp = fopen(nextfile, "rb");
data/putty-0.74/testsc.c:1525:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            char buf1[4096], bufn[4096];
data/putty-0.74/testzlib.c:29:14:  [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 buf[16], *outbuf;
data/putty-0.74/testzlib.c:77:14:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        fp = fopen(filename, "rb");
data/putty-0.74/tree234.c:1523: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 *expected[NSTR], *p;
data/putty-0.74/tree234.c:1524: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 directionbuf[NSTR * 10];
data/putty-0.74/tree234.c:1603:23:  [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 *)array[j], j);
data/putty-0.74/unix/gtkask.c:139: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(newbuf, ctx->passphrase, oldsize);
data/putty-0.74/unix/gtkask.c:548: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 *real_argv[3];
data/putty-0.74/unix/gtkdlg.c:580:13:  [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(tmpstr, text, collen);
data/putty-0.74/unix/gtkdlg.c:4005: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 timebuf[40];
data/putty-0.74/unix/gtkfont.c:263: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 *p, *components[14];
data/putty-0.74/unix/gtkfont.c:292:31:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
#define STORE_INT(f) dec->f = atoi(components[i++]);
data/putty-0.74/unix/gtkfont.c:600: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 sbstring[2];
data/putty-0.74/unix/gtkfont.c:1047:22:  [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.
                p += sprintf(p, " italic");
data/putty-0.74/unix/gtkfont.c:1049:22:  [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.
                p += sprintf(p, " oblique");
data/putty-0.74/unix/gtkfont.c:1051:22:  [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.
                p += sprintf(p, " reverse italic");
data/putty-0.74/unix/gtkfont.c:1053:22:  [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.
                p += sprintf(p, " reverse oblique");
data/putty-0.74/unix/gtkfont.c:1055:22:  [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.
                p += sprintf(p, " other-slant");
data/putty-0.74/unix/gtkfont.c:1060:22:  [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.
                p += sprintf(p, " [M]");
data/putty-0.74/unix/gtkfont.c:1062:22:  [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.
                p += sprintf(p, " [C]");
data/putty-0.74/unix/gtkfont.c:1772: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(tmpstring+1, string, len * sizeof(wchar_t));
data/putty-0.74/unix/gtkfont.c:2612: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 sizetext[40];
data/putty-0.74/unix/gtkfont.c:2630:13:  [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(sizetext, "%d", info->size);
data/putty-0.74/unix/gtkfont.c:2643:17:  [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(sizetext, "%d", unifontsel_default_sizes[j]);
data/putty-0.74/unix/gtkfont.c:2934:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            char sizetext[40];
data/putty-0.74/unix/gtkfont.c:2935:13:  [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(sizetext, "%d", size);
data/putty-0.74/unix/gtkfont.c:3198: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).
    size = atoi(text);
data/putty-0.74/unix/gtkmain.c:158: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 option[80];
data/putty-0.74/unix/gtkmain.c:173: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(option, "---[%d,%zu]", pipefd[0], serialised->len);
data/putty-0.74/unix/gtkmain.c:409:48:  [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).
            conf_set_int(conf, CONF_savelines, atoi(val));
data/putty-0.74/unix/gtkwin.c:1028: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 output[256];
data/putty-0.74/unix/gtkwin.c:1029:5:  [2] (buffer) wchar_t:
  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.
    wchar_t ucsoutput[2];
data/putty-0.74/unix/gtkwin.c:1546:13:  [2] (buffer) wchar_t:
  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.
            wchar_t widedata[32];
data/putty-0.74/unix/gtkwin.c:1784:23:  [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.
            end = 1 + sprintf(output+1, "\033[Z");
data/putty-0.74/unix/gtkwin.c:2933: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 *list[1];
data/putty-0.74/unix/gtkwin.c:2960:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(state->pasteout_data_ctext, tp.value, tp.nitems);
data/putty-0.74/unix/gtkwin.c:4090:13:  [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(ro + cpp * xo, ri + cpp * xi, cpp);
data/putty-0.74/unix/osxlaunch.c:78: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(out, toret, sizeof(toret));
data/putty-0.74/unix/osxlaunch.c:201: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(ret, qhead->first_node->string, qhead->prefixlen);
data/putty-0.74/unix/procnet.c:73:10:  [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(path, "r");
data/putty-0.74/unix/ux_x11.c:134:18:  [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).
        authfd = mkstemp(authfilename);
data/putty-0.74/unix/uxagentc.c:30: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 sizebuf[4];
data/putty-0.74/unix/uxagentc.c:84: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(conn->retbuf, conn->sizebuf, 4);
data/putty-0.74/unix/uxcons.c:210:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char line[32];
data/putty-0.74/unix/uxcons.c:277:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char line[32];
data/putty-0.74/unix/uxcons.c:331:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char line[32];
data/putty-0.74/unix/uxcons.c:386:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char line[32];
data/putty-0.74/unix/uxcons.c:508:15:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if ((fd = open("/dev/tty", O_RDWR)) >= 0) {
data/putty-0.74/unix/uxfdsock.c:253: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[20480];
data/putty-0.74/unix/uxfdsock.c:289: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[20480];
data/putty-0.74/unix/uxgen.c:40: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(device, O_RDONLY);
data/putty-0.74/unix/uxgss.c:12: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.
const char *const gsslibnames[4] = {
data/putty-0.74/unix/uxgss.c:120: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.
const char *const gsslibnames[1] = {
data/putty-0.74/unix/uxmisc.c:99:20:  [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).
        debug_fp = fopen("debug.log", "w");
data/putty-0.74/unix/uxmisc.c:243: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).
        return fopen(filename->path, mode);
data/putty-0.74/unix/uxmisc.c:248: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(filename->path, O_WRONLY | O_CREAT | O_TRUNC, 0600);
data/putty-0.74/unix/uxnet.c:71: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 oobdata[1];
data/putty-0.74/unix/uxnet.c:105: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 hostname[512];                /* Store an unresolved host name. */
data/putty-0.74/unix/uxnet.c:451: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(buf, &((struct sockaddr_in *)step.ai->ai_addr)->sin_addr,
data/putty-0.74/unix/uxnet.c:454: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(buf, &((struct sockaddr_in6 *)step.ai->ai_addr)->sin6_addr,
data/putty-0.74/unix/uxnet.c:463: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(buf, (char*) &a.s_addr, 4);
data/putty-0.74/unix/uxnet.c:804: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 portstr[6];
data/putty-0.74/unix/uxnet.c:897:9:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
        sprintf(portstr, "%d", port);
data/putty-0.74/unix/uxnet.c:1054:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(buf, u.sin6.sin6_addr.s6_addr + 12, 4);
data/putty-0.74/unix/uxnet.c:1221: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(s->oobdata, buf, len);
data/putty-0.74/unix/uxnet.c:1266: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[20480];                   /* nice big buffer for plenty of speed */
data/putty-0.74/unix/uxnet.c:1491: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[INET6_ADDRSTRLEN];
data/putty-0.74/unix/uxnet.c:1506: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(pi->addr_bin.ipv4, &addr.sin.sin_addr, 4);
data/putty-0.74/unix/uxnet.c:1514: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(pi->addr_bin.ipv6, &addr.sin6.sin6_addr, 16);
data/putty-0.74/unix/uxnet.c:1532:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            char uidbuf[64], gidbuf[64];
data/putty-0.74/unix/uxnet.c:1533:13:  [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(uidbuf, "%d", uid);
data/putty-0.74/unix/uxnet.c:1534:13:  [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(gidbuf, "%d", gid);
data/putty-0.74/unix/uxnoise.c:24: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("/dev/urandom", O_RDONLY);
data/putty-0.74/unix/uxnoise.c:52: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[512];
data/putty-0.74/unix/uxnoise.c:95: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[512];
data/putty-0.74/unix/uxnoise.c:98:15:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if ((fd = open("/proc/meminfo", O_RDONLY)) >= 0) {
data/putty-0.74/unix/uxnoise.c:103:15:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if ((fd = open("/proc/stat", O_RDONLY)) >= 0) {
data/putty-0.74/unix/uxpgnt.c:303: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).
    int fd = open("/dev/tty", O_RDONLY);
data/putty-0.74/unix/uxpgnt.c:964:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            char c[1];
data/putty-0.74/unix/uxplink.c:981:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            char c[1];
data/putty-0.74/unix/uxplink.c:991:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            char buf[4096];
data/putty-0.74/unix/uxproxy.c:83: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).
        outfd = open("/dev/null", O_WRONLY);
data/putty-0.74/unix/uxproxy.c:89: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(cmd, O_RDONLY);
data/putty-0.74/unix/uxpty.c:88: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 name[FILENAME_MAX];
data/putty-0.74/unix/uxpty.c:245:20:  [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 ((lastlog = fopen(LASTLOG_FILE, "r+")) != NULL) {
data/putty-0.74/unix/uxpty.c:310:25:  [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).
        pty->slave_fd = open(pty->name, O_RDWR);
data/putty-0.74/unix/uxpty.c:323: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 master_name[20];
data/putty-0.74/unix/uxpty.c:328:13:  [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(master_name, "/dev/pty%c%c", *p1, *p2);
data/putty-0.74/unix/uxpty.c:329:30:  [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).
            pty->master_fd = open(master_name, O_RDWR);
data/putty-0.74/unix/uxpty.c:393:22:  [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).
    pty->master_fd = open("/dev/ptmx", flags);
data/putty-0.74/unix/uxpty.c:483:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            char display[128], buffer[128];
data/putty-0.74/unix/uxpty.c:502: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.
                        memcpy(display+dlen, buffer,
data/putty-0.74/unix/uxpty.c:602: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[4096];
data/putty-0.74/unix/uxpty.c:763: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 c[1];
data/putty-0.74/unix/uxpty.c:1099:25:  [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 ptyfd = open(pty->name, O_WRONLY, 0);
data/putty-0.74/unix/uxser.c:307:18:  [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).
    serial->fd = open(line, O_RDWR | O_NOCTTY | O_NDELAY | O_NONBLOCK);
data/putty-0.74/unix/uxser.c:366: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[4096];
data/putty-0.74/unix/uxserver.c:570:27:  [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).
            listen_port = atoi(val);
data/putty-0.74/unix/uxserver.c:681: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(blob, sb->u, sb->len);
data/putty-0.74/unix/uxserver.c:714:24:  [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(val, "r");
data/putty-0.74/unix/uxsftp.c:131: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(name, O_RDONLY);
data/putty-0.74/unix/uxsftp.c:182: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(name, O_CREAT | O_TRUNC | O_WRONLY,
data/putty-0.74/unix/uxsftp.c:200: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(name, O_APPEND | O_WRONLY);
data/putty-0.74/unix/uxsftpserver.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 handlekey[8];
data/putty-0.74/unix/uxsftpserver.c:94:14:  [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 handlebuf[8];
data/putty-0.74/unix/uxsftpserver.c:104:14:  [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 handlebuf[8];
data/putty-0.74/unix/uxsftpserver.c:108: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(handlebuf, handle.ptr, 8);
data/putty-0.74/unix/uxsftpserver.c:244: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).
    int fd = open(pathstr, openflags, GET_PERMISSIONS(attrs, 0777));
data/putty-0.74/unix/uxsftpserver.c:607:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            char perms[11], *uidbuf = NULL, *gidbuf = NULL;
data/putty-0.74/unix/uxsftpserver.c:617:17:  [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(perms, "----------");
data/putty-0.74/unix/uxshare.c:76:18:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        unsigned char saltbuf[SALT_SIZE];
data/putty-0.74/unix/uxshare.c:81:18:  [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).
        saltfd = open(saltname, O_RDONLY);
data/putty-0.74/unix/uxshare.c:106:26:  [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).
                saltfd = open(tmpname, O_WRONLY | O_EXCL | O_CREAT, 0400);
data/putty-0.74/unix/uxshare.c:182:22:  [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).
            saltfd = open(saltname, O_RDONLY);
data/putty-0.74/unix/uxshare.c:215:22:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            unsigned char digest[32];
data/putty-0.74/unix/uxshare.c:216:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            char retbuf[65];
data/putty-0.74/unix/uxshare.c:227:17:  [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(retbuf + 2*i, "%02x", digest[i]);
data/putty-0.74/unix/uxshare.c:277: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).
    lockfd = open(lockname, O_CREAT | O_RDWR | O_TRUNC, 0600);
data/putty-0.74/unix/uxstore.c:34:14:  [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 const char hex[16] = "0123456789ABCDEF";
data/putty-0.74/unix/uxstore.c:245:10:  [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/putty-0.74/unix/uxstore.c:321: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(key, p, q-p);
data/putty-0.74/unix/uxstore.c:368:10:  [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/putty-0.74/unix/uxstore.c:435: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).
        return atoi(val);
data/putty-0.74/unix/uxstore.c:607:10:  [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/putty-0.74/unix/uxstore.c:616: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 porttext[20];
data/putty-0.74/unix/uxstore.c:629:9:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
        sprintf(porttext, "%d", port);
data/putty-0.74/unix/uxstore.c:689:11:  [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).
    wfp = fopen(tmpfilename, "w");
data/putty-0.74/unix/uxstore.c:703: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).
        wfp = fopen(tmpfilename, "w");
data/putty-0.74/unix/uxstore.c:712:11:  [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).
    rfp = fopen(filename, "r");
data/putty-0.74/unix/uxstore.c:754: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(fname, O_RDONLY);
data/putty-0.74/unix/uxstore.c:757: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 buf[512];
data/putty-0.74/unix/uxstore.c:776: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(fname, O_CREAT | O_WRONLY, 0600);
data/putty-0.74/unix/uxstore.c:796: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(fname, O_CREAT | O_WRONLY, 0600);
data/putty-0.74/unix/uxucs.c:64: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 output[MB_LEN_MAX];
data/putty-0.74/unix/uxucs.c:74:13:  [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(mbstr+n, output, i);
data/putty-0.74/unix/uxucs.c:156: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 c[1];
data/putty-0.74/unix/uxucs.c:158:9:  [2] (buffer) wchar_t:
  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.
        wchar_t wc[1];
data/putty-0.74/unix/uxucs.c:184:22:  [2] (buffer) wchar_t:
  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 const wchar_t unitab_xterm_std[32] = {
data/putty-0.74/unix/uxucs.c:190:22:  [2] (buffer) wchar_t:
  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 const wchar_t unitab_xterm_poorman[32] =
data/putty-0.74/unix/uxucs.c:211: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 c[1];
data/putty-0.74/unix/uxucs.c:213:9:  [2] (buffer) wchar_t:
  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.
        wchar_t wc[1];
data/putty-0.74/utils.c:141: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 set[2];
data/putty-0.74/utils.c:148: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 set[2];
data/putty-0.74/utils.c:318: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(&a, &b, sizeof(va_list)))
data/putty-0.74/utils.c:459: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(strbuf_append(buf_o, len), data, len);
data/putty-0.74/utils.c:546: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[4096];
data/putty-0.74/utils.c:719:13:  [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(ch->tail->bufend, buf, copylen);
data/putty-0.74/utils.c:787: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(data_c, tmp->bufpos, remlen);
data/putty-0.74/utils.c:843: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 foo[17];
data/putty-0.74/utils.c:855:9:  [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(foo, "................");        /* sixteen dots */
data/putty-0.74/utils.c:1015: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, pl.ptr, pl.len);
data/putty-0.74/windows/sizetip.c:98:5:  [2] (buffer) TCHAR:
  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.
    TCHAR str[32];
data/putty-0.74/windows/sizetip.c:145: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(str, "%dx%d", cx, cy);
data/putty-0.74/windows/wincons.c:146:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char line[32];
data/putty-0.74/windows/wincons.c:209:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char line[32];
data/putty-0.74/windows/wincons.c:257:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char line[32];
data/putty-0.74/windows/wincons.c:334:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char line[32];
data/putty-0.74/windows/winctrls.c:1340: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 shortcuts[MAX_SHORTCUTS_PER_CTRL];
data/putty-0.74/windows/winctrls.c:1676:13:  [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(c->shortcuts, shortcuts, sizeof(shortcuts));
data/putty-0.74/windows/winctrls.c:1918:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            char filename[FILENAME_MAX];
data/putty-0.74/windows/windlg.c:48: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 *events_initial[LOGEVENT_INITIAL_MAX];
data/putty-0.74/windows/windlg.c:49: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 *events_circular[LOGEVENT_CIRCULAR_MAX];
data/putty-0.74/windows/windlg.c:152:29:  [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, q, qlen);
data/putty-0.74/windows/windlg.c:154:29:  [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, sel_nl, sizeof(sel_nl));
data/putty-0.74/windows/windlg.c:588:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            char buffer[64];
data/putty-0.74/windows/windlg.c:765: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 timebuf[40];
data/putty-0.74/windows/window.c:2034: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 lbuf[20];
data/putty-0.74/windows/window.c:2039: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).
    kbd_codepage = atoi(lbuf);
data/putty-0.74/windows/window.c:2249: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 b[2048];
data/putty-0.74/windows/window.c:2286:29:  [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, serbuf->s, size);
data/putty-0.74/windows/window.c:3225:22:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            unsigned char buf[20];
data/putty-0.74/windows/window.c:3322:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            char buf[2];
data/putty-0.74/windows/window.c:3348:17:  [2] (buffer) wchar_t:
  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.
                wchar_t pair[2];
data/putty-0.74/windows/window.c:3770:21:  [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 dbcstext[2];
data/putty-0.74/windows/window.c:3774:21:  [2] (buffer) MultiByteToWideChar:
  Requires maximum length in CHARACTERS, not bytes (CWE-120).
                    MultiByteToWideChar(ucsdata.font_codepage, MB_USEGLYPHCHARS,
data/putty-0.74/windows/window.c:3780:21:  [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 dbcstext[1];
data/putty-0.74/windows/window.c:3782:21:  [2] (buffer) MultiByteToWideChar:
  Requires maximum length in CHARACTERS, not bytes (CWE-120).
                    MultiByteToWideChar(ucsdata.font_codepage, MB_USEGLYPHCHARS,
data/putty-0.74/windows/window.c:4118:12:  [2] (buffer) wchar_t:
  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 wchar_t keys_unicode[3];
data/putty-0.74/windows/window.c:4647:17:  [2] (buffer) MultiByteToWideChar:
  Requires maximum length in CHARACTERS, not bytes (CWE-120).
                MultiByteToWideChar(CP_ACP, 0, (LPCSTR)keysb, r,
data/putty-0.74/windows/window.c:4897: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(lock, data, len);
data/putty-0.74/windows/window.c:4898:16:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    ((unsigned char *) lock)[len] = 0;
data/putty-0.74/windows/window.c:4966: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(lock, data, len * sizeof(wchar_t));
data/putty-0.74/windows/window.c:4970:9:  [2] (buffer) wchar_t:
  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.
        wchar_t unitab[256];
data/putty-0.74/windows/window.c:4976: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 before[16], after[4];
data/putty-0.74/windows/window.c:5254:28:  [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.
                    blen = sprintf(before, "{\\uc%d\\u%d", (int)multilen,
data/putty-0.74/windows/window.c:5258:28:  [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.
                    blen = sprintf(before, "\\u%d", (int)udata[uindex]);
data/putty-0.74/windows/window.c:5302:13:  [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(lock3, rtf->u, rtf->len);
data/putty-0.74/windows/window.c:5371:13:  [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(clipboard_contents, p, clipboard_length * sizeof(wchar_t));
data/putty-0.74/windows/window.c:5380:17:  [2] (buffer) MultiByteToWideChar:
  Requires maximum length in CHARACTERS, not bytes (CWE-120).
            i = MultiByteToWideChar(CP_ACP, 0, s, strlen(s) + 1, 0, 0);
data/putty-0.74/windows/window.c:5382:13:  [2] (buffer) MultiByteToWideChar:
  Requires maximum length in CHARACTERS, not bytes (CWE-120).
            MultiByteToWideChar(CP_ACP, 0, s, strlen(s) + 1,
data/putty-0.74/windows/wingss.c:40: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.
const char *const gsslibnames[3] = {
data/putty-0.74/windows/wingss.c:134:17:  [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, "\\bin");
data/putty-0.74/windows/wingss.c:143:17:  [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, "\\gssapi"MIT_KERB_SUFFIX".dll");
data/putty-0.74/windows/winhandl.c:99: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[4096];                 /* the data read from the handle */
data/putty-0.74/windows/winhelp.c:96: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 tempdir[MAX_PATH + 2];
data/putty-0.74/windows/winjump.c:363: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 putty_path[2048];
data/putty-0.74/windows/winjump.c:400: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(app_path, "r")) == NULL) {
data/putty-0.74/windows/winjump.c:549:21:  [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 desc1[2048], desc2[2048];
data/putty-0.74/windows/winmisc.c:279: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 msgtext[65536]; /* maximum size for FormatMessage is 64K */
data/putty-0.74/windows/winmisc.c:287:13:  [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(msgtext,
data/putty-0.74/windows/winmisc.c:372:18:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    static const char hex[16] = "0123456789ABCDEF";
data/putty-0.74/windows/winmisc.c:423:20:  [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).
        debug_fp = fopen("debug.log", "w");
data/putty-0.74/windows/winmiscs.c:233: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(q, p, (oldsize < size ? oldsize : size));
data/putty-0.74/windows/winnet.c:62: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 oobdata[1];
data/putty-0.74/windows/winnet.c:92: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 hostname[512];                /* Store an unresolved host name. */
data/putty-0.74/windows/winnet.c:445: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 realhost[8192];
data/putty-0.74/windows/winnet.c:781:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(buf, &((struct sockaddr_in *)step.ai->ai_addr)->sin_addr,
data/putty-0.74/windows/winnet.c:784:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(buf, &((struct sockaddr_in6 *)step.ai->ai_addr)->sin6_addr,
data/putty-0.74/windows/winnet.c:794: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(buf, (char*) &a.s_addr, 4);
data/putty-0.74/windows/winnet.c:1476: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(s->oobdata, buf, len);
data/putty-0.74/windows/winnet.c:1510: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[20480];                   /* nice big buffer for plenty of speed */
data/putty-0.74/windows/winnet.c:1706: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[INET6_ADDRSTRLEN];
data/putty-0.74/windows/winnet.c:1722: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(pi->addr_bin.ipv4, &((struct sockaddr_in *)&addr)->sin_addr, 4);
data/putty-0.74/windows/winnet.c:1731: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(pi->addr_bin.ipv6,
data/putty-0.74/windows/winnet.c:1814: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 hostbuf[256]; /* MSDN docs for gethostname() promise this is enough */
data/putty-0.74/windows/winnoise.c:54: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 winpath[MAX_PATH + 3];
data/putty-0.74/windows/winnoise.c:58:5:  [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(winpath, "\\*");
data/putty-0.74/windows/winpgen.c:799:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            char msg[512];
data/putty-0.74/windows/winpgen.c:1236: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 filename[FILENAME_MAX];
data/putty-0.74/windows/winpgen.c:1256:21:  [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 msg[256];
data/putty-0.74/windows/winpgen.c:1257:21:  [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(msg, "Cannot export an SSH-%d key in an SSH-%d"
data/putty-0.74/windows/winpgen.c:1291:32:  [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(filename, "r");
data/putty-0.74/windows/winpgen.c:1341: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 filename[FILENAME_MAX];
data/putty-0.74/windows/winpgen.c:1345:32:  [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(filename, "r");
data/putty-0.74/windows/winpgen.c:1357:26:  [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/putty-0.74/windows/winpgen.c:1388: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 filename[FILENAME_MAX];
data/putty-0.74/windows/winpgnt.c:643: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(tnid.szTip, "Pageant (PuTTY authentication agent)");
data/putty-0.74/windows/winpgnt.c:657:5:  [2] (buffer) TCHAR:
  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.
    TCHAR buf[MAX_PATH + 1];
data/putty-0.74/windows/winpgnt.c:768: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(rep->buf + rep->len, data, len);
data/putty-0.74/windows/winpgnt.c:898:40:  [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.
          msglen, (unsigned)((unsigned char *) mapaddr)[4]);
data/putty-0.74/windows/winpgnt.c:991:17:  [2] (buffer) TCHAR:
  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.
                TCHAR cmdline[10];
data/putty-0.74/windows/winpgnt.c:994:21:  [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(cmdline, "&R");
data/putty-0.74/windows/winpgnt.c:1054:21:  [2] (buffer) TCHAR:
  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.
                    TCHAR buf[MAX_PATH + 1];
data/putty-0.74/windows/winpgnt.c:1055:21:  [2] (buffer) TCHAR:
  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.
                    TCHAR param[MAX_PATH + 1];
data/putty-0.74/windows/winpgnt.c:1064:25:  [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(param, "&R");
data/putty-0.74/windows/winpgnt.c:1188: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 b[2048], *p, *q, *r;
data/putty-0.74/windows/winpgnt.c:1196:9:  [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(r, "putty.exe");
data/putty-0.74/windows/winpgnt.c:1197:20:  [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(b, "r")) != NULL) {
data/putty-0.74/windows/winpgntc.c:100: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, query->s, query->len);
data/putty-0.74/windows/winpgntc.c:116:13:  [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(ret, p, retlen);
data/putty-0.74/windows/winplink.c:216: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 buf[4096];
data/putty-0.74/windows/winplink.c:241: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 buf[4096];
data/putty-0.74/windows/winshare.c:50:14:  [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 digest[32];
data/putty-0.74/windows/winshare.c:51: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 retbuf[65];
data/putty-0.74/windows/winshare.c:101:9:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
        sprintf(retbuf + 2*i, "%02x", digest[i]);
data/putty-0.74/windows/winstore.c:520: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 regpath[MAX_PATH + 1];
data/putty-0.74/windows/winstore.c:551: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 profile[MAX_PATH + 1];
data/putty-0.74/windows/winstore.c:570: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 drv[MAX_PATH], path[MAX_PATH];
data/putty-0.74/windows/winstore.c:591: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 windir[MAX_PATH];
data/putty-0.74/windows/winstore.c:611:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            char buf[1024];
data/putty-0.74/windows/winstore.c:804: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 name[MAX_PATH + 1];
data/putty-0.74/windows/winstore.c:821: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 name[MAX_PATH + 1];
data/putty-0.74/windows/winstuff.h:47: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).
    return fopen(filename->path, mode);
data/putty-0.74/windows/winstuff.h:508: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 shortcuts[MAX_SHORTCUTS_PER_CTRL];
data/putty-0.74/windows/winucs.c:477: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(ucsdata->unitab_font + 1, unitab_xterm_std,
data/putty-0.74/windows/winucs.c:521: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(ucsdata->unitab_xterm + '`', unitab_xterm_std,
data/putty-0.74/windows/winucs.c:1050: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).
        codepage = atoi(d);            /* CP999 or IBM999 */
data/putty-0.74/windows/winucs.c:1076: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 buf[32];
data/putty-0.74/windows/winucs.c:1079:9:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
        sprintf(buf, "Use font encoding");
data/putty-0.74/windows/winucs.c:1084:9:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
        sprintf(buf, "CP%03d", codepage);
data/putty-0.74/windows/winucs.c:1122: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[4];
data/putty-0.74/windows/winucs.c:1207:12:  [2] (buffer) MultiByteToWideChar:
  Requires maximum length in CHARACTERS, not bytes (CWE-120).
    return MultiByteToWideChar(codepage, flags, mbstr, mblen, wcstr, wclen);
data/putty-0.74/windows/winutils.c:28:5:  [2] (buffer) TCHAR:
  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.
    TCHAR cwd[MAX_PATH];
data/putty-0.74/windows/winutils.c:39:5:  [2] (buffer) TCHAR:
  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.
    TCHAR cwd[MAX_PATH]; /* process CWD */
data/putty-0.74/windows/winutils.c:397: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[10];
data/putty-0.74/x11fwd.c:34:14:  [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 clientid[6];
data/putty-0.74/x11fwd.c:38:14:  [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 firstpkt[12];        /* first X data packet */
data/putty-0.74/x11fwd.c:124:13:  [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(auth->xa1_firstblock, auth->data, 8);
data/putty-0.74/x11fwd.c:135:9:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
        sprintf(auth->datastring + i*2, "%02x",
data/putty-0.74/x11fwd.c:244: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).
        disp->displaynum = atoi(colon);
data/putty-0.74/x11fwd.c:246:31:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
            disp->screennum = atoi(dot);
data/putty-0.74/x11fwd.c:431: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(seen->clientid, data+8, 6);
data/putty-0.74/x11fwd.c:516:14:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    authfp = fopen(authfilename, "rb");
data/putty-0.74/x11fwd.c:543:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(buf, buf + src->pos, size);
data/putty-0.74/x11fwd.c:551:45:  [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).
        displaynum = displaynum_string[0] ? atoi(displaynum_string) : -1;
data/putty-0.74/x11fwd.c:606: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 buf[4];
data/putty-0.74/x11fwd.c:619: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 buf[16];
data/putty-0.74/x11fwd.c:643:13:  [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(disp->localauthdata, data.ptr, data.len);
data/putty-0.74/x11fwd.c:664: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 ipv4buf[4];
data/putty-0.74/x11fwd.c:669: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 ipv6buf[16];
data/putty-0.74/x11fwd.c:761: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).
    return atoi(display + n + 1);
data/putty-0.74/x11fwd.c:891: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(reply + 2, xconn->firstpkt + 2, 4);  /* major/minor proto vsn */
data/putty-0.74/x11fwd.c:894: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(reply + 8, full_message, msglen);
data/putty-0.74/x11fwd.c:978: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 new_peer_addr[32];
data/putty-0.74/x11fwd.c:1045:13:  [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(new_peer_addr, "%d.%d.%d.%d", socketdata[0],
data/putty-0.74/x11fwd.c:1049:13:  [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(new_peer_addr, "0.0.0.0");
data/putty-0.74/x11fwd.c:1127: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 bytestr[3];
data/putty-0.74/x11fwd.c:1150:14:  [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 realauthdata[64];
data/putty-0.74/x11fwd.c:1173: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(realauthdata, auth_data, 8);
data/putty-0.74/x11fwd.c:1195: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(greeting+12, authname, authnamelen);
data/putty-0.74/x11fwd.c:1196: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(greeting+12+authnamelen_pad, authdata, authdatalen);
data/putty-0.74/be_misc.c:39: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).
            len = strlen(msg);
data/putty-0.74/charset/internal.h:26:12:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    void (*read)(charset_spec const *charset, long int input_chr,
data/putty-0.74/charset/toucs.c:72:15:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        spec->read(spec, (unsigned char)**input, &localstate,
data/putty-0.74/cmdgen.c:1080: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).
        smemclr(old_passphrase, strlen(old_passphrase));
data/putty-0.74/cmdgen.c:1084: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).
        smemclr(new_passphrase, strlen(new_passphrase));
data/putty-0.74/cmdline.c:62: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).
        smemclr(cmdline_password, strlen(cmdline_password));
data/putty-0.74/cmdline.c:105: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).
    smemclr(cmdline_password, strlen(cmdline_password));
data/putty-0.74/cmdline.c:317:23:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                len = strlen(hostname);
data/putty-0.74/cmdline.c:609:28:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            smemclr(value, strlen(value));
data/putty-0.74/cmdline.c:739: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).
                length = strlen(nextitem);
data/putty-0.74/contrib/cygtermd/malloc.c:40: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).
    char *r = smalloc(1+strlen(s));
data/putty-0.74/contrib/cygtermd/pty.c:69:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(ptyname, ptsname(master), FILENAME_MAX-1);
data/putty-0.74/contrib/cygtermd/sel.c:373:23:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                ret = read(rfd->fd, buf, sizeof(buf));
data/putty-0.74/cproxy.c:160: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).
        ulen = strlen(username);
data/putty-0.74/import.c:135: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).
    char *p = str + strlen(str);
data/putty-0.74/import.c:353: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).
    smemclr(line, strlen(line));
data/putty-0.74/import.c:443: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).
        smemclr(line, strlen(line));
data/putty-0.74/import.c:468: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).
        smemclr(line, strlen(line));
data/putty-0.74/import.c:1124: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).
    smemclr(line, strlen(line));
data/putty-0.74/import.c:1163: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).
        smemclr(line, strlen(line));
data/putty-0.74/import.c:1278: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).
        smemclr(line, strlen(line));
data/putty-0.74/import.c:1739: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).
    smemclr(line, strlen(line));
data/putty-0.74/import.c:1768: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).
            len = hdrstart + strlen(line+hdrstart);
data/putty-0.74/import.c:1781:28:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                line2len = strlen(line2);
data/putty-0.74/import.c:1787: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).
                smemclr(line2, strlen(line2));
data/putty-0.74/import.c:1795:38:  [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 (p[0] == '"' && p[strlen(p)-1] == '"') {
data/putty-0.74/import.c:1797: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).
                    p[strlen(p)-1] = '\0';
data/putty-0.74/import.c:1799:17:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
                strncpy(ret->comment, p, sizeof(ret->comment));
data/putty-0.74/import.c:1826: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).
        smemclr(line, strlen(line));
data/putty-0.74/import.c:1845: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).
        smemclr(line, strlen(line));
data/putty-0.74/import.c:2299: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).
        while ((int)strlen(c) > slen) {
data/putty-0.74/ldisc.c:150: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).
        len = strlen(buf);
data/putty-0.74/logging.c:484:24:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                size = strlen(bufp);
data/putty-0.74/marshal.c:78: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).
    BinarySink_put_string(bs, str, strlen(str));
data/putty-0.74/marshal.c:89:24:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    bs->write(bs, str, strlen(str) + 1);
data/putty-0.74/marshal.c:94: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).
    size_t len = strlen(str);
data/putty-0.74/misc.c:132: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(q) == 16*3 - 1 &&
data/putty-0.74/misc.c:163: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(q) % 4 == 0 && strlen(q) > 2*4 &&
data/putty-0.74/misc.c:163: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 (strlen(q) % 4 == 0 && strlen(q) > 2*4 &&
data/putty-0.74/misc.c:191:17:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            if (strlen(q) < minlen)
data/putty-0.74/misc.h:162: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).
    return make_ptrlen(str, strlen(str));
data/putty-0.74/miscucs.c:27:52:  [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).
    return dup_mb_to_wc_c(codepage, flags, string, strlen(string));
data/putty-0.74/mpint.c:257:55:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
        digitval ^= (digitval ^ (digit - 'A' + 10)) & umask;
data/putty-0.74/pageant.c:920: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).
        smemclr(pp, strlen(pp));
data/putty-0.74/pageant.c:1228: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).
            smemclr(pp_copy, strlen(pp_copy));
data/putty-0.74/proxy.c:274: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).
        hostip_len = strlen(hostip);
data/putty-0.74/proxy.c:278: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).
    hostname_len = strlen(hostname);
data/putty-0.74/proxy.c:579:38:  [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).
        sk_write(p->sub_socket, buf, strlen(buf));
data/putty-0.74/proxy.c:588: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).
            len = strlen(buf);
data/putty-0.74/proxy.c:591: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).
            for (i = 0, j = strlen(buf2); i < len; i += 3, j += 4)
data/putty-0.74/proxy.c:595:43:  [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).
            sk_write(p->sub_socket, buf2, strlen(buf2));
data/putty-0.74/proxy.c:1164:40:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                  default: sprintf(buf+strlen(buf),
data/putty-0.74/proxy.c:1375: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).
                put_data(buf, dest, strlen(dest));
data/putty-0.74/proxy.c:1384: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).
                put_data(buf, username, strlen(username));
data/putty-0.74/proxy.c:1389: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).
                put_data(buf, password, strlen(password));
data/putty-0.74/proxy.c:1394: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).
                put_data(buf, host, strlen(host));
data/putty-0.74/proxy.c:1435: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).
            char *reescaped = snewn(4*strlen(formatted_cmd) + 1, char);
data/putty-0.74/proxy.c:1464: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).
        sk_write(p->sub_socket, formatted_cmd, strlen(formatted_cmd));
data/putty-0.74/pscp.c:97: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).
    for (i = 0; i < strlen(str); ++i)
data/putty-0.74/pscp.c:736: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).
        backend_send(backend, str, strlen(str));
data/putty-0.74/pscp.c:751: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).
        backend_send(backend, buf, strlen(buf));
data/putty-0.74/pscp.c:796: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).
        backend_send(backend, buf, strlen(buf));
data/putty-0.74/pscp.c:798: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).
        backend_send(backend, name, strlen(name));
data/putty-0.74/pscp.c:969: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).
        backend_send(backend, buf, strlen(buf));
data/putty-0.74/pscp.c:970: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).
        backend_send(backend, name, strlen(name));
data/putty-0.74/pscp.c:1010: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).
        newsource = snewn(1+strlen(source), char);
data/putty-0.74/pscp.c:1046: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).
            dirpart = snewn(1+strlen(dupsource), char);
data/putty-0.74/pscp.c:1895:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            int read;
data/putty-0.74/pscp.c:1900:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            if (read <= 0)
data/putty-0.74/pscp.c:1903:29:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                received += read;
data/putty-0.74/pscp.c:1906:44:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            if (write_to_file(f, transbuf, read) != (int)read) {
data/putty-0.74/pscp.c:1906:58:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            if (write_to_file(f, transbuf, read) != (int)read) {
data/putty-0.74/pscp.c:1913:29:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                received += read;
data/putty-0.74/pscp.c:1917:31:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                stat_bytes += read;
data/putty-0.74/pscp.c:1925:25:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            received += read;
data/putty-0.74/pscp.c:2133: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).
    cmd = snewn(4 * strlen(src) + 100, char);
data/putty-0.74/pscp.c:2135: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).
    p = cmd + strlen(cmd);
data/putty-0.74/psftp.c:123:17:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        if (pwd[strlen(pwd) - 1] == '/')
data/putty-0.74/psftp.c:166: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).
        i = strlen(fullname);
data/putty-0.74/psftp.c:897:40:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                          swcm->prefix[strlen(swcm->prefix)-1]=='/' ?
data/putty-0.74/psftp.c:931: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).
    unwcfname = snewn(strlen(filename)+1, char);
data/putty-0.74/psftp.c:974: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).
    char *unwcfname = snewn(strlen(name)+1, char);
data/putty-0.74/psftp.c:1057: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).
    unwcdir = snewn(1 + strlen(dir), char);
data/putty-0.74/psftp.c:1245: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).
        unwcfname = snewn(strlen(origfname)+1, char);
data/putty-0.74/psftp.c:1568:24:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        p = srcfname + strlen(srcfname);
data/putty-0.74/psftp.c:2161: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).
            len = strlen(sftp_lookup[i].name);
data/putty-0.74/psftpcommon.c:62: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).
            strlen(name->filename) +
data/putty-0.74/psftpcommon.c:63: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).
            strlen(name->longname);
data/putty-0.74/rlogin.c:127:28:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    sk_write(rlogin->s, p, strlen(p));
data/putty-0.74/rlogin.c:129: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).
    sk_write(rlogin->s, ruser, strlen(ruser));
data/putty-0.74/rlogin.c:132:28:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    sk_write(rlogin->s, p, strlen(p));
data/putty-0.74/scpserver.c:407: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).
    size_t wc_len = wc ? strlen(wc)+1 : 0;
data/putty-0.74/scpserver.c:430:42:  [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).
    sshfwd_write_ext(scp->sc, true, msg, strlen(msg));
data/putty-0.74/scpserver.c:1248:54:  [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).
        sshfwd_write_ext(scp->sc, true, scp->errmsg, strlen(scp->errmsg));
data/putty-0.74/scpserver.c:1310: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).
    sshfwd_write_ext(scp->sc, true, scp->message, strlen(scp->message));
data/putty-0.74/settings.c:261: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).
        len += 2 + 2 * (strlen(key) + strlen(val));   /* allow for escaping */
data/putty-0.74/settings.c:261: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).
        len += 2 + 2 * (strlen(key) + strlen(val));   /* allow for escaping */
data/putty-0.74/settings.c:448: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).
            maxlen += (maxlen > 0 ? 1 : 0) + strlen(s);
data/putty-0.74/settings.c:720:28:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            sprintf(buf2 + strlen(buf2), "%s%d",
data/putty-0.74/sftp.h:379:12:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    void (*read)(SftpServer *srv, SftpReplyBuilder *reply,
data/putty-0.74/sftp.h:436:12:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
{ srv->vt->read(srv, reply, handle, offset, length); }
data/putty-0.74/ssh1login.c:744: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).
                    smemclr(passphrase, strlen(passphrase));
data/putty-0.74/ssh1login.c:1049: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).
                pwlen = strlen(pw);
data/putty-0.74/ssh2userauth.c:931:45:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                        smemclr(passphrase, strlen(passphrase));
data/putty-0.74/ssh2userauth.c:1603: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).
                            smemclr(s->password, strlen(s->password));
data/putty-0.74/ssh2userauth.c:1621: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).
                            smemclr(s->password, strlen(s->password));
data/putty-0.74/ssh2userauth.c:1687:38:  [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).
                smemclr(s->password, strlen(s->password));
data/putty-0.74/sshcommon.c:716: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).
    put_data(buf, data, strlen(data));
data/putty-0.74/sshcommon.c:948: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).
        assert(strlen(fingerprint) == 16*3 - 1);
data/putty-0.74/sshdss.c:64: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).
    size_t hexlen = strlen(hex);
data/putty-0.74/sshgssc.c:31: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).
    host_buf.length = strlen(pStr);
data/putty-0.74/sshpubk.c:55:22:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        while ((ch = fgetc(fp)) != EOF)
data/putty-0.74/sshpubk.c:376: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).
        put_data(h, passphrase, strlen(passphrase));
data/putty-0.74/sshpubk.c:485:13:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        c = fgetc(fp);
data/putty-0.74/sshpubk.c:489:17:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            c = fgetc(fp);
data/putty-0.74/sshpubk.c:508:17:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        int c = fgetc(fp);
data/putty-0.74/sshpubk.c:511:21:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                c = fgetc(fp);
data/putty-0.74/sshpubk.c:538: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).
        linelen = strlen(line);
data/putty-0.74/sshpubk.c:622: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).
    int passlen = passphrase ? strlen(passphrase) : 0;
data/putty-0.74/sshpubk.c:895: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 (*p == '"' && p[strlen(p)-1] == '"') {
data/putty-0.74/sshpubk.c:896: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).
                p[strlen(p)-1] = '\0';
data/putty-0.74/sshpubk.c:1011: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).
    pubblobsize = strlen(base64) / 4 * 3;
data/putty-0.74/sshpubk.c:1030: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).
    alglen = strlen(line);
data/putty-0.74/sshpubk.c:1310: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).
            put_data(h, passphrase, strlen(passphrase));
data/putty-0.74/sshpubk.c:1396: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).
            alg.len = strlen(replacement_str);
data/putty-0.74/sshpubk.c:1402: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).
                   (comment ? strlen(comment) : 0) + 3, char);
data/putty-0.74/sshrsa.c:257: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).
    size_t hexlen = strlen(hex);
data/putty-0.74/sshshare.c:1863: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).
    sk_write(cs->sock, fullstring, strlen(fullstring));
data/putty-0.74/sshverstring.c:168: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).
    sv_pos = s->prefix_wanted.len + strlen(s->our_protoversion) + 1;
data/putty-0.74/sshverstring.c:200: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).
    bufchain_add(s->bpp.out_raw, s->our_vstring, strlen(s->our_vstring));
data/putty-0.74/telnet.c:367:28:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            b = snewn(20 + strlen(termspeed), unsigned char);
data/putty-0.74/telnet.c:373: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).
            n = 4 + strlen(termspeed);
data/putty-0.74/telnet.c:386:28:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            b = snewn(20 + strlen(termtype), unsigned char);
data/putty-0.74/telnet.c:448: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).
                 bsize += strlen(ekey) + strlen(eval) + 2;
data/putty-0.74/telnet.c:448:42:  [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).
                 bsize += strlen(ekey) + strlen(eval) + 2;
data/putty-0.74/telnet.c:451: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).
                bsize += 6 + strlen(user);
data/putty-0.74/terminal.c:1498: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).
        int maxlen = strlen(answerback);
data/putty-0.74/terminal.c:2810: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).
                    ldisc_send(term->ldisc, reply_buf, strlen(reply_buf),
data/putty-0.74/terminal.c:3124: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).
        int true_len = len >= 0 ? len : strlen(buf);
data/putty-0.74/terminal.c:3662: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(term->id_string), false);
data/putty-0.74/terminal.c:3980:40:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                                       strlen(term->id_string), false);
data/putty-0.74/terminal.c:3988:62:  [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).
                                ldisc_send(term->ldisc, buf, strlen(buf),
data/putty-0.74/terminal.c:4432:43:  [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(p);
data/putty-0.74/terminal.c:4447:43:  [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(p);
data/putty-0.74/terminal.c:4698:37:  [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(term->id_string, ";");
data/putty-0.74/terminal.c:4702:29:  [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(term->id_string, "c");
data/putty-0.74/test/sclog/sclog.c:323: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).
    size_t len = strlen(location) + 1;
data/putty-0.74/testcrypt.c:144: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).
    size_t namelen = strlen(name);
data/putty-0.74/testcrypt.c:501: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).
    put_data(sb, s, strlen(s));
data/putty-0.74/testcrypt.c:1110:43:  [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).
        BinarySource_BARE_INIT(src, line, strlen(line));
data/putty-0.74/unix/gtkask.c:128: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(str);
data/putty-0.74/unix/gtkask.c:639: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).
    smemclr(ret, strlen(ret));
data/putty-0.74/unix/gtkfont.c:270:45:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    dec = snew_plus(struct xlfd_decomposed, strlen(xlfd) + 1);
data/putty-0.74/unix/gtkfont.c:1017: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).
            thistmpsize = 4 * strlen(fontnames[i]) + 256;
data/putty-0.74/unix/gtkfont.c:1096: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).
                weightkey, (int)strlen(xlfd->weight_name), xlfd->weight_name,
data/putty-0.74/unix/gtkfont.c:1097: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).
                slantkey, (int)strlen(xlfd->slant), xlfd->slant,
data/putty-0.74/unix/gtkfont.c:1099: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).
                (int)strlen(xlfd->setwidth_name), xlfd->setwidth_name,
data/putty-0.74/unix/gtkfont.c:1100: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).
                (int)strlen(xlfd->spacing), xlfd->spacing,
data/putty-0.74/unix/gtkfont.c:1101: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).
                (int)strlen(xlfd->add_style_name), xlfd->add_style_name);
data/putty-0.74/unix/gtkfont.c:2101:17:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            if (strlen(unifont_types[i]->prefix) == colonpos &&
data/putty-0.74/unix/gtkfont.c:2987: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).
    totalsize = sizeof(fontinfo) + strlen(realfontname) +
data/putty-0.74/unix/gtkfont.c:2988: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).
        (family ? strlen(family) : 0) + (charset ? strlen(charset) : 0) +
data/putty-0.74/unix/gtkfont.c:2988:52:  [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).
        (family ? strlen(family) : 0) + (charset ? strlen(charset) : 0) +
data/putty-0.74/unix/gtkfont.c:2989: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).
        (style ? strlen(style) : 0) + (stylekey ? strlen(stylekey) : 0) + 10;
data/putty-0.74/unix/gtkfont.c:2989: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).
        (style ? strlen(style) : 0) + (stylekey ? strlen(stylekey) : 0) + 10;
data/putty-0.74/unix/gtkfont.c:2995:12:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    p += 1+strlen(p);
data/putty-0.74/unix/gtkfont.c:2999: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).
        p += 1+strlen(p);
data/putty-0.74/unix/gtkfont.c:3005: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).
        p += 1+strlen(p);
data/putty-0.74/unix/gtkfont.c:3011: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).
        p += 1+strlen(p);
data/putty-0.74/unix/gtkfont.c:3017: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).
        p += 1+strlen(p);
data/putty-0.74/unix/gtkmain.c:212:31:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    while (i < size && (ret = read(fd, data + i, size - i)) > 0)
data/putty-0.74/unix/gtkmain.c:628: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).
        smemclr(argv[1], strlen(argv[1]));
data/putty-0.74/unix/gtkwin.c:1443:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(output+1, event->string, lenof(output)-1);
data/putty-0.74/unix/gtkwin.c:1552: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).
                            event->string, strlen(event->string),
data/putty-0.74/unix/gtkwin.c:1611: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).
            end = strlen(output);
data/putty-0.74/unix/gtkwin.c:2034:45:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    term_keyinput(inst->term, CS_UTF8, str, strlen(str));
data/putty-0.74/unix/gtkwin.c:2831: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(text);
data/putty-0.74/unix/gtkwin.c:3184: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).
                length = strlen(list[0]);
data/putty-0.74/unix/osxlaunch.c:320: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).
    char *path_copy = malloc(strlen(path) + 1);
data/putty-0.74/unix/osxlaunch.c:327:24:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    char *ret = malloc(strlen(ret_orig) + 1);
data/putty-0.74/unix/osxlaunch.c:343: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).
    int len1 = strlen(str1), len2 = strlen(str2);
data/putty-0.74/unix/osxlaunch.c:343: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).
    int len1 = strlen(str1), len2 = strlen(str2);
data/putty-0.74/unix/ux_x11.c:133:24:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
        int oldumask = umask(077);
data/putty-0.74/unix/ux_x11.c:135:9:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
        umask(oldumask);
data/putty-0.74/unix/ux_x11.c:169:24:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                while (read(cleanup_pipe[0], buf, sizeof(buf)) > 0);
data/putty-0.74/unix/uxagentc.c:66:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    ret = read(conn->fd, conn->retbuf+conn->retlen,
data/putty-0.74/unix/uxagentc.c:139: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).
    if (!name || strlen(name) >= sizeof(addr.sun_path))
data/putty-0.74/unix/uxagentsock.c:73:24:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                while (read(cleanup_pipe[0], buf, sizeof(buf)) > 0);
data/putty-0.74/unix/uxcons.c:130:19:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    while ((ret = read(fd, buf, len)) < 0 && (
data/putty-0.74/unix/uxcons.c:587:23:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            int ret = read(infd, ptr, toread);
data/putty-0.74/unix/uxfdsock.c:259:12:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    retd = read(fds->infd, buf, sizeof(buf));
data/putty-0.74/unix/uxfdsock.c:295:12:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    retd = read(fd, buf, sizeof(buf));
data/putty-0.74/unix/uxgen.c:50:15:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        ret = read(fd, buf+ngot, len-ngot);
data/putty-0.74/unix/uxmisc.c:102: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).
    if (write(1, buf, strlen(buf)) < 0) {} /* 'error check' to placate gcc */
data/putty-0.74/unix/uxnet.c:286:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(ret->hostname, host, lenof(ret->hostname));
data/putty-0.74/unix/uxnet.c:318:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(buf, addr->hostname, buflen);
data/putty-0.74/unix/uxnet.c:325:13:  [1] (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 low because the source is a
  constant string.
            strncat(buf, "<unknown>", buflen - 1);
data/putty-0.74/unix/uxnet.c:333:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(buf, inet_ntoa(a), buflen);
data/putty-0.74/unix/uxnet.c:709: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).
        assert(strlen(sock->addr->hostname) < sizeof u.su.sun_path);
data/putty-0.74/unix/uxnet.c:1597: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).
    } while (strlen(hostname) >= size-1);
data/putty-0.74/unix/uxnet.c:1711:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(u.su.sun_path, listenaddr->hostname, sizeof(u.su.sun_path)-1);
data/putty-0.74/unix/uxnoise.c:30:15:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        ret = read(fd, buf+ngot, len-ngot);
data/putty-0.74/unix/uxnoise.c:99:24:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        while ( (ret = read(fd, buf, sizeof(buf))) > 0)
data/putty-0.74/unix/uxnoise.c:104:24:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        while ( (ret = read(fd, buf, sizeof(buf))) > 0)
data/putty-0.74/unix/uxpgnt.c:176: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).
        if (shell && strlen(shell) >= 3 &&
data/putty-0.74/unix/uxpgnt.c:177: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).
            !strcmp(shell + strlen(shell) - 3, "csh"))
data/putty-0.74/unix/uxpgnt.c:430: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).
        smemclr(passphrase, strlen(passphrase));
data/putty-0.74/unix/uxpgnt.c:965:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            if (read(signalpipe[0], c, 1) <= 0)
data/putty-0.74/unix/uxpgnt.c:1098: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).
        smemclr(passphrase, strlen(passphrase));
data/putty-0.74/unix/uxplink.c:983:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            if (read(signalpipe[0], c, 1) <= 0)
data/putty-0.74/unix/uxplink.c:995:23:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                ret = read(STDIN_FILENO, buf, sizeof(buf));
data/putty-0.74/unix/uxpty.c:218:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(utmp_entry.ut_line, ttyname+5, lenof(utmp_entry.ut_line));
data/putty-0.74/unix/uxpty.c:219:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(utmp_entry.ut_id, ttyname+8, lenof(utmp_entry.ut_id));
data/putty-0.74/unix/uxpty.c:220:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(utmp_entry.ut_user, pw->pw_name, lenof(utmp_entry.ut_user));
data/putty-0.74/unix/uxpty.c:221:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(utmp_entry.ut_host, location, lenof(utmp_entry.ut_host));
data/putty-0.74/unix/uxpty.c:242:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(lastlog_entry.ll_line, ttyname+5, lenof(lastlog_entry.ll_line));
data/putty-0.74/unix/uxpty.c:243:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(lastlog_entry.ll_host, location, lenof(lastlog_entry.ll_host));
data/putty-0.74/unix/uxpty.c:414:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(pty->name, ptsname(pty->master_fd), FILENAME_MAX-1);
data/putty-0.74/unix/uxpty.c:496:23:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                ret = read(pipefd[0], buffer, lenof(buffer));
data/putty-0.74/unix/uxpty.c:638:19:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            ret = read(fd, buf, sizeof(buf));
data/putty-0.74/unix/uxpty.c:765:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        if (read(pty_signal_pipe[0], c, 1) <= 0)
data/putty-0.74/unix/uxpty.c:959: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).
                int len = strlen(location)+1, pos = 0; /* +1 to include NUL */
data/putty-0.74/unix/uxpty.c:1010:24:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            int plen = strlen(pty_osx_envrestore_prefix);
data/putty-0.74/unix/uxpty.c:1226: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).
                shellname = snewn(2+strlen(shell), char);
data/putty-0.74/unix/uxser.c:376:15:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        ret = read(serial->fd, buf, sizeof(buf));
data/putty-0.74/unix/uxserver.c:386: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(expected);
data/putty-0.74/unix/uxserver.c:407: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(expected);
data/putty-0.74/unix/uxsftp.c:163:12:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    return read(f->fd, buffer, length);
data/putty-0.74/unix/uxsftp.c:613:19:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            ret = read(0, buf+buflen, 1);
data/putty-0.74/unix/uxsftpserver.c:515:22:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            status = read(fd, p, length);
data/putty-0.74/unix/uxshare.c:193:19:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            ret = read(saltfd, saltbuf, SALT_SIZE);
data/putty-0.74/unix/uxstore.c:620: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).
        i = strlen(keytype);
data/putty-0.74/unix/uxstore.c:630: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).
        i = strlen(porttext);
data/putty-0.74/unix/uxstore.c:639: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).
        i = strlen(hostname);
data/putty-0.74/unix/uxstore.c:759:24:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        while ( (ret = read(fd, buf, sizeof(buf))) > 0)
data/putty-0.74/utils.c:137: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).
        return strlen(s);
data/putty-0.74/utils.c:255: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).
        int len = strlen(s);
data/putty-0.74/utils.c:269: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(s1);
data/putty-0.74/utils.c:275: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).
        len += strlen(sn);
data/putty-0.74/utils.c:281: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).
    q = p + strlen(p);
data/putty-0.74/utils.c:289: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).
        q += strlen(q);
data/putty-0.74/utils.c:299: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).
        smemclr(string, strlen(string));
data/putty-0.74/utils.c:496: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).
    buf->visible.len += strlen(buf->visible.s + buf->visible.len);
data/putty-0.74/utils.c:528: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).
        len += strlen(ret + len);
data/putty-0.74/utils.c:565: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).
        int len = strlen(str);
data/putty-0.74/utils.c:945: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).
    size_t len = strlen(str);
data/putty-0.74/utils.c:1022: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).
    return !memcmp(s, t, strlen(t));
data/putty-0.74/utils.c:1027:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    size_t slen = strlen(s), tlen = strlen(t);
data/putty-0.74/utils.c:1027: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).
    size_t slen = strlen(s), tlen = strlen(t);
data/putty-0.74/wildcard.c:303:45:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    return wc_match_inner(wildcard, target, strlen(target));
data/putty-0.74/wildcard.c:455: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).
        aret = wc_match_fragment(&f, &t, t + strlen(t));
data/putty-0.74/windows/sizetip.c:79:44:  [1] (buffer) _tcslen:
  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).
            GetTextExtentPoint32(hdc, str, _tcslen(str), &sz);
data/putty-0.74/windows/sizetip.c:156:40:  [1] (buffer) _tcslen:
  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).
        GetTextExtentPoint32(hdc, str, _tcslen(str), &sz);
data/putty-0.74/windows/winctrls.c:396: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).
    ret = snewn(1+strlen(text), char);
data/putty-0.74/windows/winctrls.c:399: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).
    pwidths = snewn(1+strlen(text), INT);
data/putty-0.74/windows/winctrls.c:422:43:  [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 (!GetTextExtentExPoint(hdc, p, strlen(p), width,
data/putty-0.74/windows/winctrls.c:424: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).
            (size_t)nfit >= strlen(p)) {
data/putty-0.74/windows/winctrls.c:448:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(q, p, nfit);
data/putty-0.74/windows/winctrls.c:1188: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).
    ret = snewn(2*strlen(text)+1, char);   /* size potentially doubles! */
data/putty-0.74/windows/winctrls.c:1775: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).
                                 strlen((char *)c->data), &s);
data/putty-0.74/windows/winctrls.c:1780: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).
                (char *)c->data, strlen((char *)c->data));
data/putty-0.74/windows/winctrls.c:1966:13:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
            strncpy(lf.lfFaceName, fs->name,
data/putty-0.74/windows/windlg.c:144: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).
                            strlen(getevent(selitems[i])) + sizeof(sel_nl);
data/putty-0.74/windows/windlg.c:151:40:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                            int qlen = strlen(q);
data/putty-0.74/windows/windlg.c:344: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).
    ins.INSITEM.cchTextMax = strlen(text)+1;
data/putty-0.74/windows/window.c:578: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).
            int i = strlen(p);
data/putty-0.74/windows/window.c:4764: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).
    window_name = snewn(1 + strlen(title), char);
data/putty-0.74/windows/window.c:4773: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).
    icon_name = snewn(1 + strlen(title), char);
data/putty-0.74/windows/window.c:5256:31:  [1] (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 character.
                    alen = 1; strcpy(after, "}");
data/putty-0.74/windows/window.c:5380: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).
            i = MultiByteToWideChar(CP_ACP, 0, s, strlen(s) + 1, 0, 0);
data/putty-0.74/windows/window.c:5382:47:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            MultiByteToWideChar(CP_ACP, 0, s, strlen(s) + 1,
data/putty-0.74/windows/wingss.c:213: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).
            int pathlen = strlen(path);
data/putty-0.74/windows/wingss.c:548: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).
    buf->length = strlen(buf->value);
data/putty-0.74/windows/winjump.c:569: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).
        piterator += strlen(piterator) + 1;
data/putty-0.74/windows/winjump.c:604: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).
        piterator += strlen(piterator) + 1;
data/putty-0.74/windows/winmisc.c:291: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).
            int len = strlen(msgtext);
data/putty-0.74/windows/winmisc.c:427: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).
        WriteFile(debug_hdl, buf, strlen(buf), &dw, NULL);
data/putty-0.74/windows/winnet.c:521:21:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
                    strncpy(realhost, ret->ais->ai_canonname, lenof(realhost));
data/putty-0.74/windows/winnet.c:523:21:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
                    strncpy(realhost, host, lenof(realhost));
data/putty-0.74/windows/winnet.c:539:17:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
                strncpy(realhost, h->h_name, sizeof(realhost));
data/putty-0.74/windows/winnet.c:551:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(realhost, host, sizeof(realhost));
data/putty-0.74/windows/winnet.c:554: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).
    *canonicalname = snewn(1+strlen(realhost), char);
data/putty-0.74/windows/winnet.c:571:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(ret->hostname, host, lenof(ret->hostname));
data/putty-0.74/windows/winnet.c:588:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(ret->hostname, pipename, lenof(ret->hostname));
data/putty-0.74/windows/winnet.c:627:13:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
            strncpy(buf, addr->hostname, buflen);
data/putty-0.74/windows/winnet.c:629:17:  [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(buf, "<unknown>", buflen);
data/putty-0.74/windows/winnet.c:638:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(buf, p_inet_ntoa(a), buflen);
data/putty-0.74/windows/winnet.c:641:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(buf, addr->hostname, buflen);
data/putty-0.74/windows/winpgnt.c:402: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).
        smemclr(passphrase, strlen(passphrase));
data/putty-0.74/windows/winpgnt.c:412: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).
        smemclr(passphrase, strlen(passphrase));
data/putty-0.74/windows/winpgnt.c:440:12:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        if(strlen(filelist) > of.nFileOffset) {
data/putty-0.74/windows/winpgnt.c:452:43:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            char *filewalker = filelist + strlen(dir) + 1;
data/putty-0.74/windows/winpgnt.c:459: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).
                filewalker += strlen(filewalker) + 1;
data/putty-0.74/windows/winpgnt.c:1065:21:  [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(param, "@");
data/putty-0.74/windows/winpgntc.c:102: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).
    cds.cbData = 1 + strlen(mapname);
data/putty-0.74/windows/winplink.c:220:17:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        if (buf[strlen(buf)-1] == '\n')
data/putty-0.74/windows/winplink.c:221: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).
            buf[strlen(buf)-1] = '\0';
data/putty-0.74/windows/winplink.c:245:17:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        if (buf[strlen(buf)-1] == '\n')
data/putty-0.74/windows/winplink.c:246: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).
            buf[strlen(buf)-1] = '\0';
data/putty-0.74/windows/winsftp.c:134:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    DWORD read;
data/putty-0.74/windows/winsftp.c:135:42:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    if (!ReadFile(f->h, buffer, length, &read, NULL))
data/putty-0.74/windows/winsftp.c:138:16:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        return read;
data/putty-0.74/windows/winshare.c:54: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).
    cryptlen = strlen(realname) + 1;
data/putty-0.74/windows/winstore.c:74: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).
                      1 + strlen(value));
data/putty-0.74/windows/winstore.c:336: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).
    len = 1 + strlen(key);
data/putty-0.74/windows/winstore.c:414: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(otherstr) + 1);
data/putty-0.74/windows/winstore.c:458: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).
                      (BYTE *)key, strlen(key) + 1);
data/putty-0.74/windows/winstore.c:719:49:  [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).
        new_value = snewn(value_length + (add ? strlen(add) + 1 : 0), char);
data/putty-0.74/windows/winstore.c:726: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).
            piterator_new += strlen(piterator_new) + 1;
data/putty-0.74/windows/winstore.c:737:38:  [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).
                    piterator_new += strlen(piterator_new) + 1;
data/putty-0.74/windows/winstore.c:740: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).
            piterator_old += strlen(piterator_old) + 1;
data/putty-0.74/windows/winutils.c:316: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).
    outputline = snewn(1+strlen(cmdline), char);
data/putty-0.74/windows/winutils.c:317:24:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    outputargv = snewn(strlen(cmdline)+1 / 2, char *);
data/putty-0.74/windows/winutils.c:318:28:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    outputargstart = snewn(strlen(cmdline)+1 / 2, char *);
data/putty-0.74/windows/winutils.c:535: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).
            char *str = malloc(20 + strlen(argv[0]) + strlen(argv[2]));
data/putty-0.74/windows/winutils.c:535:55:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            char *str = malloc(20 + strlen(argv[0]) + strlen(argv[2]));
data/putty-0.74/windows/winutils.c:563: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).
            teststr = malloc(200 + strlen(argv[0]));
data/putty-0.74/x11fwd.c:886: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).
    msglen = strlen(full_message);
data/putty-0.74/x11fwd.c:1158: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).
    authnamelen = strlen(authname);

ANALYSIS SUMMARY:

Hits = 1171
Lines analyzed = 164770 in approximately 4.23 seconds (38924 lines/second)
Physical Source Lines of Code (SLOC) = 117861
Hits@level = [0] 684 [1] 319 [2] 672 [3]  40 [4] 136 [5]   4
Hits@level+ = [0+] 1855 [1+] 1171 [2+] 852 [3+] 180 [4+] 140 [5+]   4
Hits/KSLOC@level+ = [0+] 15.7389 [1+] 9.93543 [2+] 7.22885 [3+] 1.52722 [4+] 1.18784 [5+] 0.0339383
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.