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/xrdp-0.9.12/mc/mc.c
Examining data/xrdp-0.9.12/mc/mc.h
Examining data/xrdp-0.9.12/tcutils/mainwindow.cpp
Examining data/xrdp-0.9.12/tcutils/mainwindow.h
Examining data/xrdp-0.9.12/tcutils/utils.cpp
Examining data/xrdp-0.9.12/tcutils/main.cpp
Examining data/xrdp-0.9.12/tcutils/utils.h
Examining data/xrdp-0.9.12/tests/gtcp_proxy/hexdump.c
Examining data/xrdp-0.9.12/tests/gtcp_proxy/gtcp.c
Examining data/xrdp-0.9.12/tests/gtcp_proxy/gtcp-proxy.c
Examining data/xrdp-0.9.12/tests/gtcp_proxy/gtcp.h
Examining data/xrdp-0.9.12/tests/tcp_proxy/main.c
Examining data/xrdp-0.9.12/tests/memtest/memtest.c
Examining data/xrdp-0.9.12/tests/memtest/libmem.h
Examining data/xrdp-0.9.12/tests/memtest/libmem.c
Examining data/xrdp-0.9.12/keygen/keygen.c
Examining data/xrdp-0.9.12/xrdpapi/xrdpapi.c
Examining data/xrdp-0.9.12/xrdpapi/vrplayer.c
Examining data/xrdp-0.9.12/xrdpapi/simple.c
Examining data/xrdp-0.9.12/xrdpapi/xrdpapi.h
Examining data/xrdp-0.9.12/librfxcodec/include/rfxcodec_encode.h
Examining data/xrdp-0.9.12/librfxcodec/include/rfxcodec_decode.h
Examining data/xrdp-0.9.12/librfxcodec/include/rfxcodec_common.h
Examining data/xrdp-0.9.12/librfxcodec/tests/rfxcodectest.c
Examining data/xrdp-0.9.12/librfxcodec/tests/rfxencode.c
Examining data/xrdp-0.9.12/librfxcodec/src/rfx_bitstream.h
Examining data/xrdp-0.9.12/librfxcodec/src/rfxencode_quantization.h
Examining data/xrdp-0.9.12/librfxcodec/src/rfxencode_alpha.h
Examining data/xrdp-0.9.12/librfxcodec/src/rfxencode_rlgr3.h
Examining data/xrdp-0.9.12/librfxcodec/src/rfxencode_diff_rlgr3.h
Examining data/xrdp-0.9.12/librfxcodec/src/rfxencode_differential.h
Examining data/xrdp-0.9.12/librfxcodec/src/rfxconstants.h
Examining data/xrdp-0.9.12/librfxcodec/src/rfxencode_dwt.c
Examining data/xrdp-0.9.12/librfxcodec/src/rfxencode_compose.h
Examining data/xrdp-0.9.12/librfxcodec/src/rfxencode_diff_rlgr1.h
Examining data/xrdp-0.9.12/librfxcodec/src/rfxencode.h
Examining data/xrdp-0.9.12/librfxcodec/src/rfxencode_rlgr1.h
Examining data/xrdp-0.9.12/librfxcodec/src/rfxencode_tile.h
Examining data/xrdp-0.9.12/librfxcodec/src/rfxencode_rgb_to_yuv.c
Examining data/xrdp-0.9.12/librfxcodec/src/rfxencode_dwt.h
Examining data/xrdp-0.9.12/librfxcodec/src/rfxencode_diff_rlgr3.c
Examining data/xrdp-0.9.12/librfxcodec/src/rfxencode_differential.c
Examining data/xrdp-0.9.12/librfxcodec/src/rfxencode_rlgr3.c
Examining data/xrdp-0.9.12/librfxcodec/src/rfxcommon.h
Examining data/xrdp-0.9.12/librfxcodec/src/rfxencode_quantization.c
Examining data/xrdp-0.9.12/librfxcodec/src/rfxencode_alpha.c
Examining data/xrdp-0.9.12/librfxcodec/src/rfxencode_tile.c
Examining data/xrdp-0.9.12/librfxcodec/src/rfxencode_rgb_to_yuv.h
Examining data/xrdp-0.9.12/librfxcodec/src/amd64/rfxencode_tile_amd64.c
Examining data/xrdp-0.9.12/librfxcodec/src/amd64/funcs_amd64.h
Examining data/xrdp-0.9.12/librfxcodec/src/rfxencode_rlgr1.c
Examining data/xrdp-0.9.12/librfxcodec/src/x86/rfxencode_tile_x86.c
Examining data/xrdp-0.9.12/librfxcodec/src/x86/funcs_x86.h
Examining data/xrdp-0.9.12/librfxcodec/src/rfxencode_compose.c
Examining data/xrdp-0.9.12/librfxcodec/src/rfxencode_diff_rlgr1.c
Examining data/xrdp-0.9.12/librfxcodec/src/rfxencode.c
Examining data/xrdp-0.9.12/sesman/xauth.c
Examining data/xrdp-0.9.12/sesman/session.h
Examining data/xrdp-0.9.12/sesman/verify_user_pam.c
Examining data/xrdp-0.9.12/sesman/verify_user_kerberos.c
Examining data/xrdp-0.9.12/sesman/sesman.h
Examining data/xrdp-0.9.12/sesman/verify_user_bsd.c
Examining data/xrdp-0.9.12/sesman/sig.h
Examining data/xrdp-0.9.12/sesman/scp_v0.c
Examining data/xrdp-0.9.12/sesman/access.h
Examining data/xrdp-0.9.12/sesman/scp_v1.c
Examining data/xrdp-0.9.12/sesman/config.h
Examining data/xrdp-0.9.12/sesman/env.h
Examining data/xrdp-0.9.12/sesman/scp_v1_mng.c
Examining data/xrdp-0.9.12/sesman/sig.c
Examining data/xrdp-0.9.12/sesman/scp.h
Examining data/xrdp-0.9.12/sesman/auth.h
Examining data/xrdp-0.9.12/sesman/libscp/libscp_lock.h
Examining data/xrdp-0.9.12/sesman/libscp/libscp_commands_mng.h
Examining data/xrdp-0.9.12/sesman/libscp/libscp.h
Examining data/xrdp-0.9.12/sesman/libscp/libscp_types_mng.h
Examining data/xrdp-0.9.12/sesman/libscp/libscp_connection.c
Examining data/xrdp-0.9.12/sesman/libscp/libscp_v1c.c
Examining data/xrdp-0.9.12/sesman/libscp/libscp_v1c_mng.c
Examining data/xrdp-0.9.12/sesman/libscp/libscp_vX.c
Examining data/xrdp-0.9.12/sesman/libscp/libscp_init.c
Examining data/xrdp-0.9.12/sesman/libscp/libscp_v1s.h
Examining data/xrdp-0.9.12/sesman/libscp/libscp_session.c
Examining data/xrdp-0.9.12/sesman/libscp/libscp_v1s_mng.h
Examining data/xrdp-0.9.12/sesman/libscp/libscp_tcp.h
Examining data/xrdp-0.9.12/sesman/libscp/libscp_connection.h
Examining data/xrdp-0.9.12/sesman/libscp/libscp_v1c.h
Examining data/xrdp-0.9.12/sesman/libscp/libscp_commands.h
Examining data/xrdp-0.9.12/sesman/libscp/libscp_lock.c
Examining data/xrdp-0.9.12/sesman/libscp/libscp_tcp.c
Examining data/xrdp-0.9.12/sesman/libscp/libscp_session.h
Examining data/xrdp-0.9.12/sesman/libscp/libscp_v0.h
Examining data/xrdp-0.9.12/sesman/libscp/libscp_v1c_mng.h
Examining data/xrdp-0.9.12/sesman/libscp/libscp_vX.h
Examining data/xrdp-0.9.12/sesman/libscp/libscp_init.h
Examining data/xrdp-0.9.12/sesman/libscp/libscp_types.h
Examining data/xrdp-0.9.12/sesman/libscp/libscp_v0.c
Examining data/xrdp-0.9.12/sesman/libscp/libscp_v1s.c
Examining data/xrdp-0.9.12/sesman/libscp/libscp_v1s_mng.c
Examining data/xrdp-0.9.12/sesman/sesman.c
Examining data/xrdp-0.9.12/sesman/xauth.h
Examining data/xrdp-0.9.12/sesman/session.c
Examining data/xrdp-0.9.12/sesman/scp_v1.h
Examining data/xrdp-0.9.12/sesman/config.c
Examining data/xrdp-0.9.12/sesman/env.c
Examining data/xrdp-0.9.12/sesman/scp_v1_mng.h
Examining data/xrdp-0.9.12/sesman/chansrv/ms-erref.h
Examining data/xrdp-0.9.12/sesman/chansrv/smartcard_pcsc.h
Examining data/xrdp-0.9.12/sesman/chansrv/audin.h
Examining data/xrdp-0.9.12/sesman/chansrv/rail.c
Examining data/xrdp-0.9.12/sesman/chansrv/pcsc/xrdp_pcsc.c
Examining data/xrdp-0.9.12/sesman/chansrv/pcsc/wrapper/winscard-funcs.h
Examining data/xrdp-0.9.12/sesman/chansrv/pcsc/wrapper/winscard.c
Examining data/xrdp-0.9.12/sesman/chansrv/devredir.c
Examining data/xrdp-0.9.12/sesman/chansrv/xcommon.c
Examining data/xrdp-0.9.12/sesman/chansrv/clipboard_common.h
Examining data/xrdp-0.9.12/sesman/chansrv/chansrv_xfs.c
Examining data/xrdp-0.9.12/sesman/chansrv/chansrv_common.h
Examining data/xrdp-0.9.12/sesman/chansrv/fifo.h
Examining data/xrdp-0.9.12/sesman/chansrv/irp.h
Examining data/xrdp-0.9.12/sesman/chansrv/smartcard.c
Examining data/xrdp-0.9.12/sesman/chansrv/chansrv.h
Examining data/xrdp-0.9.12/sesman/chansrv/clipboard_file.c
Examining data/xrdp-0.9.12/sesman/chansrv/clipboard.h
Examining data/xrdp-0.9.12/sesman/chansrv/chansrv_fuse.h
Examining data/xrdp-0.9.12/sesman/chansrv/sound.c
Examining data/xrdp-0.9.12/sesman/chansrv/chansrv_xfs.h
Examining data/xrdp-0.9.12/sesman/chansrv/xcommon.h
Examining data/xrdp-0.9.12/sesman/chansrv/audin.c
Examining data/xrdp-0.9.12/sesman/chansrv/rail.h
Examining data/xrdp-0.9.12/sesman/chansrv/devredir.h
Examining data/xrdp-0.9.12/sesman/chansrv/smartcard_pcsc.c
Examining data/xrdp-0.9.12/sesman/chansrv/sound.h
Examining data/xrdp-0.9.12/sesman/chansrv/chansrv.c
Examining data/xrdp-0.9.12/sesman/chansrv/ms-smb2.h
Examining data/xrdp-0.9.12/sesman/chansrv/ms-fscc.h
Examining data/xrdp-0.9.12/sesman/chansrv/clipboard_file.h
Examining data/xrdp-0.9.12/sesman/chansrv/clipboard.c
Examining data/xrdp-0.9.12/sesman/chansrv/chansrv_fuse.c
Examining data/xrdp-0.9.12/sesman/chansrv/ms-rdpefs.h
Examining data/xrdp-0.9.12/sesman/chansrv/mlog.h
Examining data/xrdp-0.9.12/sesman/chansrv/smartcard.h
Examining data/xrdp-0.9.12/sesman/chansrv/chansrv_common.c
Examining data/xrdp-0.9.12/sesman/chansrv/fifo.c
Examining data/xrdp-0.9.12/sesman/chansrv/irp.c
Examining data/xrdp-0.9.12/sesman/access.c
Examining data/xrdp-0.9.12/sesman/tools/tcp.h
Examining data/xrdp-0.9.12/sesman/tools/xcon.c
Examining data/xrdp-0.9.12/sesman/tools/config.c
Examining data/xrdp-0.9.12/sesman/tools/sesadmin.c
Examining data/xrdp-0.9.12/sesman/tools/sesrun.c
Examining data/xrdp-0.9.12/sesman/tools/dis.c
Examining data/xrdp-0.9.12/sesman/tools/sestest.c
Examining data/xrdp-0.9.12/sesman/tools/tcp.c
Examining data/xrdp-0.9.12/sesman/verify_user.c
Examining data/xrdp-0.9.12/sesman/verify_user_pam_userpass.c
Examining data/xrdp-0.9.12/sesman/scp_v0.h
Examining data/xrdp-0.9.12/sesman/scp.c
Examining data/xrdp-0.9.12/libpainter/src/painter_utils.h
Examining data/xrdp-0.9.12/libpainter/src/painter.c
Examining data/xrdp-0.9.12/libpainter/src/painter_utils.c
Examining data/xrdp-0.9.12/libpainter/include/painter.h
Examining data/xrdp-0.9.12/libpainter/tests/paintertest.c
Examining data/xrdp-0.9.12/xrdp/xrdp_listen.c
Examining data/xrdp-0.9.12/xrdp/xrdp_encoder.h
Examining data/xrdp-0.9.12/xrdp/xrdp_wm.c
Examining data/xrdp-0.9.12/xrdp/xrdp_login_wnd.c
Examining data/xrdp-0.9.12/xrdp/xrdpwin.c
Examining data/xrdp-0.9.12/xrdp/xrdp_region.c
Examining data/xrdp-0.9.12/xrdp/xrdp_mm.c
Examining data/xrdp-0.9.12/xrdp/xrdp_bitmap.c
Examining data/xrdp-0.9.12/xrdp/funcs.c
Examining data/xrdp-0.9.12/xrdp/xrdp_encoder.c
Examining data/xrdp-0.9.12/xrdp/xrdp_cache.c
Examining data/xrdp-0.9.12/xrdp/xrdp.h
Examining data/xrdp-0.9.12/xrdp/lang.c
Examining data/xrdp-0.9.12/xrdp/xrdp_font.c
Examining data/xrdp-0.9.12/xrdp/xrdp_types.h
Examining data/xrdp-0.9.12/xrdp/xrdp_process.c
Examining data/xrdp-0.9.12/xrdp/xrdp_painter.c
Examining data/xrdp-0.9.12/xrdp/xrdp.c
Examining data/xrdp-0.9.12/common/defines.h
Examining data/xrdp-0.9.12/common/xrdp_rail.h
Examining data/xrdp-0.9.12/common/pixman-region.h
Examining data/xrdp-0.9.12/common/pixman-region16.c
Examining data/xrdp-0.9.12/common/arch.h
Examining data/xrdp-0.9.12/common/file.c
Examining data/xrdp-0.9.12/common/ssl_calls.c
Examining data/xrdp-0.9.12/common/trans.h
Examining data/xrdp-0.9.12/common/os_calls.h
Examining data/xrdp-0.9.12/common/base64.c
Examining data/xrdp-0.9.12/common/log.h
Examining data/xrdp-0.9.12/common/list16.h
Examining data/xrdp-0.9.12/common/list.h
Examining data/xrdp-0.9.12/common/fifo.h
Examining data/xrdp-0.9.12/common/thread_calls.h
Examining data/xrdp-0.9.12/common/trans.c
Examining data/xrdp-0.9.12/common/rail.h
Examining data/xrdp-0.9.12/common/xrdp_constants.h
Examining data/xrdp-0.9.12/common/parse.h
Examining data/xrdp-0.9.12/common/file.h
Examining data/xrdp-0.9.12/common/ssl_calls.h
Examining data/xrdp-0.9.12/common/pixman-region.c
Examining data/xrdp-0.9.12/common/thread_calls.c
Examining data/xrdp-0.9.12/common/xrdp_sockets.h
Examining data/xrdp-0.9.12/common/fifo.c
Examining data/xrdp-0.9.12/common/list16.c
Examining data/xrdp-0.9.12/common/list.c
Examining data/xrdp-0.9.12/common/xrdp_client_info.h
Examining data/xrdp-0.9.12/common/base64.h
Examining data/xrdp-0.9.12/common/os_calls.c
Examining data/xrdp-0.9.12/common/log.c
Examining data/xrdp-0.9.12/vnc/vnc.c
Examining data/xrdp-0.9.12/vnc/vnc.h
Examining data/xrdp-0.9.12/libxrdp/xrdp_bitmap32_compress.c
Examining data/xrdp-0.9.12/libxrdp/xrdp_fastpath.c
Examining data/xrdp-0.9.12/libxrdp/xrdp_jpeg_compress.c
Examining data/xrdp-0.9.12/libxrdp/libxrdp.c
Examining data/xrdp-0.9.12/libxrdp/libxrdpinc.h
Examining data/xrdp-0.9.12/libxrdp/xrdp_mcs.c
Examining data/xrdp-0.9.12/libxrdp/xrdp_orders_rail.h
Examining data/xrdp-0.9.12/libxrdp/xrdp_bitmap_compress.c
Examining data/xrdp-0.9.12/libxrdp/xrdp_caps.c
Examining data/xrdp-0.9.12/libxrdp/xrdp_mppc_enc.c
Examining data/xrdp-0.9.12/libxrdp/xrdp_sec.c
Examining data/xrdp-0.9.12/libxrdp/xrdp_orders.c
Examining data/xrdp-0.9.12/libxrdp/xrdp_surface.c
Examining data/xrdp-0.9.12/libxrdp/libxrdp.h
Examining data/xrdp-0.9.12/libxrdp/xrdp_rdp.c
Examining data/xrdp-0.9.12/libxrdp/xrdp_iso.c
Examining data/xrdp-0.9.12/libxrdp/xrdp_channel.c
Examining data/xrdp-0.9.12/libxrdp/xrdp_orders_rail.c
Examining data/xrdp-0.9.12/xup/xup.c
Examining data/xrdp-0.9.12/xup/xup.h
Examining data/xrdp-0.9.12/vrplayer/mediapacket.cpp
Examining data/xrdp-0.9.12/vrplayer/playvideo.h
Examining data/xrdp-0.9.12/vrplayer/decoder.h
Examining data/xrdp-0.9.12/vrplayer/decoderthread.h
Examining data/xrdp-0.9.12/vrplayer/dlgabout.h
Examining data/xrdp-0.9.12/vrplayer/ourinterface.h
Examining data/xrdp-0.9.12/vrplayer/mediapacket.h
Examining data/xrdp-0.9.12/vrplayer/mainwindow.cpp
Examining data/xrdp-0.9.12/vrplayer/main.cpp
Examining data/xrdp-0.9.12/vrplayer/demuxmedia.h
Examining data/xrdp-0.9.12/vrplayer/demuxmedia.cpp
Examining data/xrdp-0.9.12/vrplayer/mainwindow.h
Examining data/xrdp-0.9.12/vrplayer/playvideo.cpp
Examining data/xrdp-0.9.12/vrplayer/decoderthread.cpp
Examining data/xrdp-0.9.12/vrplayer/decoder.cpp
Examining data/xrdp-0.9.12/vrplayer/playaudio.h
Examining data/xrdp-0.9.12/vrplayer/playaudio.cpp
Examining data/xrdp-0.9.12/vrplayer/ourinterface.cpp
Examining data/xrdp-0.9.12/vrplayer/dlgabout.cpp
Examining data/xrdp-0.9.12/neutrinordp/xrdp-color.h
Examining data/xrdp-0.9.12/neutrinordp/xrdp-neutrinordp.h
Examining data/xrdp-0.9.12/neutrinordp/xrdp-neutrinordp.c
Examining data/xrdp-0.9.12/neutrinordp/xrdp-color.c
Examining data/xrdp-0.9.12/fontdump/fontdump.c
Examining data/xrdp-0.9.12/genkeymap/evdev-map.c
Examining data/xrdp-0.9.12/genkeymap/genkeymap.c
Examining data/xrdp-0.9.12/xrdpvr/xrdpvr.h
Examining data/xrdp-0.9.12/xrdpvr/xrdpvr_internal.h
Examining data/xrdp-0.9.12/xrdpvr/xrdpvr.c

FINAL RESULTS:

data/xrdp-0.9.12/common/os_calls.c:2297:12:  [5] (race) chmod:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchmod( ) instead.
    return chmod(filename, fl);
data/xrdp-0.9.12/common/os_calls.c:2306:12:  [5] (race) chown:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchown( ) instead.
    return chown(name, uid, gid);
data/xrdp-0.9.12/common/log.c:560:11:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
    len = vsnprintf(buff + 28, LOG_BUFFER_SIZE, msg, ap);
data/xrdp-0.9.12/common/os_calls.c:213:5:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    vfprintf(stdout, format, ap);
data/xrdp-0.9.12/common/os_calls.c:224:5:  [4] (format) vsprintf:
  Potential format string problem (CWE-134). Make format string constant.
    vsprintf(dest, format, ap);
data/xrdp-0.9.12/common/os_calls.c:236:11:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
    err = vsnprintf(dest, len, format, ap);
data/xrdp-0.9.12/common/os_calls.c:249: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, format, ap);
data/xrdp-0.9.12/common/os_calls.c:265: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, format, ap);
data/xrdp-0.9.12/common/os_calls.c:1185:13:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
            sprintf(sz, "::FFFF:%s", address);
data/xrdp-0.9.12/common/os_calls.c:2370:12:  [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.
    return access(filename, F_OK) == 0;
data/xrdp-0.9.12/common/os_calls.c:2382:12:  [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.
    return access(filename, R_OK) == 0;
data/xrdp-0.9.12/common/os_calls.c:2552:12:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
    return strcpy(dest, src);
data/xrdp-0.9.12/common/os_calls.c:2588:12:  [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).
    return strcat(dest, src);
data/xrdp-0.9.12/common/os_calls.c:3055:12:  [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.
    return system(aexec);
data/xrdp-0.9.12/common/os_calls.c:3093:10:  [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.
    rv = execvp(p1, args);
data/xrdp-0.9.12/common/os_calls.c:3110:10:  [4] (shell) execlp:
  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.
    rv = execlp(a1, a2, a3, (void *)0);
data/xrdp-0.9.12/fontdump/fontdump.c:65:5:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
    vsnprintf(text1, 511, msg1, ap);
data/xrdp-0.9.12/librfxcodec/src/amd64/rfxencode_tile_amd64.c:42:37:  [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.
    do { if (_level < LLOG_LEVEL) { printf _args ; printf("\n"); } } while (0)
data/xrdp-0.9.12/librfxcodec/src/rfxencode_alpha.c:37:37:  [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.
    do { if (_level < LLOG_LEVEL) { printf _args ; printf("\n"); } } while (0)
data/xrdp-0.9.12/librfxcodec/src/rfxencode_compose.c:38:37:  [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.
    do { if (_level < LLOG_LEVEL) { printf _args ; printf("\n"); } } while (0)
data/xrdp-0.9.12/librfxcodec/src/rfxencode_rgb_to_yuv.c:44:37:  [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.
    do { if (_level < LLOG_LEVEL) { printf _args ; printf("\n"); } } while (0)
data/xrdp-0.9.12/librfxcodec/src/rfxencode_tile.c:52:37:  [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.
    do { if (_level < LLOG_LEVEL) { printf _args ; printf("\n"); } } while (0)
data/xrdp-0.9.12/librfxcodec/src/x86/rfxencode_tile_x86.c:42:37:  [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.
    do { if (_level < LLOG_LEVEL) { printf _args ; printf("\n"); } } while (0)
data/xrdp-0.9.12/librfxcodec/tests/rfxcodectest.c:333: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(out_file, F_OK) == 0)
data/xrdp-0.9.12/librfxcodec/tests/rfxencode.c:303: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(g_in_filename, argv[index]);
data/xrdp-0.9.12/librfxcodec/tests/rfxencode.c:308: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(g_out_filename, argv[index]);
data/xrdp-0.9.12/sesman/chansrv/chansrv_fuse.c:1477: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(fip->name, name);
data/xrdp-0.9.12/sesman/chansrv/chansrv_fuse.c:1794: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(fip->name, new_name);
data/xrdp-0.9.12/sesman/chansrv/chansrv_fuse.c:1894: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(fip->name, name);
data/xrdp-0.9.12/sesman/chansrv/chansrv_fuse.c:2548:13:  [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(result, name);
data/xrdp-0.9.12/sesman/chansrv/chansrv_xfs.c:465: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(xino->pub.name, name);
data/xrdp-0.9.12/sesman/chansrv/chansrv_xfs.c:893: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(xino->pub.name, name);
data/xrdp-0.9.12/sesman/chansrv/chansrv_xfs.c:902: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(xino->pub.name, name);
data/xrdp-0.9.12/sesman/chansrv/devredir.c:1180: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(irp->pathname, path);
data/xrdp-0.9.12/sesman/chansrv/devredir.c:1684: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(irp->pathname, old_name);
data/xrdp-0.9.12/sesman/chansrv/devredir.c:1686: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(irp->gen.rename.new_name, new_name);
data/xrdp-0.9.12/sesman/chansrv/pcsc/wrapper/winscard.c:82:5:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
    vsnprintf(text, 255, format, ap);
data/xrdp-0.9.12/sesman/chansrv/pcsc/xrdp_pcsc.c:66:35:  [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.
  do { if (_level < LLOG_LEVEL) { printf _args ; printf("\n"); } } while (0)
data/xrdp-0.9.12/sesman/tools/dis.c:60:5:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
    sprintf(sa.sun_path, XRDP_DISCONNECT_STR, dis);
data/xrdp-0.9.12/sesman/tools/dis.c:62:9:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
    if (access(sa.sun_path, F_OK) != 0)
data/xrdp-0.9.12/sesman/tools/sesadmin.c:120:15:  [4] (misc) getpass:
  This function is obsolete and not portable. It was in SUSv2 but removed by
  POSIX.2. What it does exactly varies considerably between systems,
  particularly in where its prompt is displayed and where it gets its data
  (e.g., /dev/tty, stdin, stderr, etc.). In addition, some implementations
  overflow buffers. (CWE-676, CWE-120, CWE-20). Make the specific calls to do
  exactly what you want. If you continue to use it, or write your own, be
  sure to zero the password as soon as possible to avoid leaving the
  cleartext password visible in the process' address space.
        pwd = getpass("password:");
data/xrdp-0.9.12/sesman/verify_user.c:92:13:  [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.
    epass = crypt(pass, encr);
data/xrdp-0.9.12/sesman/verify_user.c:291:12:  [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.
    encr = crypt(pln, salt);
data/xrdp-0.9.12/sesman/xauth.c:51: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.
    dp = popen(xauth_str, "r");
data/xrdp-0.9.12/tcutils/utils.cpp:79:9:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
        strcpy(buf, s.pos);
data/xrdp-0.9.12/tcutils/utils.cpp:125: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(s.pos, buf);
data/xrdp-0.9.12/tests/memtest/libmem.c:15:5:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    printf _params ; \
data/xrdp-0.9.12/tests/tcp_proxy/main.c:59: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, format, ap);
data/xrdp-0.9.12/tests/tcp_proxy/main.c:70: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, format, ap);
data/xrdp-0.9.12/xrdp/xrdp_wm.c:2155:5:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
    vsnprintf(msg, sizeof(msg), fmt, ap);
data/xrdp-0.9.12/xrdpapi/xrdpapi.c:28:36:  [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.
    do { if (_level < LOG_LEVEL) { printf _args ; printf("\n"); } } while (0)
data/xrdp-0.9.12/xrdpapi/xrdpapi.c:155:5:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
    snprintf(s.sun_path, bytes - 1, CHANSRV_API_STR, wts->display_num);
data/xrdp-0.9.12/common/os_calls.c:2063:5:  [3] (random) srand:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
    srand(g_time1());
data/xrdp-0.9.12/common/os_calls.c:3393: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.
    return getenv(name);
data/xrdp-0.9.12/sesman/chansrv/pcsc/wrapper/winscard.c:110: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.
    lib = LoadLibrary("winscard-org.dll");
data/xrdp-0.9.12/sesman/chansrv/pcsc/xrdp_pcsc.c:234:20:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    xrdp_session = getenv("XRDP_SESSION");
data/xrdp-0.9.12/sesman/chansrv/pcsc/xrdp_pcsc.c:241:20:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    xrdp_display = getenv("DISPLAY");
data/xrdp-0.9.12/sesman/chansrv/pcsc/xrdp_pcsc.c:248: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_str = getenv("HOME");
data/xrdp-0.9.12/sesman/tools/dis.c:49: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.
    display = getenv("DISPLAY");
data/xrdp-0.9.12/tests/memtest/memtest.c:19:3:  [3] (random) srand:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
  srand(time(0));
data/xrdp-0.9.12/xrdpapi/xrdpapi.c:121:20:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    display_text = getenv("DISPLAY");
data/xrdp-0.9.12/common/file.c:83: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 text[FILE_MAX_LINE_BYTES];
data/xrdp-0.9.12/common/log.c:62: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).
        ret = open(fname, O_WRONLY | O_CREAT | O_APPEND | O_SYNC,
data/xrdp-0.9.12/common/log.c:531:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buff[LOG_BUFFER_SIZE + 31]; /* 19 (datetime) 4 (space+cr+lf+\0) */
data/xrdp-0.9.12/common/os_calls.c:324: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(d_ptr, s_ptr, size);
data/xrdp-0.9.12/common/os_calls.c:665: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 sockname[128];
data/xrdp-0.9.12/common/os_calls.c:699: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[48];
data/xrdp-0.9.12/common/os_calls.c:777:33:  [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).
    sa.sin6_port = htons((tui16)atoi(port));
data/xrdp-0.9.12/common/os_calls.c:792: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).
    s.sin_port = htons((tui16)atoi(port));
data/xrdp-0.9.12/common/os_calls.c:807:33:  [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).
    sa.sin6_port = htons((tui16)atoi(port));
data/xrdp-0.9.12/common/os_calls.c:888: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).
    s.sin_port = htons((tui16)atoi(port));
data/xrdp-0.9.12/common/os_calls.c:972:33:  [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).
    sa.sin6_port = htons((tui16)atoi(port));
data/xrdp-0.9.12/common/os_calls.c:983: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).
    s.sin_port = htons((tui16)atoi(port));
data/xrdp-0.9.12/common/os_calls.c:1002: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).
    s.sin_port = htons((tui16)atoi(port));
data/xrdp-0.9.12/common/os_calls.c:1035:18:  [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).
    s.svm_port = atoi(port);
data/xrdp-0.9.12/common/os_calls.c:1053:18:  [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).
    s.svm_port = atoi(port);
data/xrdp-0.9.12/common/os_calls.c:1054: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).
    s.svm_cid = atoi(address);
data/xrdp-0.9.12/common/os_calls.c:1078:33:  [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).
    sa.sin6_port = htons((tui16)atoi(port));
data/xrdp-0.9.12/common/os_calls.c:1089: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).
    s.sin_port = htons((tui16)atoi(port));
data/xrdp-0.9.12/common/os_calls.c:1100:33:  [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).
    sa.sin6_port = htons((tui16)atoi(port));
data/xrdp-0.9.12/common/os_calls.c:1184: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 sz[7+15+1];
data/xrdp-0.9.12/common/os_calls.c:1207: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).
    s.sin_port = htons((tui16)atoi(port));
data/xrdp-0.9.12/common/os_calls.c:1230: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 msg[256];
data/xrdp-0.9.12/common/os_calls.c:1266: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[256];
data/xrdp-0.9.12/common/os_calls.c:1290: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 msg[256];
data/xrdp-0.9.12/common/os_calls.c:1785: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[4] = "sig";
data/xrdp-0.9.12/common/os_calls.c:1842: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[4];
data/xrdp-0.9.12/common/os_calls.c:2075: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/xrdp-0.9.12/common/os_calls.c:2079: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("/dev/random", O_RDONLY);
data/xrdp-0.9.12/common/os_calls.c:2120:11:  [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).
    rv =  open(file_name, O_RDWR | O_CREAT, S_IRUSR | S_IWUSR);
data/xrdp-0.9.12/common/os_calls.c:2125: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).
        rv =  open(file_name, O_RDONLY);
data/xrdp-0.9.12/common/os_calls.c:2165:11:  [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).
    rv =  open(file_name, flags, S_IRUSR | S_IWUSR);
data/xrdp-0.9.12/common/os_calls.c:2715: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(str);
data/xrdp-0.9.12/common/os_calls.c:3594: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 magic[2];
data/xrdp-0.9.12/common/os_calls.c:3676: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(filename, O_RDWR | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR);
data/xrdp-0.9.12/common/os_calls.c:3789: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.
static unsigned char g_reverse_byte[0x100] =
data/xrdp-0.9.12/common/os_calls.c:3891:35:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
    s.sin_port = htons((uint16_t) atoi(port));
data/xrdp-0.9.12/common/pixman-region.c:1713: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 (rit, ri, num_ri * sizeof (region_info_t));
data/xrdp-0.9.12/common/pixman-region.c:2507: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 (rects, boxes, sizeof(box_type_t) * count);
data/xrdp-0.9.12/common/ssl_calls.c:598: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/xrdp-0.9.12/common/trans.h:80: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 addr[256];
data/xrdp-0.9.12/common/trans.h:81: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 port[256];
data/xrdp-0.9.12/common/xrdp_client_info.h:57:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char hostname[32];
data/xrdp-0.9.12/common/xrdp_client_info.h:60:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char username[256];
data/xrdp-0.9.12/common/xrdp_client_info.h:61:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char password[256];
data/xrdp-0.9.12/common/xrdp_client_info.h:62:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char domain[256];
data/xrdp-0.9.12/common/xrdp_client_info.h:63:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char program[256];
data/xrdp-0.9.12/common/xrdp_client_info.h:64:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char directory[256];
data/xrdp-0.9.12/common/xrdp_client_info.h:74:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char client_ip[256];
data/xrdp-0.9.12/common/xrdp_client_info.h:91:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char rfx_prop[64];
data/xrdp-0.9.12/common/xrdp_client_info.h:94:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char ns_prop[64];
data/xrdp-0.9.12/common/xrdp_client_info.h:97:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char jpeg_prop[64];
data/xrdp-0.9.12/common/xrdp_client_info.h:100:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char orders[32];
data/xrdp-0.9.12/common/xrdp_client_info.h:106:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char client_addr[256];
data/xrdp-0.9.12/common/xrdp_client_info.h:107:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char client_port[256];
data/xrdp-0.9.12/common/xrdp_client_info.h:120:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char png_prop[64];
data/xrdp-0.9.12/common/xrdp_client_info.h:129:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char certificate[1024];
data/xrdp-0.9.12/common/xrdp_client_info.h:130:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char key_file[1024];
data/xrdp-0.9.12/common/xrdp_client_info.h:133:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char model[16];
data/xrdp-0.9.12/common/xrdp_client_info.h:134:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char layout[16];
data/xrdp-0.9.12/common/xrdp_client_info.h:135:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char variant[16];
data/xrdp-0.9.12/common/xrdp_client_info.h:136:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char options[256];
data/xrdp-0.9.12/common/xrdp_client_info.h:145:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char h264_prop[64];
data/xrdp-0.9.12/fontdump/fontdump.c:34: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 g_font_name[512] = "";
data/xrdp-0.9.12/fontdump/fontdump.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 text1[512];
data/xrdp-0.9.12/fontdump/fontdump.c:100: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 filename[256];
data/xrdp-0.9.12/fontdump/fontdump.c:101: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 text[256];
data/xrdp-0.9.12/genkeymap/genkeymap.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 text[256];
data/xrdp-0.9.12/genkeymap/genkeymap.c:55: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 *sections[8] = {
data/xrdp-0.9.12/genkeymap/genkeymap.c:69: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 wtext[256];
data/xrdp-0.9.12/genkeymap/genkeymap.c:118: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).
    outf = fopen(outfname, "w");
data/xrdp-0.9.12/keygen/keygen.c:346: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 filename[256];
data/xrdp-0.9.12/libpainter/src/painter.c:307: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(dst_ptr, src_ptr, cx * (bpp / 8));
data/xrdp-0.9.12/librfxcodec/src/rfxencode_alpha.c:50: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_plane, in_plane, cx);
data/xrdp-0.9.12/librfxcodec/src/rfxencode_alpha.c:96: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_plane, in_plane, cx);
data/xrdp-0.9.12/librfxcodec/src/rfxencode_alpha.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(s->p, colptr, lcollen);
data/xrdp-0.9.12/librfxcodec/src/rfxencode_alpha.c:176: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->p, colptr, collen);
data/xrdp-0.9.12/librfxcodec/src/rfxencode_alpha.c:273: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->p, plane, cx * cy);
data/xrdp-0.9.12/librfxcodec/src/rfxencode_compose.c:449: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->p, quantVals, numQuants * 5);
data/xrdp-0.9.12/librfxcodec/src/rfxencode_rgb_to_yuv.c:98: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(lr_buf, lr_buf - 64, 64);
data/xrdp-0.9.12/librfxcodec/src/rfxencode_rgb_to_yuv.c:99: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(lg_buf, lg_buf - 64, 64);
data/xrdp-0.9.12/librfxcodec/src/rfxencode_rgb_to_yuv.c:100: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(lb_buf, lb_buf - 64, 64);
data/xrdp-0.9.12/librfxcodec/src/rfxencode_rgb_to_yuv.c:134: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(lr_buf, lr_buf - 64, 64);
data/xrdp-0.9.12/librfxcodec/src/rfxencode_rgb_to_yuv.c:135: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(lg_buf, lg_buf - 64, 64);
data/xrdp-0.9.12/librfxcodec/src/rfxencode_rgb_to_yuv.c:136: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(lb_buf, lb_buf - 64, 64);
data/xrdp-0.9.12/librfxcodec/src/rfxencode_rgb_to_yuv.c:169: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(lr_buf, lr_buf - 64, 64);
data/xrdp-0.9.12/librfxcodec/src/rfxencode_rgb_to_yuv.c:170: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(lg_buf, lg_buf - 64, 64);
data/xrdp-0.9.12/librfxcodec/src/rfxencode_rgb_to_yuv.c:171: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(lb_buf, lb_buf - 64, 64);
data/xrdp-0.9.12/librfxcodec/src/rfxencode_rgb_to_yuv.c:204: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(lr_buf, lr_buf - 64, 64);
data/xrdp-0.9.12/librfxcodec/src/rfxencode_rgb_to_yuv.c:205: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(lg_buf, lg_buf - 64, 64);
data/xrdp-0.9.12/librfxcodec/src/rfxencode_rgb_to_yuv.c:206: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(lb_buf, lb_buf - 64, 64);
data/xrdp-0.9.12/librfxcodec/src/rfxencode_rgb_to_yuv.c:273: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(la_buf, la_buf - 64, 64);
data/xrdp-0.9.12/librfxcodec/src/rfxencode_rgb_to_yuv.c:274: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(lr_buf, lr_buf - 64, 64);
data/xrdp-0.9.12/librfxcodec/src/rfxencode_rgb_to_yuv.c:275: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(lg_buf, lg_buf - 64, 64);
data/xrdp-0.9.12/librfxcodec/src/rfxencode_rgb_to_yuv.c:276: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(lb_buf, lb_buf - 64, 64);
data/xrdp-0.9.12/librfxcodec/src/rfxencode_rgb_to_yuv.c:314: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(la_buf, la_buf - 64, 64);
data/xrdp-0.9.12/librfxcodec/src/rfxencode_rgb_to_yuv.c:315: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(lr_buf, lr_buf - 64, 64);
data/xrdp-0.9.12/librfxcodec/src/rfxencode_rgb_to_yuv.c:316: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(lg_buf, lg_buf - 64, 64);
data/xrdp-0.9.12/librfxcodec/src/rfxencode_rgb_to_yuv.c:317: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(lb_buf, lb_buf - 64, 64);
data/xrdp-0.9.12/librfxcodec/src/rfxencode_rgb_to_yuv.c:350: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(lr_buf, lr_buf - 64, 64);
data/xrdp-0.9.12/librfxcodec/src/rfxencode_rgb_to_yuv.c:351: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(lg_buf, lg_buf - 64, 64);
data/xrdp-0.9.12/librfxcodec/src/rfxencode_rgb_to_yuv.c:352: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(lb_buf, lb_buf - 64, 64);
data/xrdp-0.9.12/librfxcodec/src/rfxencode_rgb_to_yuv.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(lr_buf, lr_buf - 64, 64);
data/xrdp-0.9.12/librfxcodec/src/rfxencode_rgb_to_yuv.c:386: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(lg_buf, lg_buf - 64, 64);
data/xrdp-0.9.12/librfxcodec/src/rfxencode_rgb_to_yuv.c:387: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(lb_buf, lb_buf - 64, 64);
data/xrdp-0.9.12/librfxcodec/tests/rfxcodectest.c:88: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/xrdp-0.9.12/librfxcodec/tests/rfxcodectest.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 magic[2];
data/xrdp-0.9.12/librfxcodec/tests/rfxcodectest.c:324: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).
    in_fd = open(in_file, O_RDONLY);
data/xrdp-0.9.12/librfxcodec/tests/rfxcodectest.c:338: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).
        out_fd = open(out_file, O_RDWR | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR);
data/xrdp-0.9.12/librfxcodec/tests/rfxcodectest.c:404: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 in_file[256];
data/xrdp-0.9.12/librfxcodec/tests/rfxcodectest.c:405: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_file[256];
data/xrdp-0.9.12/librfxcodec/tests/rfxcodectest.c:426: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).
            count = atoi(argv[index]);
data/xrdp-0.9.12/librfxcodec/tests/rfxencode.c:37: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 g_in_filename[256] = "";
data/xrdp-0.9.12/librfxcodec/tests/rfxencode.c:38: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 g_out_filename[256] = "";
data/xrdp-0.9.12/librfxcodec/tests/rfxencode.c:45: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 magic[2];
data/xrdp-0.9.12/librfxcodec/tests/rfxencode.c:87:10:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    fd = open(file_name, O_RDONLY);
data/xrdp-0.9.12/librfxcodec/tests/rfxencode.c:260: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).
            out_fd = open(g_out_filename, O_RDWR | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR);
data/xrdp-0.9.12/librfxcodec/tests/rfxencode.c:313:23:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
            g_count = atoi(argv[index]);
data/xrdp-0.9.12/libxrdp/libxrdp.h: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 name[16];
data/xrdp-0.9.12/libxrdp/libxrdp.h:102: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 server_random[32];
data/xrdp-0.9.12/libxrdp/libxrdp.h:103: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 client_random[256];
data/xrdp-0.9.12/libxrdp/libxrdp.h:104: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 client_crypt_random[256 + 8]; /* 64 + 8, 256 + 8 */
data/xrdp-0.9.12/libxrdp/libxrdp.h:109: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 decrypt_key[16];
data/xrdp-0.9.12/libxrdp/libxrdp.h:110: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 encrypt_key[16];
data/xrdp-0.9.12/libxrdp/libxrdp.h:111: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 decrypt_update_key[16];
data/xrdp-0.9.12/libxrdp/libxrdp.h:112: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 encrypt_update_key[16];
data/xrdp-0.9.12/libxrdp/libxrdp.h:116: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 sign_key[16];
data/xrdp-0.9.12/libxrdp/libxrdp.h:119: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 pub_exp[4];
data/xrdp-0.9.12/libxrdp/libxrdp.h:120: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 pub_mod[256];
data/xrdp-0.9.12/libxrdp/libxrdp.h:121: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 pub_sig[64];
data/xrdp-0.9.12/libxrdp/libxrdp.h:122: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 pri_exp[256];
data/xrdp-0.9.12/libxrdp/libxrdp.h:124:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char fips_encrypt_key[24];
data/xrdp-0.9.12/libxrdp/libxrdp.h:125: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 fips_decrypt_key[24];
data/xrdp-0.9.12/libxrdp/libxrdp.h:126: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 fips_sign_key[20];
data/xrdp-0.9.12/libxrdp/libxrdpinc.h: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 pattern[8];
data/xrdp-0.9.12/libxrdp/xrdp_bitmap_compress.c:659: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 fom_mask[8192]; /* good for up to 64K bitmap */
data/xrdp-0.9.12/libxrdp/xrdp_caps.c:109: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 order_caps[32];
data/xrdp-0.9.12/libxrdp/xrdp_iso.c:314: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 text[256];
data/xrdp-0.9.12/libxrdp/xrdp_rdp.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 cfg_file[256];
data/xrdp-0.9.12/libxrdp/xrdp_sec.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 hex[16];
data/xrdp-0.9.12/libxrdp/xrdp_sec.c:240: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 keyboard_cfg_file[256] = { 0 };
data/xrdp-0.9.12/libxrdp/xrdp_sec.c:241: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 rdp_layout[256] = { 0 };
data/xrdp-0.9.12/libxrdp/xrdp_sec.c:271: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 section_rdp_layouts[256] = { 0 };
data/xrdp-0.9.12/libxrdp/xrdp_sec.c:272: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 section_layouts_map[256] = { 0 };
data/xrdp-0.9.12/libxrdp/xrdp_sec.c:533: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 shasig[20];
data/xrdp-0.9.12/libxrdp/xrdp_sec.c:676: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 tmpdata[256];
data/xrdp-0.9.12/libxrdp/xrdp_sec.c:987: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 pad[4];
data/xrdp-0.9.12/libxrdp/xrdp_sec.c:988: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 sha1_sig[20];
data/xrdp-0.9.12/libxrdp/xrdp_sec.c:989: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 md5_sig[16];
data/xrdp-0.9.12/libxrdp/xrdp_sec.c:1077: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 server_encrypt_key[32];
data/xrdp-0.9.12/libxrdp/xrdp_sec.c:1078: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 server_decrypt_key[32];
data/xrdp-0.9.12/libxrdp/xrdp_sec.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 session_key[48];
data/xrdp-0.9.12/libxrdp/xrdp_sec.c:1123: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 temp_hash[48];
data/xrdp-0.9.12/libxrdp/xrdp_sec.c:1124: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 input[48];
data/xrdp-0.9.12/libxrdp/xrdp_sec.c:1391: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[20];
data/xrdp-0.9.12/libxrdp/xrdp_sec.c:1392: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 lenhdr[4];
data/xrdp-0.9.12/libxrdp/xrdp_sec.c:1408: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 shasig[20];
data/xrdp-0.9.12/libxrdp/xrdp_sec.c:1409: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 md5sig[16];
data/xrdp-0.9.12/libxrdp/xrdp_sec.c:1410: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 lenhdr[4];
data/xrdp-0.9.12/libxrdp/xrdp_sec.c:1536: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 save[8];
data/xrdp-0.9.12/libxrdp/xrdp_sec.c:1608: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 clientName[INFO_CLIENT_NAME_BYTES / 2] = { '\0' };
data/xrdp-0.9.12/libxrdp/xrdp_sec.c:2255: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 key_file[256];
data/xrdp-0.9.12/neutrinordp/xrdp-neutrinordp.c:112: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[128];
data/xrdp-0.9.12/neutrinordp/xrdp-neutrinordp.c:1340: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(mod->pointer_cache[index].data,
data/xrdp-0.9.12/neutrinordp/xrdp-neutrinordp.c:1343: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(mod->pointer_cache[index].mask,
data/xrdp-0.9.12/neutrinordp/xrdp-neutrinordp.c:1465: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_name[256];
data/xrdp-0.9.12/neutrinordp/xrdp-neutrinordp.h:49: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 b8x8[8];
data/xrdp-0.9.12/neutrinordp/xrdp-neutrinordp.h:56: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 data[32 * 32 * 4];
data/xrdp-0.9.12/neutrinordp/xrdp-neutrinordp.h:57: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 mask[32 * 32 / 8];
data/xrdp-0.9.12/neutrinordp/xrdp-neutrinordp.h:199: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 username[256];
data/xrdp-0.9.12/neutrinordp/xrdp-neutrinordp.h: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 password[256];
data/xrdp-0.9.12/neutrinordp/xrdp-neutrinordp.h:201: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 domain[256];
data/xrdp-0.9.12/sesman/chansrv/chansrv.c:1231: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 port[256];
data/xrdp-0.9.12/sesman/chansrv/chansrv.c:1269: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 port[256];
data/xrdp-0.9.12/sesman/chansrv/chansrv.c:1564: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 host[256];
data/xrdp-0.9.12/sesman/chansrv/chansrv.c:1565: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 disp[256];
data/xrdp-0.9.12/sesman/chansrv/chansrv.c:1566: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 scre[256];
data/xrdp-0.9.12/sesman/chansrv/chansrv.c:1630: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 filename[256];
data/xrdp-0.9.12/sesman/chansrv/chansrv.c:1780: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 text[256];
data/xrdp-0.9.12/sesman/chansrv/chansrv.c:1781: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 log_path[256];
data/xrdp-0.9.12/sesman/chansrv/chansrv.c:1783: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 log_file[256];
data/xrdp-0.9.12/sesman/chansrv/chansrv.h:31: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[16];
data/xrdp-0.9.12/sesman/chansrv/chansrv_fuse.c:20:1:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
char g_fuse_root_path[256] = "";
data/xrdp-0.9.12/sesman/chansrv/chansrv_fuse.c:21:1:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
char g_fuse_clipboard_path[256] = ""; /* for clipboard use */
data/xrdp-0.9.12/sesman/chansrv/chansrv_fuse.c:180: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/xrdp-0.9.12/sesman/chansrv/chansrv_fuse.c:202: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[XFS_MAXFILENAMELEN];
data/xrdp-0.9.12/sesman/chansrv/chansrv_fuse.c:241: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[XFS_MAXFILENAMELEN];
data/xrdp-0.9.12/sesman/chansrv/chansrv_fuse.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              name[XFS_MAXFILENAMELEN];
data/xrdp-0.9.12/sesman/chansrv/chansrv_fuse.c:312: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 g_fuse_mount_name[256] = "xrdp_client";
data/xrdp-0.9.12/sesman/chansrv/chansrv_fuse.c:407: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 cfg_file[256];
data/xrdp-0.9.12/sesman/chansrv/chansrv_xfs.c:366: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(xino2->pub.name, ".delete-pending");
data/xrdp-0.9.12/sesman/chansrv/chansrv_xfs.c:581:21:  [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(end + 1, p->pub.name, len);
data/xrdp-0.9.12/sesman/chansrv/chansrv_xfs.h:50: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[XFS_MAXFILENAMELEN + 1]; /* Short name             */
data/xrdp-0.9.12/sesman/chansrv/clipboard.c:288: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 g_last_atom_name[256] = "";
data/xrdp-0.9.12/sesman/chansrv/clipboard.c:327: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 no_text[4];
data/xrdp-0.9.12/sesman/chansrv/clipboard.c:1021: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 desc[256];
data/xrdp-0.9.12/sesman/chansrv/clipboard_common.h:127: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 cFileName[256];
data/xrdp-0.9.12/sesman/chansrv/clipboard_file.c:93: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 pathname[256];
data/xrdp-0.9.12/sesman/chansrv/clipboard_file.c:94: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 filename[256];
data/xrdp-0.9.12/sesman/chansrv/clipboard_file.c:129: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 lfilename[256];
data/xrdp-0.9.12/sesman/chansrv/clipboard_file.c:130: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 jchr[8];
data/xrdp-0.9.12/sesman/chansrv/clipboard_file.c:167: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 full_fn[256]; /* /etc/xrdp/xrdp.ini */
data/xrdp-0.9.12/sesman/chansrv/clipboard_file.c:168: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 filename[256]; /* xrdp.ini */
data/xrdp-0.9.12/sesman/chansrv/clipboard_file.c:169: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 pathname[256]; /* /etc/xrdp */
data/xrdp-0.9.12/sesman/chansrv/clipboard_file.c:244: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 file[512];
data/xrdp-0.9.12/sesman/chansrv/clipboard_file.c:292:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char fn[256];
data/xrdp-0.9.12/sesman/chansrv/clipboard_file.c:432: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 full_fn[256];
data/xrdp-0.9.12/sesman/chansrv/devredir.c:139:1:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
char g_full_name_for_filesystem[1024];
data/xrdp-0.9.12/sesman/chansrv/devredir.c:193: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[4];
data/xrdp-0.9.12/sesman/chansrv/devredir.c:197: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/urandom", O_RDONLY)) != -1)
data/xrdp-0.9.12/sesman/chansrv/devredir.c:711: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           upath[4096]; // LK_TODO need to malloc this
data/xrdp-0.9.12/sesman/chansrv/devredir.c:831: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  preferred_dos_name[9];
data/xrdp-0.9.12/sesman/chansrv/devredir.c:1091: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[256];
data/xrdp-0.9.12/sesman/chansrv/devredir.c:1209:13:  [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(irp->pathname, "\\*");
data/xrdp-0.9.12/sesman/chansrv/pcsc/wrapper/winscard.c:79: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 text[256];
data/xrdp-0.9.12/sesman/chansrv/pcsc/wrapper/winscard.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 text[256];
data/xrdp-0.9.12/sesman/chansrv/pcsc/wrapper/winscard.c:723: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 text[8148];
data/xrdp-0.9.12/sesman/chansrv/pcsc/xrdp_pcsc.c:47: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 rgbAtr[MAX_ATR_SIZE];
data/xrdp-0.9.12/sesman/chansrv/pcsc/xrdp_pcsc.c:110: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 g_error_str[512];
data/xrdp-0.9.12/sesman/chansrv/pcsc/xrdp_pcsc.c:166:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char host[256];
data/xrdp-0.9.12/sesman/chansrv/pcsc/xrdp_pcsc.c:167: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 disp[256];
data/xrdp-0.9.12/sesman/chansrv/pcsc/xrdp_pcsc.c:168: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 scre[256];
data/xrdp-0.9.12/sesman/chansrv/pcsc/xrdp_pcsc.c:212:10:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
    rv = atoi(disp);
data/xrdp-0.9.12/sesman/chansrv/pcsc/xrdp_pcsc.c:295: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[8];
data/xrdp-0.9.12/sesman/chansrv/pcsc/xrdp_pcsc.c:320: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[8];
data/xrdp-0.9.12/sesman/chansrv/pcsc/xrdp_pcsc.c:412: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 msg[256];
data/xrdp-0.9.12/sesman/chansrv/pcsc/xrdp_pcsc.c:457: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 msg[256];
data/xrdp-0.9.12/sesman/chansrv/pcsc/xrdp_pcsc.c:510: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 msg[256];
data/xrdp-0.9.12/sesman/chansrv/pcsc/xrdp_pcsc.c:534: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 + offset, szReader, bytes);
data/xrdp-0.9.12/sesman/chansrv/pcsc/xrdp_pcsc.c:586: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 msg[256];
data/xrdp-0.9.12/sesman/chansrv/pcsc/xrdp_pcsc.c:626: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 msg[256];
data/xrdp-0.9.12/sesman/chansrv/pcsc/xrdp_pcsc.c:669: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 msg[256];
data/xrdp-0.9.12/sesman/chansrv/pcsc/xrdp_pcsc.c:771: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(mszReaderName, msg + offset, to_copy);
data/xrdp-0.9.12/sesman/chansrv/pcsc/xrdp_pcsc.c:789: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(pbAtr, msg + offset, *pcbAtrLen);
data/xrdp-0.9.12/sesman/chansrv/pcsc/xrdp_pcsc.c:814: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 atr[36];
data/xrdp-0.9.12/sesman/chansrv/pcsc/xrdp_pcsc.c:847: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(atr, rgReaderStates[index].rgbAtr, 33);
data/xrdp-0.9.12/sesman/chansrv/pcsc/xrdp_pcsc.c:852: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(msg + offset, rname, str_len);
data/xrdp-0.9.12/sesman/chansrv/pcsc/xrdp_pcsc.c:864: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(msg + offset, atr, 36);
data/xrdp-0.9.12/sesman/chansrv/pcsc/xrdp_pcsc.c:910: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(rgReaderStates[index].rgbAtr, msg + offset, 33);
data/xrdp-0.9.12/sesman/chansrv/pcsc/xrdp_pcsc.c:929: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(rgReaderStates[index].rgbAtr, msg + offset, 33);
data/xrdp-0.9.12/sesman/chansrv/pcsc/xrdp_pcsc.c:980: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 + offset, pbSendBuffer, cbSendLength);
data/xrdp-0.9.12/sesman/chansrv/pcsc/xrdp_pcsc.c:1008: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(pbRecvBuffer, msg + offset, *lpBytesReturned);
data/xrdp-0.9.12/sesman/chansrv/pcsc/xrdp_pcsc.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(msg + offset, pioSendPci + 1, extra_len);
data/xrdp-0.9.12/sesman/chansrv/pcsc/xrdp_pcsc.c:1065: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 + offset, pbSendBuffer, cbSendLength);
data/xrdp-0.9.12/sesman/chansrv/pcsc/xrdp_pcsc.c:1088: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(msg + offset, pioRecvPci + 1, extra_len);
data/xrdp-0.9.12/sesman/chansrv/pcsc/xrdp_pcsc.c:1134: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(pbRecvBuffer, msg + offset, *pcbRecvLength);
data/xrdp-0.9.12/sesman/chansrv/pcsc/xrdp_pcsc.c:1173: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 reader[100];
data/xrdp-0.9.12/sesman/chansrv/pcsc/xrdp_pcsc.c:1198: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 + offset, mszGroups, bytes_groups);
data/xrdp-0.9.12/sesman/chansrv/pcsc/xrdp_pcsc.c:1234: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(reader, msg + offset, 100);
data/xrdp-0.9.12/sesman/chansrv/pcsc/xrdp_pcsc.c:1236: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(reader_names + reader_names_index, reader, bytes);
data/xrdp-0.9.12/sesman/chansrv/pcsc/xrdp_pcsc.c:1258: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(mszReaders, reader_names, reader_names_index);
data/xrdp-0.9.12/sesman/chansrv/pcsc/xrdp_pcsc.c:1282: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 msg[256];
data/xrdp-0.9.12/sesman/chansrv/smartcard.h:61: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   reader_name[128];
data/xrdp-0.9.12/sesman/chansrv/smartcard_pcsc.c:66: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 card[16];   /* client card */
data/xrdp-0.9.12/sesman/chansrv/smartcard_pcsc.c:73: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 context[16];   /* client context */
data/xrdp-0.9.12/sesman/chansrv/smartcard_pcsc.c:89: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 g_pcsclite_ipc_dir[256] = "";
data/xrdp-0.9.12/sesman/chansrv/smartcard_pcsc.c:90: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 g_pcsclite_ipc_file[256] = "";
data/xrdp-0.9.12/sesman/chansrv/smartcard_pcsc.c:462: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 context[16];
data/xrdp-0.9.12/sesman/chansrv/smartcard_pcsc.c:638: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           lreader_name[16][100];
data/xrdp-0.9.12/sesman/chansrv/smartcard_pcsc.c:1351: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 attr[32];
data/xrdp-0.9.12/sesman/chansrv/smartcard_pcsc.c:1353: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 lreader_name[100];
data/xrdp-0.9.12/sesman/chansrv/sound.c:85: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 g_buffer[MAX_BBUF_SIZE];
data/xrdp-0.9.12/sesman/chansrv/sound.c:1819: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 port[1024];
data/xrdp-0.9.12/sesman/chansrv/sound.c:1836: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 port[1024];
data/xrdp-0.9.12/sesman/chansrv/xcommon.c:61: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 text[256];
data/xrdp-0.9.12/sesman/config.c:47: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 cfg_file[256];
data/xrdp-0.9.12/sesman/config.h:193:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char listen_address[32];
data/xrdp-0.9.12/sesman/config.h:198:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char listen_port[16];
data/xrdp-0.9.12/sesman/config.h:213:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char user_wm[32];
data/xrdp-0.9.12/sesman/env.c:38: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.
extern unsigned char g_fixedkey[8]; /* in sesman.c */
data/xrdp-0.9.12/sesman/env.c:45: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 encryptedPasswd[16];
data/xrdp-0.9.12/sesman/env.c:46: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 key[24];
data/xrdp-0.9.12/sesman/env.c:47: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 passwd_hash[20];
data/xrdp-0.9.12/sesman/env.c:48: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 passwd_hash_text[40];
data/xrdp-0.9.12/sesman/env.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 text[256];
data/xrdp-0.9.12/sesman/env.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 hostname[256];
data/xrdp-0.9.12/sesman/libscp/libscp_types.h:81:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char  locale[18];
data/xrdp-0.9.12/sesman/libscp/libscp_v0.c:248: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[STRING16_MAX_LEN + 1];
data/xrdp-0.9.12/sesman/libscp/libscp_v1c_mng.c:370: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[257];
data/xrdp-0.9.12/sesman/libscp/libscp_v1s.c:104: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];
data/xrdp-0.9.12/sesman/libscp/libscp_v1s.c:361: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];
data/xrdp-0.9.12/sesman/libscp/libscp_v1s_mng.c:104: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];
data/xrdp-0.9.12/sesman/sesman.c:35:10:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
unsigned char g_fixedkey[8] = { 23, 82, 107, 6, 35, 78, 88, 7 };
data/xrdp-0.9.12/sesman/sesman.c:202: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 pid_s[32];
data/xrdp-0.9.12/sesman/sesman.c:203:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char text[256];
data/xrdp-0.9.12/sesman/sesman.c:204: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 pid_file[256];
data/xrdp-0.9.12/sesman/sesman.c:205: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 cfg_file[256];
data/xrdp-0.9.12/sesman/session.c:50: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.
extern unsigned char g_fixedkey[8];
data/xrdp-0.9.12/sesman/session.c:170: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 text[256];
data/xrdp-0.9.12/sesman/session.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 text[256];
data/xrdp-0.9.12/sesman/session.c:357: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 exe_path[262];
data/xrdp-0.9.12/sesman/session.c:402: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 geometry[32];
data/xrdp-0.9.12/sesman/session.c:403: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 depth[32];
data/xrdp-0.9.12/sesman/session.c:404: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 screen[32]; /* display number */
data/xrdp-0.9.12/sesman/session.c:405: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 text[256];
data/xrdp-0.9.12/sesman/session.c:406: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 execvpparams[2048];
data/xrdp-0.9.12/sesman/session.c:414: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 authfile[256]; /* The filename for storing xauth informations */
data/xrdp-0.9.12/sesman/session.c:717: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 guid_str[64];
data/xrdp-0.9.12/sesman/session.c:1147: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 file[256];
data/xrdp-0.9.12/sesman/session.h:62:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char name[256];
data/xrdp-0.9.12/sesman/session.h:78:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char client_ip[256];
data/xrdp-0.9.12/sesman/sig.c:44: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 pid_file[256];
data/xrdp-0.9.12/sesman/sig.c:70: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 cfg_file[256];
data/xrdp-0.9.12/sesman/sig.c:111: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/xrdp-0.9.12/sesman/tools/sesadmin.c:34:1:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
char user[257];
data/xrdp-0.9.12/sesman/tools/sesadmin.c:35:1:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
char pass[257];
data/xrdp-0.9.12/sesman/tools/sesadmin.c:36:1:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
char cmnd[257];
data/xrdp-0.9.12/sesman/tools/sesadmin.c:37:1:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
char serv[257];
data/xrdp-0.9.12/sesman/tools/sesadmin.c:38:1:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
char port[257];
data/xrdp-0.9.12/sesman/tools/sestest.c:37: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];
data/xrdp-0.9.12/sesman/tools/tcp.c:147:24:  [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).
    s.sin_port = htons(atoi(port));
data/xrdp-0.9.12/sesman/verify_user.c:193: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 hash[35] = "";
data/xrdp-0.9.12/sesman/verify_user.c:221: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).
        fd = fopen("/etc/passwd", "rw");
data/xrdp-0.9.12/sesman/verify_user.c:245: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).
        fd = fopen("/etc/shadow", "rw");
data/xrdp-0.9.12/sesman/verify_user.c:265: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 salt[13] = "$1$";
data/xrdp-0.9.12/sesman/verify_user_pam.c:39: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 user[256];
data/xrdp-0.9.12/sesman/verify_user_pam.c:40: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 pass[256];
data/xrdp-0.9.12/sesman/verify_user_pam.c:114: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 service_name[256];
data/xrdp-0.9.12/sesman/verify_user_pam.c: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 display[256];
data/xrdp-0.9.12/sesman/verify_user_pam.c:284: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 item[256];
data/xrdp-0.9.12/sesman/verify_user_pam.c:285: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 value[256];
data/xrdp-0.9.12/sesman/xauth.c:40: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 cookie_str[33];
data/xrdp-0.9.12/sesman/xauth.c:41: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 cookie_bin[16];
data/xrdp-0.9.12/sesman/xauth.c:42: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 xauth_str[256];
data/xrdp-0.9.12/tcutils/utils.cpp: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[2048];
data/xrdp-0.9.12/tests/gtcp_proxy/gtcp-proxy.c:233: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 * 32];
data/xrdp-0.9.12/tests/gtcp_proxy/gtcp-proxy.c:567:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buf[128];
data/xrdp-0.9.12/tests/gtcp_proxy/gtcp-proxy.c:569: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(buf, "%d", count);
data/xrdp-0.9.12/tests/gtcp_proxy/gtcp-proxy.c:586:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buf[128];
data/xrdp-0.9.12/tests/gtcp_proxy/gtcp-proxy.c:588: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(buf, "%d", count);
data/xrdp-0.9.12/tests/gtcp_proxy/gtcp.c:99:35:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
    s.sin_port = htons((uint16_t) atoi(port));
data/xrdp-0.9.12/tests/gtcp_proxy/gtcp.c:129: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 ipAddr[256] ;
data/xrdp-0.9.12/tests/gtcp_proxy/gtcp.c:233:35:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
    s.sin_port = htons((uint16_t) atoi(port));
data/xrdp-0.9.12/tests/gtcp_proxy/hexdump.c:34: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[80];
data/xrdp-0.9.12/tests/tcp_proxy/main.c:38: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 g_buf[1024 * 32];
data/xrdp-0.9.12/tests/tcp_proxy/main.c:181: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).
  s.sin_port = htons((tui16)atoi(port));
data/xrdp-0.9.12/tests/tcp_proxy/main.c:312: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).
    s.sin_port = htons((tui16)atoi(port));
data/xrdp-0.9.12/vnc/vnc.c:63: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 key[24];
data/xrdp-0.9.12/vnc/vnc.c:84: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 passwd_hash[20];
data/xrdp-0.9.12/vnc/vnc.c:85: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 passwd_hash_text[40];
data/xrdp-0.9.12/vnc/vnc.c:595: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 cursor_data[32 * (32 * 3)];
data/xrdp-0.9.12/vnc/vnc.c:596: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 cursor_mask[32 * (32 / 8)];
data/xrdp-0.9.12/vnc/vnc.c:597: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 text[256];
data/xrdp-0.9.12/vnc/vnc.c:899: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 text[256];
data/xrdp-0.9.12/vnc/vnc.c:951: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 init_data[12] = { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
data/xrdp-0.9.12/vnc/vnc.c:1003: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 cursor_data[32 * (32 * 3)];
data/xrdp-0.9.12/vnc/vnc.c:1004: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 cursor_mask[32 * (32 / 8)];
data/xrdp-0.9.12/vnc/vnc.c:1005: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 con_port[256];
data/xrdp-0.9.12/vnc/vnc.c:1006: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 text[256];
data/xrdp-0.9.12/vnc/vnc.c:1109: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 guid_str[64];
data/xrdp-0.9.12/vnc/vnc.h:105:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char mod_name[256];
data/xrdp-0.9.12/vnc/vnc.h:109:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char username[256];
data/xrdp-0.9.12/vnc/vnc.h:110:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char password[256];
data/xrdp-0.9.12/vnc/vnc.h:111:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char ip[256];
data/xrdp-0.9.12/vnc/vnc.h:112:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char port[256];
data/xrdp-0.9.12/vrplayer/mainwindow.cpp:435: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[20];
data/xrdp-0.9.12/vrplayer/mainwindow.cpp:456: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(buf, "%.2d:%.2d:%.2d", hours, minutes, secs);
data/xrdp-0.9.12/vrplayer/mainwindow.cpp:469: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[20];
data/xrdp-0.9.12/vrplayer/mainwindow.cpp:497: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(buf, "%.2d:%.2d:%.2d", hours, minutes, secs);
data/xrdp-0.9.12/xrdp/xrdp.c:179: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 text[256];
data/xrdp-0.9.12/xrdp/xrdp.c:273: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[128];
data/xrdp-0.9.12/xrdp/xrdp.c:274: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 value[128];
data/xrdp-0.9.12/xrdp/xrdp.c:359: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 key_file[256];
data/xrdp-0.9.12/xrdp/xrdp.c:420: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 cfg_file[256];
data/xrdp-0.9.12/xrdp/xrdp.c:426: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 text[256];
data/xrdp-0.9.12/xrdp/xrdp.c:427: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 pid_file[256];
data/xrdp-0.9.12/xrdp/xrdp_bitmap.c:444: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 type1[4];
data/xrdp-0.9.12/xrdp/xrdp_bitmap.c:911: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 hash_data[16];
data/xrdp-0.9.12/xrdp/xrdp_bitmap.c:1372: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 text[256];
data/xrdp-0.9.12/xrdp/xrdp_encoder.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 buf[1024];
data/xrdp-0.9.12/xrdp/xrdp_font.c:81: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 file_path[256];
data/xrdp-0.9.12/xrdp/xrdp_listen.c:41: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 text[256];
data/xrdp-0.9.12/xrdp/xrdp_listen.c:167: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 cfg_file[256];
data/xrdp-0.9.12/xrdp/xrdp_listen.c:664: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 address[128];
data/xrdp-0.9.12/xrdp/xrdp_listen.c:665: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 port[128];
data/xrdp-0.9.12/xrdp/xrdp_login_wnd.c:284: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 index[2];
data/xrdp-0.9.12/xrdp/xrdp_login_wnd.c:347: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 resultIP[256];
data/xrdp-0.9.12/xrdp/xrdp_login_wnd.c:561: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[256];
data/xrdp-0.9.12/xrdp/xrdp_login_wnd.c:562: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 cfg_file[256];
data/xrdp-0.9.12/xrdp/xrdp_login_wnd.c:639: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];
data/xrdp-0.9.12/xrdp/xrdp_login_wnd.c:640: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 buf1[256];
data/xrdp-0.9.12/xrdp/xrdp_login_wnd.c:641: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 resultIP[256];
data/xrdp-0.9.12/xrdp/xrdp_login_wnd.c:730: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[256] ;
data/xrdp-0.9.12/xrdp/xrdp_login_wnd.c:844: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];
data/xrdp-0.9.12/xrdp/xrdp_mm.c:336: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 lib[256];
data/xrdp-0.9.12/xrdp/xrdp_mm.c:337: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 text[256];
data/xrdp-0.9.12/xrdp/xrdp_mm.c:492: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 text[256];
data/xrdp-0.9.12/xrdp/xrdp_mm.c:642: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 chan_name[256];
data/xrdp-0.9.12/xrdp/xrdp_mm.c:1562: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 ip[256];
data/xrdp-0.9.12/xrdp/xrdp_mm.c:1563: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 port[256];
data/xrdp-0.9.12/xrdp/xrdp_mm.c:1627: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 cfg_file[256];
data/xrdp-0.9.12/xrdp/xrdp_mm.c:1797: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 port[8];
data/xrdp-0.9.12/xrdp/xrdp_mm.c:2171: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 ip[256];
data/xrdp-0.9.12/xrdp/xrdp_mm.c:2172: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 port[8];
data/xrdp-0.9.12/xrdp/xrdp_mm.c:2173: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 chansrvport[256];
data/xrdp-0.9.12/xrdp/xrdp_mm.c:2176: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 pam_auth_sessionIP[256];
data/xrdp-0.9.12/xrdp/xrdp_mm.c:2177: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 pam_auth_password[256];
data/xrdp-0.9.12/xrdp/xrdp_mm.c:2178: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 pam_auth_username[256];
data/xrdp-0.9.12/xrdp/xrdp_mm.c:2180: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 username[256];
data/xrdp-0.9.12/xrdp/xrdp_mm.c:2181: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 password[256];
data/xrdp-0.9.12/xrdp/xrdp_mm.c:2246: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 pam_error[128];
data/xrdp-0.9.12/xrdp/xrdp_mm.c:2432: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 tag[4];
data/xrdp-0.9.12/xrdp/xrdp_process.c:35: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 event_name[256];
data/xrdp-0.9.12/xrdp/xrdp_types.h:214:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char data[32 * 32 * 4];
data/xrdp-0.9.12/xrdp/xrdp_types.h:215:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char mask[32 * 32 / 8];
data/xrdp-0.9.12/xrdp/xrdp_types.h:224:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char pattern[8];
data/xrdp-0.9.12/xrdp/xrdp_types.h:383:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char pamerrortxt[256];
data/xrdp-0.9.12/xrdp/xrdp_types.h:517:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char name[32];
data/xrdp-0.9.12/xrdp/xrdp_types.h:531:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char port[1024];
data/xrdp-0.9.12/xrdp/xrdp_types.h:562: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 autorun[256];
data/xrdp-0.9.12/xrdp/xrdp_types.h:587: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 ls_logo_filename[256];  /* logo filename */
data/xrdp-0.9.12/xrdp/xrdp_types.h:588: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 ls_background_image[256];  /* background image file name */
data/xrdp-0.9.12/xrdp/xrdp_types.h:604: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 ls_title[256];          /* loginscreen window title */
data/xrdp-0.9.12/xrdp/xrdp_wm.c:48: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 event_name[256];
data/xrdp-0.9.12/xrdp/xrdp_wm.c:398: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 cfg_file[256];
data/xrdp-0.9.12/xrdp/xrdp_wm.c:541: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 file_path[256];
data/xrdp-0.9.12/xrdp/xrdp_wm.c:568: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 param[256];
data/xrdp-0.9.12/xrdp/xrdp_wm.c:569: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 default_section_name[256];
data/xrdp-0.9.12/xrdp/xrdp_wm.c:570: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 section_name[256];
data/xrdp-0.9.12/xrdp/xrdp_wm.c:571: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 cfg_file[256];
data/xrdp-0.9.12/xrdp/xrdp_wm.c:572: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 autorun_name[256];
data/xrdp-0.9.12/xrdp/xrdp_wm.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 chan_name[16];
data/xrdp-0.9.12/xrdp/xrdp_wm.c:2152: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 msg[256];
data/xrdp-0.9.12/xrdp/xrdpwin.c:218: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 text[256];
data/xrdp-0.9.12/xrdp/xrdpwin.c:296: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 text[256];
data/xrdp-0.9.12/xrdp/xrdpwin.c:297: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 pid_file[256];
data/xrdp-0.9.12/xrdpapi/simple.c:85: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_buf[8192];
data/xrdp-0.9.12/xrdpapi/simple.c:86: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    in_buf[1700];
data/xrdp-0.9.12/xrdpapi/xrdpapi.c:208: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(connect_data + 12, pVirtualName, chan_name_bytes);
data/xrdp-0.9.12/xrdpapi/xrdpapi.c:458: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(*ppBuffer, &(wts->fd), 4);
data/xrdp-0.9.12/xrdpapi/xrdpapi.c:539: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 disp[256];
data/xrdp-0.9.12/xrdpapi/xrdpapi.c:564: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(disp);
data/xrdp-0.9.12/xrdpvr/xrdpvr.c:679: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->p, extradata, extradata_size);
data/xrdp-0.9.12/xrdpvr/xrdpvr.c:804: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(filename , O_RDONLY)) < 0)
data/xrdp-0.9.12/xrdpvr/xrdpvr_internal.h:175: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)->p, (_ba), (_count));             \
data/xrdp-0.9.12/xup/xup.c:151: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 con_port[256];
data/xrdp-0.9.12/xup/xup.c:592: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 cur_data[32 * (32 * 3)];
data/xrdp-0.9.12/xup/xup.c:593: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 cur_mask[32 * (32 / 8)];
data/xrdp-0.9.12/xup/xup.c:1022: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 cur_data[32 * (32 * 4)];
data/xrdp-0.9.12/xup/xup.c:1023: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 cur_mask[32 * (32 / 8)];
data/xrdp-0.9.12/xup/xup.h:157:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char username[256];
data/xrdp-0.9.12/xup/xup.h:158:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char password[256];
data/xrdp-0.9.12/xup/xup.h:159:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char ip[256];
data/xrdp-0.9.12/xup/xup.h:160:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char port[256];
data/xrdp-0.9.12/common/os_calls.c:331:12:  [1] (buffer) getchar:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    return getchar();
data/xrdp-0.9.12/common/os_calls.c:931:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(s.sun_path, port, sizeof(s.sun_path));
data/xrdp-0.9.12/common/os_calls.c:1019:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(s.sun_path, port, sizeof(s.sun_path));
data/xrdp-0.9.12/common/os_calls.c:1182: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).
        if ((inet_aton(address, &a) == 1) && (strlen(address) <= 15))
data/xrdp-0.9.12/common/os_calls.c:1473:5:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
    usleep(msecs * 1000);
data/xrdp-0.9.12/common/os_calls.c:1853:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        error = read(fd, buf, 4);
data/xrdp-0.9.12/common/os_calls.c:2084:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        if (read(fd, data, len) != len)
data/xrdp-0.9.12/common/os_calls.c:2200:12:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    return read(fd, ptr, len);
data/xrdp-0.9.12/common/os_calls.c:2520: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).
    return strlen(text);
data/xrdp-0.9.12/common/os_calls.c:2573:10:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    rv = strncpy(dest, src, len);
data/xrdp-0.9.12/common/os_calls.c:2729: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(str);
data/xrdp-0.9.12/librfxcodec/tests/rfxcodectest.c:90:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    if (read(fd, buf, 128 * 64 * 4) != 128 * 64 * 4)
data/xrdp-0.9.12/librfxcodec/tests/rfxcodectest.c:191:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    if (read(in_fd, &bmpm, sizeof(struct bmp_magic)) != sizeof(struct bmp_magic))
data/xrdp-0.9.12/librfxcodec/tests/rfxcodectest.c:195:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    if (read(in_fd, &bmph, sizeof(struct bmp_hdr)) != sizeof(struct bmp_hdr))
data/xrdp-0.9.12/librfxcodec/tests/rfxcodectest.c:199:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    if (read(in_fd, &dibh, sizeof(struct dib_hdr)) != sizeof(struct dib_hdr))
data/xrdp-0.9.12/librfxcodec/tests/rfxcodectest.c:226:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        if (read(in_fd, line, line_bytes) != line_bytes)
data/xrdp-0.9.12/librfxcodec/tests/rfxencode.c:92:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    if (read(fd, &bm, sizeof(bm)) != sizeof(bm))
data/xrdp-0.9.12/librfxcodec/tests/rfxencode.c:97:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    if (read(fd, &bh, sizeof(bh)) != sizeof(bh))
data/xrdp-0.9.12/librfxcodec/tests/rfxencode.c:102:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    if (read(fd, &dh, sizeof(dh)) != sizeof(dh))
data/xrdp-0.9.12/librfxcodec/tests/rfxencode.c:125:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        if (read(fd, src8, file_stride_bytes + e) != file_stride_bytes + e)
data/xrdp-0.9.12/sesman/chansrv/chansrv_fuse.c:630: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).
    if (dirname != NULL && strlen(dirname) > 0 &&
data/xrdp-0.9.12/sesman/chansrv/chansrv_fuse.c:1430:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (strlen(name) > XFS_MAXFILENAMELEN)
data/xrdp-0.9.12/sesman/chansrv/chansrv_fuse.c:1659:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (strlen(name) > XFS_MAXFILENAMELEN)
data/xrdp-0.9.12/sesman/chansrv/chansrv_fuse.c:1733:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (strlen(old_name) > XFS_MAXFILENAMELEN ||
data/xrdp-0.9.12/sesman/chansrv/chansrv_fuse.c:1734:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        strlen(new_name) > XFS_MAXFILENAMELEN)
data/xrdp-0.9.12/sesman/chansrv/chansrv_fuse.c:1837:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (strlen(name) > XFS_MAXFILENAMELEN)
data/xrdp-0.9.12/sesman/chansrv/chansrv_fuse.c:2538: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).
                                    strlen(result) + 1 + strlen(name) + 1);
data/xrdp-0.9.12/sesman/chansrv/chansrv_fuse.c:2538:58:  [1] (buffer) strlen:
  Does not handle 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(result) + 1 + strlen(name) + 1);
data/xrdp-0.9.12/sesman/chansrv/chansrv_fuse.c:2547:13:  [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(result, "/");
data/xrdp-0.9.12/sesman/chansrv/chansrv_xfs.c:302:26:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
xfs_create_xfs_fs(mode_t umask, uid_t uid, gid_t gid)
data/xrdp-0.9.12/sesman/chansrv/chansrv_xfs.c:338:51:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
            xino1->pub.mode = (S_IFDIR | 0777) & ~umask;
data/xrdp-0.9.12/sesman/chansrv/chansrv_xfs.c:345:13:  [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.
            strcpy(xino1->pub.name, ".");
data/xrdp-0.9.12/sesman/chansrv/chansrv_xfs.c:359:51:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
            xino2->pub.mode = (S_IFDIR | 0777) & ~umask;
data/xrdp-0.9.12/sesman/chansrv/chansrv_xfs.c:421: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) <= XFS_MAXFILENAMELEN &&
data/xrdp-0.9.12/sesman/chansrv/chansrv_xfs.c:565: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).
                len += strlen(p->pub.name);
data/xrdp-0.9.12/sesman/chansrv/chansrv_xfs.c:578: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).
                    len = strlen(p->pub.name);
data/xrdp-0.9.12/sesman/chansrv/chansrv_xfs.c:856:10:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        (strlen(name) <= XFS_MAXFILENAMELEN &&
data/xrdp-0.9.12/sesman/chansrv/chansrv_xfs.h:67:26:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
xfs_create_xfs_fs(mode_t umask, uid_t uid, gid_t gid);
data/xrdp-0.9.12/sesman/chansrv/devredir.c:199:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        if (read(fd, u.buf, 4) != 4)
data/xrdp-0.9.12/sesman/chansrv/devredir.c:411:13:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
            usleep(1000 * 100);
data/xrdp-0.9.12/sesman/chansrv/devredir.c:1177: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).
    if ((irp = devredir_irp_with_pathnamelen_new(strlen(path) + 2)) != NULL)
data/xrdp-0.9.12/sesman/chansrv/devredir.c:1205:13:  [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(irp->pathname, "*");
data/xrdp-0.9.12/sesman/chansrv/devredir.c:1677: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(old_name) + 1 + strlen(new_name);
data/xrdp-0.9.12/sesman/chansrv/devredir.c:1677: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).
    len = strlen(old_name) + 1 + strlen(new_name);
data/xrdp-0.9.12/sesman/chansrv/devredir.c:1681: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).
        irp->gen.rename.new_name = irp->pathname + strlen(old_name) + 1;
data/xrdp-0.9.12/sesman/chansrv/devredir.c:1757: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).
    rv = g_mbstowcs((twchar *) unicode, path, strlen(path));
data/xrdp-0.9.12/sesman/chansrv/devredir.c:1817: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(string);
data/xrdp-0.9.12/sesman/chansrv/pcsc/xrdp_pcsc.c:381:13:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
            usleep(1000);
data/xrdp-0.9.12/sesman/chansrv/pcsc/xrdp_pcsc.c:528: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).
    bytes = strlen(szReader);
data/xrdp-0.9.12/sesman/chansrv/pcsc/xrdp_pcsc.c:849: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).
        str_len = strlen(rname);
data/xrdp-0.9.12/sesman/chansrv/pcsc/xrdp_pcsc.c:1194: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).
        bytes_groups = strlen(mszGroups);
data/xrdp-0.9.12/sesman/chansrv/pcsc/xrdp_pcsc.c:1235: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).
        bytes = strlen(reader);
data/xrdp-0.9.12/sesman/tools/sestest.c:138:21:  [1] (buffer) scanf:
  It's unclear if the %s limit in the format string is small enough
  (CWE-120). Check that the limit is sufficiently small, or use a different
  input function.
                if (scanf("%255s", buf) < 0)
data/xrdp-0.9.12/sesman/tools/sestest.c:146:21:  [1] (buffer) scanf:
  It's unclear if the %s limit in the format string is small enough
  (CWE-120). Check that the limit is sufficiently small, or use a different
  input function.
                if (scanf("%255s", buf) < 0)
data/xrdp-0.9.12/sesman/tools/sestest.c:188:9:  [1] (buffer) scanf:
  It's unclear if the %s limit in the format string is small enough
  (CWE-120). Check that the limit is sufficiently small, or use a different
  input function.
    if (scanf("%255s", s->username) < 0)
data/xrdp-0.9.12/sesman/tools/sestest.c:195:9:  [1] (buffer) scanf:
  It's unclear if the %s limit in the format string is small enough
  (CWE-120). Check that the limit is sufficiently small, or use a different
  input function.
    if (scanf("%255s", s->password) < 0)
data/xrdp-0.9.12/sesman/tools/sestest.c:202:9:  [1] (buffer) scanf:
  It's unclear if the %s limit in the format string is small enough
  (CWE-120). Check that the limit is sufficiently small, or use a different
  input function.
    if (scanf("%255s", s->hostname) < 0)
data/xrdp-0.9.12/tcutils/utils.cpp:80: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).
        qstream_inc_pos(&s, strlen(buf) + 1);
data/xrdp-0.9.12/tests/gtcp_proxy/gtcp-proxy.c:292:13:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
            usleep(250);
data/xrdp-0.9.12/tests/gtcp_proxy/gtcp-proxy.c:337:13:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
            usleep(100);
data/xrdp-0.9.12/tests/gtcp_proxy/gtcp-proxy.c:357:13:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
            usleep(10);
data/xrdp-0.9.12/tests/tcp_proxy/main.c:279:5:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
    usleep(msecs * 1000);
data/xrdp-0.9.12/vrplayer/demuxmedia.cpp:76:13:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
            usleep(1000 * 100);
data/xrdp-0.9.12/vrplayer/demuxmedia.cpp:86:17:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
                usleep(1000 * 100);
data/xrdp-0.9.12/vrplayer/demuxmedia.cpp:110:13:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
            usleep(1000 * 100);
data/xrdp-0.9.12/vrplayer/mainwindow.cpp:424:5:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
    usleep(500 * 1000);
data/xrdp-0.9.12/vrplayer/playaudio.cpp:38:13:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
            usleep(1000 * 100);
data/xrdp-0.9.12/vrplayer/playaudio.cpp:45:13:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
            usleep(1000 * 100);
data/xrdp-0.9.12/vrplayer/playaudio.cpp:61:13:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
            usleep(1000 * 10);
data/xrdp-0.9.12/vrplayer/playaudio.cpp:70:9:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
        usleep(pkt->delay_in_us);
data/xrdp-0.9.12/vrplayer/playvideo.cpp:47:13:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
            usleep(10 * 1000);
data/xrdp-0.9.12/vrplayer/playvideo.cpp:61:13:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
            usleep(sleep_time * 1000);
data/xrdp-0.9.12/xrdpapi/xrdpapi.c:183: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).
    chan_name_bytes = strlen(pVirtualName);
data/xrdp-0.9.12/xrdpvr/xrdpvr.c:486:9:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
        usleep(delay_in_us);
data/xrdp-0.9.12/xrdpvr/xrdpvr.c:532:9:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
        usleep(delay_in_us);
data/xrdp-0.9.12/xrdpvr/xrdpvr.c:827:15:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    if ((rv = read(fd, s->p, 1048576)) <= 0)
data/xrdp-0.9.12/xrdpvr/xrdpvr.c:931:9:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
        usleep(1000 * 3);

ANALYSIS SUMMARY:

Hits = 581
Lines analyzed = 107168 in approximately 2.37 seconds (45273 lines/second)
Physical Source Lines of Code (SLOC) = 80387
Hits@level = [0] 201 [1]  77 [2] 443 [3]   9 [4]  50 [5]   2
Hits@level+ = [0+] 782 [1+] 581 [2+] 504 [3+]  61 [4+]  52 [5+]   2
Hits/KSLOC@level+ = [0+] 9.72794 [1+] 7.22754 [2+] 6.26967 [3+] 0.758829 [4+] 0.646871 [5+] 0.0248796
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.