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/tigervnc-1.10.1+dfsg/common/Xregion/Xlib.h Examining data/tigervnc-1.10.1+dfsg/common/Xregion/Xlibint.h Examining data/tigervnc-1.10.1+dfsg/common/Xregion/Xregion.h Examining data/tigervnc-1.10.1+dfsg/common/Xregion/Xutil.h Examining data/tigervnc-1.10.1+dfsg/common/Xregion/Region.c Examining data/tigervnc-1.10.1+dfsg/common/network/Socket.cxx Examining data/tigervnc-1.10.1+dfsg/common/network/Socket.h Examining data/tigervnc-1.10.1+dfsg/common/network/TcpSocket.cxx Examining data/tigervnc-1.10.1+dfsg/common/network/TcpSocket.h Examining data/tigervnc-1.10.1+dfsg/common/network/UnixSocket.cxx Examining data/tigervnc-1.10.1+dfsg/common/network/UnixSocket.h Examining data/tigervnc-1.10.1+dfsg/common/os/Mutex.cxx Examining data/tigervnc-1.10.1+dfsg/common/os/Mutex.h Examining data/tigervnc-1.10.1+dfsg/common/os/Thread.cxx Examining data/tigervnc-1.10.1+dfsg/common/os/Thread.h Examining data/tigervnc-1.10.1+dfsg/common/os/os.cxx Examining data/tigervnc-1.10.1+dfsg/common/os/os.h Examining data/tigervnc-1.10.1+dfsg/common/os/w32tiger.c Examining data/tigervnc-1.10.1+dfsg/common/os/w32tiger.h Examining data/tigervnc-1.10.1+dfsg/common/os/winerrno.h Examining data/tigervnc-1.10.1+dfsg/common/rdr/Exception.cxx Examining data/tigervnc-1.10.1+dfsg/common/rdr/Exception.h Examining data/tigervnc-1.10.1+dfsg/common/rdr/FdInStream.cxx Examining data/tigervnc-1.10.1+dfsg/common/rdr/FdInStream.h Examining data/tigervnc-1.10.1+dfsg/common/rdr/FdOutStream.cxx Examining data/tigervnc-1.10.1+dfsg/common/rdr/FdOutStream.h Examining data/tigervnc-1.10.1+dfsg/common/rdr/FileInStream.cxx Examining data/tigervnc-1.10.1+dfsg/common/rdr/FileInStream.h Examining data/tigervnc-1.10.1+dfsg/common/rdr/HexInStream.cxx Examining data/tigervnc-1.10.1+dfsg/common/rdr/HexInStream.h Examining data/tigervnc-1.10.1+dfsg/common/rdr/HexOutStream.cxx Examining data/tigervnc-1.10.1+dfsg/common/rdr/HexOutStream.h Examining data/tigervnc-1.10.1+dfsg/common/rdr/InStream.cxx Examining data/tigervnc-1.10.1+dfsg/common/rdr/InStream.h Examining data/tigervnc-1.10.1+dfsg/common/rdr/MemInStream.h Examining data/tigervnc-1.10.1+dfsg/common/rdr/MemOutStream.h Examining data/tigervnc-1.10.1+dfsg/common/rdr/OutStream.h Examining data/tigervnc-1.10.1+dfsg/common/rdr/RandomStream.cxx Examining data/tigervnc-1.10.1+dfsg/common/rdr/RandomStream.h Examining data/tigervnc-1.10.1+dfsg/common/rdr/TLSException.cxx Examining data/tigervnc-1.10.1+dfsg/common/rdr/TLSException.h Examining data/tigervnc-1.10.1+dfsg/common/rdr/TLSInStream.cxx Examining data/tigervnc-1.10.1+dfsg/common/rdr/TLSInStream.h Examining data/tigervnc-1.10.1+dfsg/common/rdr/TLSOutStream.cxx Examining data/tigervnc-1.10.1+dfsg/common/rdr/TLSOutStream.h Examining data/tigervnc-1.10.1+dfsg/common/rdr/ZlibInStream.cxx Examining data/tigervnc-1.10.1+dfsg/common/rdr/ZlibInStream.h Examining data/tigervnc-1.10.1+dfsg/common/rdr/ZlibOutStream.cxx Examining data/tigervnc-1.10.1+dfsg/common/rdr/ZlibOutStream.h Examining data/tigervnc-1.10.1+dfsg/common/rdr/types.h Examining data/tigervnc-1.10.1+dfsg/common/rfb/Blacklist.cxx Examining data/tigervnc-1.10.1+dfsg/common/rfb/Blacklist.h Examining data/tigervnc-1.10.1+dfsg/common/rfb/CConnection.cxx Examining data/tigervnc-1.10.1+dfsg/common/rfb/CConnection.h Examining data/tigervnc-1.10.1+dfsg/common/rfb/CMsgHandler.cxx Examining data/tigervnc-1.10.1+dfsg/common/rfb/CMsgHandler.h Examining data/tigervnc-1.10.1+dfsg/common/rfb/CMsgReader.cxx Examining data/tigervnc-1.10.1+dfsg/common/rfb/CMsgReader.h Examining data/tigervnc-1.10.1+dfsg/common/rfb/CMsgWriter.cxx Examining data/tigervnc-1.10.1+dfsg/common/rfb/CMsgWriter.h Examining data/tigervnc-1.10.1+dfsg/common/rfb/CSecurity.h Examining data/tigervnc-1.10.1+dfsg/common/rfb/CSecurityNone.h Examining data/tigervnc-1.10.1+dfsg/common/rfb/CSecurityPlain.cxx Examining data/tigervnc-1.10.1+dfsg/common/rfb/CSecurityPlain.h Examining data/tigervnc-1.10.1+dfsg/common/rfb/CSecurityStack.cxx Examining data/tigervnc-1.10.1+dfsg/common/rfb/CSecurityStack.h Examining data/tigervnc-1.10.1+dfsg/common/rfb/CSecurityTLS.h Examining data/tigervnc-1.10.1+dfsg/common/rfb/CSecurityVeNCrypt.cxx Examining data/tigervnc-1.10.1+dfsg/common/rfb/CSecurityVeNCrypt.h Examining data/tigervnc-1.10.1+dfsg/common/rfb/CSecurityVncAuth.cxx Examining data/tigervnc-1.10.1+dfsg/common/rfb/CSecurityVncAuth.h Examining data/tigervnc-1.10.1+dfsg/common/rfb/ClientParams.cxx Examining data/tigervnc-1.10.1+dfsg/common/rfb/ClientParams.h Examining data/tigervnc-1.10.1+dfsg/common/rfb/ComparingUpdateTracker.cxx Examining data/tigervnc-1.10.1+dfsg/common/rfb/ComparingUpdateTracker.h Examining data/tigervnc-1.10.1+dfsg/common/rfb/Configuration.cxx Examining data/tigervnc-1.10.1+dfsg/common/rfb/Configuration.h Examining data/tigervnc-1.10.1+dfsg/common/rfb/Congestion.cxx Examining data/tigervnc-1.10.1+dfsg/common/rfb/Congestion.h Examining data/tigervnc-1.10.1+dfsg/common/rfb/CopyRectDecoder.cxx Examining data/tigervnc-1.10.1+dfsg/common/rfb/CopyRectDecoder.h Examining data/tigervnc-1.10.1+dfsg/common/rfb/Cursor.cxx Examining data/tigervnc-1.10.1+dfsg/common/rfb/Cursor.h Examining data/tigervnc-1.10.1+dfsg/common/rfb/DecodeManager.cxx Examining data/tigervnc-1.10.1+dfsg/common/rfb/DecodeManager.h Examining data/tigervnc-1.10.1+dfsg/common/rfb/Decoder.cxx Examining data/tigervnc-1.10.1+dfsg/common/rfb/Decoder.h Examining data/tigervnc-1.10.1+dfsg/common/rfb/EncodeManager.cxx Examining data/tigervnc-1.10.1+dfsg/common/rfb/EncodeManager.h Examining data/tigervnc-1.10.1+dfsg/common/rfb/EncodeManagerBPP.cxx Examining data/tigervnc-1.10.1+dfsg/common/rfb/Encoder.cxx Examining data/tigervnc-1.10.1+dfsg/common/rfb/Encoder.h Examining data/tigervnc-1.10.1+dfsg/common/rfb/Exception.h Examining data/tigervnc-1.10.1+dfsg/common/rfb/HextileDecoder.cxx Examining data/tigervnc-1.10.1+dfsg/common/rfb/HextileDecoder.h Examining data/tigervnc-1.10.1+dfsg/common/rfb/HextileEncoder.cxx Examining data/tigervnc-1.10.1+dfsg/common/rfb/HextileEncoder.h Examining data/tigervnc-1.10.1+dfsg/common/rfb/Hostname.h Examining data/tigervnc-1.10.1+dfsg/common/rfb/InputHandler.h Examining data/tigervnc-1.10.1+dfsg/common/rfb/JpegCompressor.cxx Examining data/tigervnc-1.10.1+dfsg/common/rfb/JpegCompressor.h Examining data/tigervnc-1.10.1+dfsg/common/rfb/JpegDecompressor.cxx Examining data/tigervnc-1.10.1+dfsg/common/rfb/JpegDecompressor.h Examining data/tigervnc-1.10.1+dfsg/common/rfb/KeyRemapper.cxx Examining data/tigervnc-1.10.1+dfsg/common/rfb/KeyRemapper.h Examining data/tigervnc-1.10.1+dfsg/common/rfb/LogWriter.cxx Examining data/tigervnc-1.10.1+dfsg/common/rfb/LogWriter.h Examining data/tigervnc-1.10.1+dfsg/common/rfb/Logger.cxx Examining data/tigervnc-1.10.1+dfsg/common/rfb/Logger.h Examining data/tigervnc-1.10.1+dfsg/common/rfb/Logger_file.cxx Examining data/tigervnc-1.10.1+dfsg/common/rfb/Logger_file.h Examining data/tigervnc-1.10.1+dfsg/common/rfb/Logger_stdio.cxx Examining data/tigervnc-1.10.1+dfsg/common/rfb/Logger_stdio.h Examining data/tigervnc-1.10.1+dfsg/common/rfb/Logger_syslog.cxx Examining data/tigervnc-1.10.1+dfsg/common/rfb/Logger_syslog.h Examining data/tigervnc-1.10.1+dfsg/common/rfb/Palette.h Examining data/tigervnc-1.10.1+dfsg/common/rfb/Password.cxx Examining data/tigervnc-1.10.1+dfsg/common/rfb/Password.h Examining data/tigervnc-1.10.1+dfsg/common/rfb/Pixel.h Examining data/tigervnc-1.10.1+dfsg/common/rfb/PixelBuffer.cxx Examining data/tigervnc-1.10.1+dfsg/common/rfb/PixelBuffer.h Examining data/tigervnc-1.10.1+dfsg/common/rfb/PixelFormat.cxx Examining data/tigervnc-1.10.1+dfsg/common/rfb/PixelFormat.h Examining data/tigervnc-1.10.1+dfsg/common/rfb/PixelFormatBPP.cxx Examining data/tigervnc-1.10.1+dfsg/common/rfb/RREDecoder.cxx Examining data/tigervnc-1.10.1+dfsg/common/rfb/RREDecoder.h Examining data/tigervnc-1.10.1+dfsg/common/rfb/RREEncoder.cxx Examining data/tigervnc-1.10.1+dfsg/common/rfb/RREEncoder.h Examining data/tigervnc-1.10.1+dfsg/common/rfb/RawDecoder.cxx Examining data/tigervnc-1.10.1+dfsg/common/rfb/RawDecoder.h Examining data/tigervnc-1.10.1+dfsg/common/rfb/RawEncoder.cxx Examining data/tigervnc-1.10.1+dfsg/common/rfb/RawEncoder.h Examining data/tigervnc-1.10.1+dfsg/common/rfb/Rect.h Examining data/tigervnc-1.10.1+dfsg/common/rfb/Region.cxx Examining data/tigervnc-1.10.1+dfsg/common/rfb/Region.h Examining data/tigervnc-1.10.1+dfsg/common/rfb/SConnection.cxx Examining data/tigervnc-1.10.1+dfsg/common/rfb/SConnection.h Examining data/tigervnc-1.10.1+dfsg/common/rfb/SDesktop.h Examining data/tigervnc-1.10.1+dfsg/common/rfb/SMsgHandler.cxx Examining data/tigervnc-1.10.1+dfsg/common/rfb/SMsgHandler.h Examining data/tigervnc-1.10.1+dfsg/common/rfb/SMsgReader.cxx Examining data/tigervnc-1.10.1+dfsg/common/rfb/SMsgReader.h Examining data/tigervnc-1.10.1+dfsg/common/rfb/SMsgWriter.cxx Examining data/tigervnc-1.10.1+dfsg/common/rfb/SMsgWriter.h Examining data/tigervnc-1.10.1+dfsg/common/rfb/SSecurity.h Examining data/tigervnc-1.10.1+dfsg/common/rfb/SSecurityNone.h Examining data/tigervnc-1.10.1+dfsg/common/rfb/SSecurityPlain.cxx Examining data/tigervnc-1.10.1+dfsg/common/rfb/SSecurityPlain.h Examining data/tigervnc-1.10.1+dfsg/common/rfb/SSecurityStack.cxx Examining data/tigervnc-1.10.1+dfsg/common/rfb/SSecurityStack.h Examining data/tigervnc-1.10.1+dfsg/common/rfb/SSecurityTLS.h Examining data/tigervnc-1.10.1+dfsg/common/rfb/SSecurityVeNCrypt.cxx Examining data/tigervnc-1.10.1+dfsg/common/rfb/SSecurityVeNCrypt.h Examining data/tigervnc-1.10.1+dfsg/common/rfb/SSecurityVncAuth.cxx Examining data/tigervnc-1.10.1+dfsg/common/rfb/SSecurityVncAuth.h Examining data/tigervnc-1.10.1+dfsg/common/rfb/ScaleFilters.cxx Examining data/tigervnc-1.10.1+dfsg/common/rfb/ScaleFilters.h Examining data/tigervnc-1.10.1+dfsg/common/rfb/ScreenSet.h Examining data/tigervnc-1.10.1+dfsg/common/rfb/Security.cxx Examining data/tigervnc-1.10.1+dfsg/common/rfb/Security.h Examining data/tigervnc-1.10.1+dfsg/common/rfb/SecurityClient.cxx Examining data/tigervnc-1.10.1+dfsg/common/rfb/SecurityClient.h Examining data/tigervnc-1.10.1+dfsg/common/rfb/SecurityServer.cxx Examining data/tigervnc-1.10.1+dfsg/common/rfb/SecurityServer.h Examining data/tigervnc-1.10.1+dfsg/common/rfb/ServerCore.cxx Examining data/tigervnc-1.10.1+dfsg/common/rfb/ServerCore.h Examining data/tigervnc-1.10.1+dfsg/common/rfb/ServerParams.cxx Examining data/tigervnc-1.10.1+dfsg/common/rfb/ServerParams.h Examining data/tigervnc-1.10.1+dfsg/common/rfb/TightConstants.h Examining data/tigervnc-1.10.1+dfsg/common/rfb/TightDecoder.cxx Examining data/tigervnc-1.10.1+dfsg/common/rfb/TightDecoder.h Examining data/tigervnc-1.10.1+dfsg/common/rfb/TightEncoder.cxx Examining data/tigervnc-1.10.1+dfsg/common/rfb/TightEncoder.h Examining data/tigervnc-1.10.1+dfsg/common/rfb/TightEncoderBPP.cxx Examining data/tigervnc-1.10.1+dfsg/common/rfb/TightJPEGEncoder.cxx Examining data/tigervnc-1.10.1+dfsg/common/rfb/TightJPEGEncoder.h Examining data/tigervnc-1.10.1+dfsg/common/rfb/Timer.cxx Examining data/tigervnc-1.10.1+dfsg/common/rfb/Timer.h Examining data/tigervnc-1.10.1+dfsg/common/rfb/UnixPasswordValidator.cxx Examining data/tigervnc-1.10.1+dfsg/common/rfb/UnixPasswordValidator.h Examining data/tigervnc-1.10.1+dfsg/common/rfb/UpdateTracker.cxx Examining data/tigervnc-1.10.1+dfsg/common/rfb/UpdateTracker.h Examining data/tigervnc-1.10.1+dfsg/common/rfb/UserMsgBox.h Examining data/tigervnc-1.10.1+dfsg/common/rfb/UserPasswdGetter.h Examining data/tigervnc-1.10.1+dfsg/common/rfb/VNCSConnectionST.cxx Examining data/tigervnc-1.10.1+dfsg/common/rfb/VNCSConnectionST.h Examining data/tigervnc-1.10.1+dfsg/common/rfb/VNCServer.h Examining data/tigervnc-1.10.1+dfsg/common/rfb/VNCServerST.cxx Examining data/tigervnc-1.10.1+dfsg/common/rfb/VNCServerST.h Examining data/tigervnc-1.10.1+dfsg/common/rfb/WinPasswdValidator.cxx Examining data/tigervnc-1.10.1+dfsg/common/rfb/WinPasswdValidator.h Examining data/tigervnc-1.10.1+dfsg/common/rfb/XF86keysym.h Examining data/tigervnc-1.10.1+dfsg/common/rfb/ZRLEDecoder.cxx Examining data/tigervnc-1.10.1+dfsg/common/rfb/ZRLEDecoder.h Examining data/tigervnc-1.10.1+dfsg/common/rfb/ZRLEEncoder.cxx Examining data/tigervnc-1.10.1+dfsg/common/rfb/ZRLEEncoder.h Examining data/tigervnc-1.10.1+dfsg/common/rfb/ZRLEEncoderBPP.cxx Examining data/tigervnc-1.10.1+dfsg/common/rfb/clipboardTypes.h Examining data/tigervnc-1.10.1+dfsg/common/rfb/d3des.c Examining data/tigervnc-1.10.1+dfsg/common/rfb/d3des.h Examining data/tigervnc-1.10.1+dfsg/common/rfb/encodings.cxx Examining data/tigervnc-1.10.1+dfsg/common/rfb/encodings.h Examining data/tigervnc-1.10.1+dfsg/common/rfb/fenceTypes.h Examining data/tigervnc-1.10.1+dfsg/common/rfb/hextileConstants.h Examining data/tigervnc-1.10.1+dfsg/common/rfb/hextileDecode.h Examining data/tigervnc-1.10.1+dfsg/common/rfb/hextileEncode.h Examining data/tigervnc-1.10.1+dfsg/common/rfb/hextileEncodeBetter.h Examining data/tigervnc-1.10.1+dfsg/common/rfb/keysymdef.h Examining data/tigervnc-1.10.1+dfsg/common/rfb/ledStates.h Examining data/tigervnc-1.10.1+dfsg/common/rfb/msgTypes.h Examining data/tigervnc-1.10.1+dfsg/common/rfb/pam.c Examining data/tigervnc-1.10.1+dfsg/common/rfb/pam.h Examining data/tigervnc-1.10.1+dfsg/common/rfb/qemuTypes.h Examining data/tigervnc-1.10.1+dfsg/common/rfb/rreDecode.h Examining data/tigervnc-1.10.1+dfsg/common/rfb/rreEncode.h Examining data/tigervnc-1.10.1+dfsg/common/rfb/screenTypes.h Examining data/tigervnc-1.10.1+dfsg/common/rfb/tightDecode.h Examining data/tigervnc-1.10.1+dfsg/common/rfb/util.cxx Examining data/tigervnc-1.10.1+dfsg/common/rfb/util.h Examining data/tigervnc-1.10.1+dfsg/common/rfb/zrleDecode.h Examining data/tigervnc-1.10.1+dfsg/common/rfb/SSecurityTLS.cxx Examining data/tigervnc-1.10.1+dfsg/common/rfb/CSecurityTLS.cxx Examining data/tigervnc-1.10.1+dfsg/tests/perf/convperf.cxx Examining data/tigervnc-1.10.1+dfsg/tests/perf/decperf.cxx Examining data/tigervnc-1.10.1+dfsg/tests/perf/encperf.cxx Examining data/tigervnc-1.10.1+dfsg/tests/perf/fbperf.cxx Examining data/tigervnc-1.10.1+dfsg/tests/perf/util.cxx Examining data/tigervnc-1.10.1+dfsg/tests/perf/util.h Examining data/tigervnc-1.10.1+dfsg/tests/unit/conv.cxx Examining data/tigervnc-1.10.1+dfsg/tests/unit/convertlf.cxx Examining data/tigervnc-1.10.1+dfsg/tests/unit/hostport.cxx Examining data/tigervnc-1.10.1+dfsg/tests/unit/pixelformat.cxx Examining data/tigervnc-1.10.1+dfsg/unix/common/RandrGlue.h Examining data/tigervnc-1.10.1+dfsg/unix/common/randr.cxx Examining data/tigervnc-1.10.1+dfsg/unix/common/unixcommon.h Examining data/tigervnc-1.10.1+dfsg/unix/tx/TXButton.h Examining data/tigervnc-1.10.1+dfsg/unix/tx/TXCheckbox.h Examining data/tigervnc-1.10.1+dfsg/unix/tx/TXDialog.h Examining data/tigervnc-1.10.1+dfsg/unix/tx/TXLabel.h Examining data/tigervnc-1.10.1+dfsg/unix/tx/TXWindow.cxx Examining data/tigervnc-1.10.1+dfsg/unix/tx/TXWindow.h Examining data/tigervnc-1.10.1+dfsg/unix/vncconfig/QueryConnectDialog.cxx Examining data/tigervnc-1.10.1+dfsg/unix/vncconfig/QueryConnectDialog.h Examining data/tigervnc-1.10.1+dfsg/unix/vncconfig/vncExt.c Examining data/tigervnc-1.10.1+dfsg/unix/vncconfig/vncExt.h Examining data/tigervnc-1.10.1+dfsg/unix/vncconfig/vncconfig.cxx Examining data/tigervnc-1.10.1+dfsg/unix/vncconfig/buildtime.c Examining data/tigervnc-1.10.1+dfsg/unix/vncpasswd/vncpasswd.cxx Examining data/tigervnc-1.10.1+dfsg/unix/x0vncserver/Geometry.cxx Examining data/tigervnc-1.10.1+dfsg/unix/x0vncserver/Geometry.h Examining data/tigervnc-1.10.1+dfsg/unix/x0vncserver/Image.h Examining data/tigervnc-1.10.1+dfsg/unix/x0vncserver/PollingManager.cxx Examining data/tigervnc-1.10.1+dfsg/unix/x0vncserver/PollingManager.h Examining data/tigervnc-1.10.1+dfsg/unix/x0vncserver/PollingScheduler.cxx Examining data/tigervnc-1.10.1+dfsg/unix/x0vncserver/PollingScheduler.h Examining data/tigervnc-1.10.1+dfsg/unix/x0vncserver/RandrGlue.c Examining data/tigervnc-1.10.1+dfsg/unix/x0vncserver/TimeMillis.cxx Examining data/tigervnc-1.10.1+dfsg/unix/x0vncserver/TimeMillis.h Examining data/tigervnc-1.10.1+dfsg/unix/x0vncserver/XDesktop.cxx Examining data/tigervnc-1.10.1+dfsg/unix/x0vncserver/XDesktop.h Examining data/tigervnc-1.10.1+dfsg/unix/x0vncserver/XPixelBuffer.cxx Examining data/tigervnc-1.10.1+dfsg/unix/x0vncserver/XPixelBuffer.h Examining data/tigervnc-1.10.1+dfsg/unix/x0vncserver/qnum_to_xorgevdev.c Examining data/tigervnc-1.10.1+dfsg/unix/x0vncserver/qnum_to_xorgkbd.c Examining data/tigervnc-1.10.1+dfsg/unix/x0vncserver/x0vncserver.cxx Examining data/tigervnc-1.10.1+dfsg/unix/x0vncserver/buildtime.c Examining data/tigervnc-1.10.1+dfsg/unix/x0vncserver/Image.cxx Examining data/tigervnc-1.10.1+dfsg/unix/xserver/hw/vnc/Input.h Examining data/tigervnc-1.10.1+dfsg/unix/xserver/hw/vnc/InputXKB.c Examining data/tigervnc-1.10.1+dfsg/unix/xserver/hw/vnc/RFBGlue.cc Examining data/tigervnc-1.10.1+dfsg/unix/xserver/hw/vnc/RFBGlue.h Examining data/tigervnc-1.10.1+dfsg/unix/xserver/hw/vnc/RandrGlue.c Examining data/tigervnc-1.10.1+dfsg/unix/xserver/hw/vnc/XorgGlue.c Examining data/tigervnc-1.10.1+dfsg/unix/xserver/hw/vnc/XorgGlue.h Examining data/tigervnc-1.10.1+dfsg/unix/xserver/hw/vnc/XserverDesktop.cc Examining data/tigervnc-1.10.1+dfsg/unix/xserver/hw/vnc/XserverDesktop.h Examining data/tigervnc-1.10.1+dfsg/unix/xserver/hw/vnc/qnum_to_xorgevdev.c Examining data/tigervnc-1.10.1+dfsg/unix/xserver/hw/vnc/qnum_to_xorgkbd.c Examining data/tigervnc-1.10.1+dfsg/unix/xserver/hw/vnc/vncBlockHandler.c Examining data/tigervnc-1.10.1+dfsg/unix/xserver/hw/vnc/vncBlockHandler.h Examining data/tigervnc-1.10.1+dfsg/unix/xserver/hw/vnc/vncExt.c Examining data/tigervnc-1.10.1+dfsg/unix/xserver/hw/vnc/vncExtInit.cc Examining data/tigervnc-1.10.1+dfsg/unix/xserver/hw/vnc/vncExtInit.h Examining data/tigervnc-1.10.1+dfsg/unix/xserver/hw/vnc/vncHooks.c Examining data/tigervnc-1.10.1+dfsg/unix/xserver/hw/vnc/vncHooks.h Examining data/tigervnc-1.10.1+dfsg/unix/xserver/hw/vnc/vncModule.c Examining data/tigervnc-1.10.1+dfsg/unix/xserver/hw/vnc/vncSelection.c Examining data/tigervnc-1.10.1+dfsg/unix/xserver/hw/vnc/vncSelection.h Examining data/tigervnc-1.10.1+dfsg/unix/xserver/hw/vnc/xorg-version.h Examining data/tigervnc-1.10.1+dfsg/unix/xserver/hw/vnc/buildtime.c Examining data/tigervnc-1.10.1+dfsg/unix/xserver/hw/vnc/xvnc.c Examining data/tigervnc-1.10.1+dfsg/unix/xserver/hw/vnc/Input.c Examining data/tigervnc-1.10.1+dfsg/vncviewer/CConn.cxx Examining data/tigervnc-1.10.1+dfsg/vncviewer/CConn.h Examining data/tigervnc-1.10.1+dfsg/vncviewer/DesktopWindow.cxx Examining data/tigervnc-1.10.1+dfsg/vncviewer/DesktopWindow.h Examining data/tigervnc-1.10.1+dfsg/vncviewer/OptionsDialog.cxx Examining data/tigervnc-1.10.1+dfsg/vncviewer/OptionsDialog.h Examining data/tigervnc-1.10.1+dfsg/vncviewer/PlatformPixelBuffer.h Examining data/tigervnc-1.10.1+dfsg/vncviewer/ServerDialog.cxx Examining data/tigervnc-1.10.1+dfsg/vncviewer/ServerDialog.h Examining data/tigervnc-1.10.1+dfsg/vncviewer/Surface.cxx Examining data/tigervnc-1.10.1+dfsg/vncviewer/Surface.h Examining data/tigervnc-1.10.1+dfsg/vncviewer/Surface_OSX.cxx Examining data/tigervnc-1.10.1+dfsg/vncviewer/Surface_Win32.cxx Examining data/tigervnc-1.10.1+dfsg/vncviewer/Surface_X11.cxx Examining data/tigervnc-1.10.1+dfsg/vncviewer/UserDialog.cxx Examining data/tigervnc-1.10.1+dfsg/vncviewer/UserDialog.h Examining data/tigervnc-1.10.1+dfsg/vncviewer/Viewport.h Examining data/tigervnc-1.10.1+dfsg/vncviewer/cocoa.h Examining data/tigervnc-1.10.1+dfsg/vncviewer/fltk_layout.h Examining data/tigervnc-1.10.1+dfsg/vncviewer/gettext.h Examining data/tigervnc-1.10.1+dfsg/vncviewer/i18n.h Examining data/tigervnc-1.10.1+dfsg/vncviewer/keysym2ucs.c Examining data/tigervnc-1.10.1+dfsg/vncviewer/keysym2ucs.h Examining data/tigervnc-1.10.1+dfsg/vncviewer/menukey.cxx Examining data/tigervnc-1.10.1+dfsg/vncviewer/menukey.h Examining data/tigervnc-1.10.1+dfsg/vncviewer/osx_to_qnum.c Examining data/tigervnc-1.10.1+dfsg/vncviewer/parameters.cxx Examining data/tigervnc-1.10.1+dfsg/vncviewer/parameters.h Examining data/tigervnc-1.10.1+dfsg/vncviewer/resource.h Examining data/tigervnc-1.10.1+dfsg/vncviewer/vncviewer.h Examining data/tigervnc-1.10.1+dfsg/vncviewer/win32.c Examining data/tigervnc-1.10.1+dfsg/vncviewer/win32.h Examining data/tigervnc-1.10.1+dfsg/vncviewer/xkb_to_qnum.c Examining data/tigervnc-1.10.1+dfsg/vncviewer/vncviewer.cxx Examining data/tigervnc-1.10.1+dfsg/vncviewer/Viewport.cxx Examining data/tigervnc-1.10.1+dfsg/vncviewer/PlatformPixelBuffer.cxx FINAL RESULTS: data/tigervnc-1.10.1+dfsg/common/network/UnixSocket.cxx:147:7: [5] (race) chmod: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchmod( ) instead. if (chmod(path, mode) < 0) { data/tigervnc-1.10.1+dfsg/common/rfb/Security.cxx:147:7: [5] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. Risk is high; the length parameter appears to be a constant, instead of computing the number of characters left. strncat(out, ",", sizeof(out) - 1); data/tigervnc-1.10.1+dfsg/common/rfb/Security.cxx:150:5: [5] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. Risk is high; the length parameter appears to be a constant, instead of computing the number of characters left. strncat(out, name, sizeof(out) - 1); data/tigervnc-1.10.1+dfsg/unix/vncpasswd/vncpasswd.cxx:173:5: [5] (race) chmod: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchmod( ) instead. chmod(fname, S_IRUSR|S_IWUSR); data/tigervnc-1.10.1+dfsg/common/Xregion/Region.c:88:36: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. #define assert(expr) {if (!(expr)) fprintf(stderr,\ data/tigervnc-1.10.1+dfsg/common/network/TcpSocket.cxx:276:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buffer, "%s::%d", address.buf, port); data/tigervnc-1.10.1+dfsg/common/network/UnixSocket.cxx:63:3: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(addr.sun_path, path); data/tigervnc-1.10.1+dfsg/common/network/UnixSocket.cxx:136:3: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(addr.sun_path, path); data/tigervnc-1.10.1+dfsg/common/os/os.cxx:93:10: [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(file, R_OK); data/tigervnc-1.10.1+dfsg/common/rdr/Exception.cxx:48:9: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. (void) vsnprintf(str_, len, format, ap); data/tigervnc-1.10.1+dfsg/common/rfb/CSecurityTLS.cxx:92:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(caDefault.buf, "%sx509_ca.pem", homeDir); data/tigervnc-1.10.1+dfsg/common/rfb/CSecurityTLS.cxx:93:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(crlDefault.buf, "%s509_crl.pem", homeDir); data/tigervnc-1.10.1+dfsg/common/rfb/CSecurityTLS.cxx:221:3: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(prio, Security::GnuTLSPriority); data/tigervnc-1.10.1+dfsg/common/rfb/CSecurityTLS.cxx:223:5: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(prio, kx_anon_priority); data/tigervnc-1.10.1+dfsg/common/rfb/CSecurityTLS.cxx:363:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(dbPath.buf, "%sx509_known_hosts", homeDir); data/tigervnc-1.10.1+dfsg/common/rfb/Logger.cxx:48:3: [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(buf1, sizeof(buf1)-1, format, ap); data/tigervnc-1.10.1+dfsg/common/rfb/Logger_file.cxx:51:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(bakFilename.buf, "%s.bak", m_filename); data/tigervnc-1.10.1+dfsg/common/rfb/SConnection.cxx:259:9: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. (void) vsnprintf(str, sizeof(str), format, ap); data/tigervnc-1.10.1+dfsg/common/rfb/SSecurityTLS.cxx:187:3: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(prio, Security::GnuTLSPriority); data/tigervnc-1.10.1+dfsg/common/rfb/SSecurityTLS.cxx:189:5: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(prio, kx_anon_priority); data/tigervnc-1.10.1+dfsg/common/rfb/util.cxx:37: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(NULL, 0, fmt, ap); data/tigervnc-1.10.1+dfsg/common/rfb/util.cxx:51: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(buf, len+1, fmt, ap); data/tigervnc-1.10.1+dfsg/unix/vncpasswd/vncpasswd.cxx:151:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(fname, "%spasswd", homeDir); data/tigervnc-1.10.1+dfsg/unix/xserver/hw/vnc/XorgGlue.c:49:3: [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(buffer, sizeof(buffer), format, args); data/tigervnc-1.10.1+dfsg/unix/xserver/hw/vnc/xvnc.c:352: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(file, F_OK) == 0) data/tigervnc-1.10.1+dfsg/unix/xserver/hw/vnc/xvnc.c:355: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(file, F_OK) == 0) data/tigervnc-1.10.1+dfsg/unix/xserver/hw/vnc/xvnc.c:358: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(file, F_OK) == 0) data/tigervnc-1.10.1+dfsg/vncviewer/CConn.cxx:158:3: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(infoText, scratch); data/tigervnc-1.10.1+dfsg/vncviewer/CConn.cxx:163:3: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(infoText, scratch); data/tigervnc-1.10.1+dfsg/vncviewer/CConn.cxx:168:3: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(infoText, scratch); data/tigervnc-1.10.1+dfsg/vncviewer/CConn.cxx:176:3: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(infoText, scratch); data/tigervnc-1.10.1+dfsg/vncviewer/CConn.cxx:183:3: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(infoText, scratch); data/tigervnc-1.10.1+dfsg/vncviewer/CConn.cxx:188:3: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(infoText, scratch); data/tigervnc-1.10.1+dfsg/vncviewer/CConn.cxx:193:3: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(infoText, scratch); data/tigervnc-1.10.1+dfsg/vncviewer/CConn.cxx:198:3: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(infoText, scratch); data/tigervnc-1.10.1+dfsg/vncviewer/CConn.cxx:203:3: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(infoText, scratch); data/tigervnc-1.10.1+dfsg/vncviewer/CConn.cxx:208:3: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(infoText, scratch); data/tigervnc-1.10.1+dfsg/vncviewer/DesktopWindow.cxx:568:3: [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(textbuf, sizeof(textbuf), text, ap); data/tigervnc-1.10.1+dfsg/vncviewer/Viewport.cxx:1221: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(sendMenuKey, 64, p_("ContextMenu|", "Send %s"), (const char *)menuKey); data/tigervnc-1.10.1+dfsg/vncviewer/vncviewer.cxx:168:3: [4] (shell) execvp: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. execvp(argv[0], (char * const *)argv); data/tigervnc-1.10.1+dfsg/vncviewer/vncviewer.cxx:229:7: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(icon_path, "%s/icons/hicolor/%dx%d/apps/tigervnc.png", data/tigervnc-1.10.1+dfsg/vncviewer/vncviewer.cxx:486:3: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. system(cmd2); data/tigervnc-1.10.1+dfsg/vncviewer/win32.h:25:9: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. #define snprintf(str, n, format, ...) _snprintf_s(str, n, _TRUNCATE, format, __VA_ARGS__) data/tigervnc-1.10.1+dfsg/common/os/Mutex.cxx:35:3: [3] (misc) InitializeCriticalSection: Exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. InitializeCriticalSection((CRITICAL_SECTION*)systemMutex); data/tigervnc-1.10.1+dfsg/common/os/Mutex.cxx:60:3: [3] (misc) EnterCriticalSection: On some versions of Windows, exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. EnterCriticalSection((CRITICAL_SECTION*)systemMutex); data/tigervnc-1.10.1+dfsg/common/os/os.cxx:54: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. homedir = getenv("HOME"); data/tigervnc-1.10.1+dfsg/common/rdr/RandomStream.cxx:73: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(seed); data/tigervnc-1.10.1+dfsg/vncviewer/vncviewer.cxx:471:21: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. const char *cmd = getenv("VNC_VIA_CMD"); data/tigervnc-1.10.1+dfsg/common/Xregion/Region.c:547:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy((char *) dstrgn->rects, (char *) rgn->rects, data/tigervnc-1.10.1+dfsg/common/network/TcpSocket.cxx: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 ntop[NI_MAXHOST]; data/tigervnc-1.10.1+dfsg/common/network/TcpSocket.cxx:164: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(&sa, current->ai_addr, salen); data/tigervnc-1.10.1+dfsg/common/network/TcpSocket.cxx:225:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[INET6_ADDRSTRLEN + 2]; data/tigervnc-1.10.1+dfsg/common/network/TcpSocket.cxx:316:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (&sa, listenaddr, listenaddrlen); data/tigervnc-1.10.1+dfsg/common/network/TcpSocket.cxx:439: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 service[16]; data/tigervnc-1.10.1+dfsg/common/network/TcpSocket.cxx:652: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 (&pattern.address.u.sa, ai->ai_addr, ai->ai_addrlen); data/tigervnc-1.10.1+dfsg/common/network/TcpSocket.cxx:664:42: [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). pattern.prefixlen = (unsigned int) atoi(pref.buf); data/tigervnc-1.10.1+dfsg/common/network/TcpSocket.cxx:727:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[INET6_ADDRSTRLEN + 2]; data/tigervnc-1.10.1+dfsg/common/os/os.cxx:70:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(dir, homedir, len); data/tigervnc-1.10.1+dfsg/common/os/os.cxx:71:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(dir + len, "/.vnc/\0", 7); data/tigervnc-1.10.1+dfsg/common/os/os.cxx:82:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(dir+strlen(dir), (TCHAR *)"\\vnc\\\0", 6); data/tigervnc-1.10.1+dfsg/common/rdr/Exception.cxx:89:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[20]; data/tigervnc-1.10.1+dfsg/common/rdr/Exception.cxx:92: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, "%x", err); data/tigervnc-1.10.1+dfsg/common/rdr/Exception.cxx:95: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",err); data/tigervnc-1.10.1+dfsg/common/rdr/Exception.h: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 str_[len]; data/tigervnc-1.10.1+dfsg/common/rdr/FdInStream.cxx:112:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(dataPtr, ptr, n); data/tigervnc-1.10.1+dfsg/common/rdr/FileInStream.cxx:30:10: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). file = fopen(fileName, "rb"); data/tigervnc-1.10.1+dfsg/common/rdr/InStream.h:101:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(data, ptr, n); data/tigervnc-1.10.1+dfsg/common/rdr/MemOutStream.h:46:7: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(ptr, data, length); data/tigervnc-1.10.1+dfsg/common/rdr/MemOutStream.h:73:7: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(newStart, start, ptr - start); data/tigervnc-1.10.1+dfsg/common/rdr/OutStream.h:99: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(ptr, data, n); data/tigervnc-1.10.1+dfsg/common/rdr/RandomStream.cxx:63:8: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fp = fopen("/dev/urandom", "r"); data/tigervnc-1.10.1+dfsg/common/rdr/RandomStream.cxx:65:10: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fp = fopen("/dev/random", "r"); data/tigervnc-1.10.1+dfsg/common/rfb/CConnection.cxx:149: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 verStr[27]; // FIXME: gcc has some bug in format-overflow data/tigervnc-1.10.1+dfsg/common/rfb/CConnection.cxx:185:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(verStr, "RFB %03d.%03d\n", data/tigervnc-1.10.1+dfsg/common/rfb/CMsgReader.cxx:277: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[64]; data/tigervnc-1.10.1+dfsg/common/rfb/ComparingUpdateTracker.cxx:153: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(oldPtr, newPtr, blockWidthInBytes); data/tigervnc-1.10.1+dfsg/common/rfb/ComparingUpdateTracker.cxx:183: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 a[1024], b[1024]; data/tigervnc-1.10.1+dfsg/common/rfb/Configuration.cxx:361:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(result, "%d", def_value); data/tigervnc-1.10.1+dfsg/common/rfb/Configuration.cxx:367:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(result, "%d", value); data/tigervnc-1.10.1+dfsg/common/rfb/Configuration.cxx:429:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(value, v, l); data/tigervnc-1.10.1+dfsg/common/rfb/Configuration.cxx:452:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(value, v, len); data/tigervnc-1.10.1+dfsg/common/rfb/Configuration.cxx:470: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(*data_, value, length); data/tigervnc-1.10.1+dfsg/common/rfb/Congestion.cxx:315:7: [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). f = fopen(filename, "ab"); data/tigervnc-1.10.1+dfsg/common/rfb/Cursor.cxx:34:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(this->data, data, width_*height_*4); data/tigervnc-1.10.1+dfsg/common/rfb/Cursor.cxx:42:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(data, other.data, width_*height_*4); data/tigervnc-1.10.1+dfsg/common/rfb/Cursor.cxx:235: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(data_ptr, data + y*width()*4 + busy.tl.x*4, busy.width()*4); data/tigervnc-1.10.1+dfsg/common/rfb/Cursor.cxx:302:7: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(fg, cursor->getBuffer() + idx*4, 4); data/tigervnc-1.10.1+dfsg/common/rfb/Cursor.cxx:307: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(rgb, fg, 3); data/tigervnc-1.10.1+dfsg/common/rfb/EncodeManager.cxx:176: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 a[1024], b[1024]; data/tigervnc-1.10.1+dfsg/common/rfb/Encoder.cxx:50:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&palcol, colour, pf.bpp/8); data/tigervnc-1.10.1+dfsg/common/rfb/JpegCompressor.cxx:51: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 lastError[JMSG_LENGTH_MAX]; data/tigervnc-1.10.1+dfsg/common/rfb/JpegDecompressor.cxx:52: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 lastError[JMSG_LENGTH_MAX]; data/tigervnc-1.10.1+dfsg/common/rfb/LogWriter.cxx:81:15: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). int level = atoi(logLevel.buf); data/tigervnc-1.10.1+dfsg/common/rfb/Logger.cxx:47:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf1[4096]; data/tigervnc-1.10.1+dfsg/common/rfb/Logger_file.cxx:54: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). m_file = fopen(m_filename, "w+"); data/tigervnc-1.10.1+dfsg/common/rfb/PixelBuffer.cxx:86: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(imageBufPos, data, bytesPerMemCpy); data/tigervnc-1.10.1+dfsg/common/rfb/PixelBuffer.cxx:176:7: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf, pix, b); data/tigervnc-1.10.1+dfsg/common/rfb/PixelBuffer.cxx:183:7: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf, start, w * b); data/tigervnc-1.10.1+dfsg/common/rfb/PixelBuffer.cxx:220: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(dest, src, bytesPerFill); data/tigervnc-1.10.1+dfsg/common/rfb/PixelBuffer.cxx:267:7: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(dstData, srcData, drect.width() * bytesPerPixel); data/tigervnc-1.10.1+dfsg/common/rfb/PixelBuffer.cxx:277:7: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(dstData, srcData, drect.width() * bytesPerPixel); data/tigervnc-1.10.1+dfsg/common/rfb/PixelFormat.cxx:70:7: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&subUpTable[i], &subUpTable[0], maxVal+1); data/tigervnc-1.10.1+dfsg/common/rfb/PixelFormat.cxx:383:7: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(dst, src, w * bpp/8); data/tigervnc-1.10.1+dfsg/common/rfb/PixelFormat.cxx:498: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 num[20]; data/tigervnc-1.10.1+dfsg/common/rfb/PixelFormat.cxx:502:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(num,"%d",depth); data/tigervnc-1.10.1+dfsg/common/rfb/PixelFormat.cxx:505:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(num,"%d",bpp); data/tigervnc-1.10.1+dfsg/common/rfb/PixelFormat.cxx:526: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(num,"%d",depth-redShift); data/tigervnc-1.10.1+dfsg/common/rfb/PixelFormat.cxx:528: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(num,"%d",redShift-greenShift); data/tigervnc-1.10.1+dfsg/common/rfb/PixelFormat.cxx:530: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(num,"%d",greenShift); data/tigervnc-1.10.1+dfsg/common/rfb/PixelFormat.cxx:541: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(num,"%d",depth-blueShift); data/tigervnc-1.10.1+dfsg/common/rfb/PixelFormat.cxx:543: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(num,"%d",blueShift-greenShift); data/tigervnc-1.10.1+dfsg/common/rfb/PixelFormat.cxx:545: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(num,"%d",greenShift); data/tigervnc-1.10.1+dfsg/common/rfb/PixelFormat.cxx:551:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(num,"%d,",redMax); data/tigervnc-1.10.1+dfsg/common/rfb/PixelFormat.cxx:553:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(num,"%d,",greenMax); data/tigervnc-1.10.1+dfsg/common/rfb/PixelFormat.cxx:555:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(num,"%d",blueMax); data/tigervnc-1.10.1+dfsg/common/rfb/PixelFormat.cxx:558:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(num,"%d,",redShift); data/tigervnc-1.10.1+dfsg/common/rfb/PixelFormat.cxx:560:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(num,"%d,",greenShift); data/tigervnc-1.10.1+dfsg/common/rfb/PixelFormat.cxx:562:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(num,"%d",blueShift); data/tigervnc-1.10.1+dfsg/common/rfb/PixelFormat.cxx:569: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 rgbbgr[4]; data/tigervnc-1.10.1+dfsg/common/rfb/RREEncoder.cxx:81: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(&bg, imageBuf, pb->getPF().bpp/8); data/tigervnc-1.10.1+dfsg/common/rfb/SConnection.cxx:86:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char str[13]; data/tigervnc-1.10.1+dfsg/common/rfb/SConnection.cxx:88:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(str, "RFB %03d.%03d\n", defaultMajorVersion, defaultMinorVersion); data/tigervnc-1.10.1+dfsg/common/rfb/SConnection.cxx:115: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 verStr[13]; data/tigervnc-1.10.1+dfsg/common/rfb/SConnection.cxx:256:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char str[256]; data/tigervnc-1.10.1+dfsg/common/rfb/SMsgReader.cxx:172: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[64]; data/tigervnc-1.10.1+dfsg/common/rfb/SSecurityVncAuth.cxx:130:18: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE* fp = fopen(fname.buf, "r"); data/tigervnc-1.10.1+dfsg/common/rfb/ScaleFilters.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[30]; // Filter name data/tigervnc-1.10.1+dfsg/common/rfb/ScreenSet.h:113:7: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[128]; data/tigervnc-1.10.1+dfsg/common/rfb/Security.cxx:135:10: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char out[128]; /* Should be enough */ data/tigervnc-1.10.1+dfsg/common/rfb/TightDecoder.cxx:231: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(&len, bufptr, 4); data/tigervnc-1.10.1+dfsg/common/rfb/TightDecoder.cxx:274: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(tightPalette.buf, bufptr, len); data/tigervnc-1.10.1+dfsg/common/rfb/TightDecoder.cxx:286: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(palette, bufptr, len); data/tigervnc-1.10.1+dfsg/common/rfb/TightDecoder.cxx:329: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(&len, bufptr, 4); data/tigervnc-1.10.1+dfsg/common/rfb/TightDecoder.cxx:406:11: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(ptr, srcPtr, w * pf.bpp/8); data/tigervnc-1.10.1+dfsg/common/rfb/VNCSConnectionST.cxx:432:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[256]; data/tigervnc-1.10.1+dfsg/common/rfb/VNCSConnectionST.cxx:467:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[256]; data/tigervnc-1.10.1+dfsg/common/rfb/VNCSConnectionST.cxx:685: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(fenceData, data, len); data/tigervnc-1.10.1+dfsg/common/rfb/d3des.c:51: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 pc1[56] = { data/tigervnc-1.10.1+dfsg/common/rfb/d3des.c:57: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 totrot[16] = { data/tigervnc-1.10.1+dfsg/common/rfb/d3des.c:60: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 pc2[48] = { data/tigervnc-1.10.1+dfsg/common/rfb/d3des.c:71: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. unsigned char pc1m[56], pcr[56]; data/tigervnc-1.10.1+dfsg/common/rfb/tightDecode.h:115: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(thisRow, pix, sizeof(pix)); data/tigervnc-1.10.1+dfsg/common/rfb/tightDecode.h:135:7: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&thisRow[x*3], pix, sizeof(pix)); data/tigervnc-1.10.1+dfsg/common/rfb/util.cxx:59: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(r, s, l+1); data/tigervnc-1.10.1+dfsg/common/rfb/util.cxx:85:18: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. if (i) memcpy(*out1, src, i); data/tigervnc-1.10.1+dfsg/common/rfb/util.cxx:90:24: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. if (len-i-1) memcpy(*out2, &src[i+1], len-i-1); data/tigervnc-1.10.1+dfsg/common/rfb/util.cxx:380:7: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[5]; data/tigervnc-1.10.1+dfsg/common/rfb/util.cxx:470:7: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[5]; data/tigervnc-1.10.1+dfsg/common/rfb/util.cxx:519:7: [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 buf[3]; data/tigervnc-1.10.1+dfsg/tests/perf/convperf.cxx:46:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(dst, src, tile * dstpf.bpp/8); data/tigervnc-1.10.1+dfsg/tests/perf/convperf.cxx:104: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 dstb[256], srcb[256]; data/tigervnc-1.10.1+dfsg/tests/perf/convperf.cxx:124: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 datebuffer[256]; data/tigervnc-1.10.1+dfsg/tests/perf/fbperf.cxx:320: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 s[1024]; data/tigervnc-1.10.1+dfsg/tests/perf/fbperf.cxx:368:5: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(s, "N/A pixels/s"); data/tigervnc-1.10.1+dfsg/tests/unit/conv.cxx:270: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 dstb[256], srcb[256]; data/tigervnc-1.10.1+dfsg/tests/unit/convertlf.cxx:25:12: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char output[4096]; data/tigervnc-1.10.1+dfsg/unix/tx/TXWindow.cxx:335: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 defGeom[256]; data/tigervnc-1.10.1+dfsg/unix/tx/TXWindow.cxx:336:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(defGeom,"%dx%d+%d+%d",w,h,x,y); data/tigervnc-1.10.1+dfsg/unix/vncconfig/QueryConnectDialog.cxx:85:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[16]; data/tigervnc-1.10.1+dfsg/unix/vncconfig/QueryConnectDialog.cxx:86:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buf, "%d", timeUntilReject); data/tigervnc-1.10.1+dfsg/unix/vncpasswd/vncpasswd.cxx:160:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char yesno[3]; data/tigervnc-1.10.1+dfsg/unix/vncpasswd/vncpasswd.cxx:165:16: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE* fp = fopen(fname,"w"); data/tigervnc-1.10.1+dfsg/unix/x0vncserver/Geometry.cxx: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 sign_x[2] = "+"; data/tigervnc-1.10.1+dfsg/unix/x0vncserver/Geometry.cxx:74:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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_y[2] = "+"; data/tigervnc-1.10.1+dfsg/unix/x0vncserver/Image.cxx:143: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(dstOffset, srcOffset, rowLength); data/tigervnc-1.10.1+dfsg/unix/x0vncserver/XDesktop.cxx:70:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static const char * ledNames[XDESKTOP_N_LEDS] = { data/tigervnc-1.10.1+dfsg/unix/x0vncserver/XDesktop.cxx:228:12: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char btnMap[8]; data/tigervnc-1.10.1+dfsg/unix/x0vncserver/XDesktop.cxx:489:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[2048]; data/tigervnc-1.10.1+dfsg/unix/x0vncserver/x0vncserver.cxx:122:18: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE *fp = fopen(fileName, "r"); data/tigervnc-1.10.1+dfsg/unix/x0vncserver/x0vncserver.cxx:130:7: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[32]; data/tigervnc-1.10.1+dfsg/unix/xserver/hw/vnc/RFBGlue.cc:179:7: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(ptr, i.param->getName(), l); data/tigervnc-1.10.1+dfsg/unix/xserver/hw/vnc/XorgGlue.c:46:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[4096]; data/tigervnc-1.10.1+dfsg/unix/xserver/hw/vnc/XserverDesktop.cc:458:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[2048]; data/tigervnc-1.10.1+dfsg/unix/xserver/hw/vnc/vncExtInit.cc:183:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char path[PATH_MAX]; data/tigervnc-1.10.1+dfsg/unix/xserver/hw/vnc/vncExtInit.cc:200:40: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). if (port == 0) port = 5900 + atoi(vncGetDisplay()); data/tigervnc-1.10.1+dfsg/unix/xserver/hw/vnc/xvnc.c:154: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 displayNumStr[16]; data/tigervnc-1.10.1+dfsg/unix/xserver/hw/vnc/xvnc.c:348:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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/tigervnc-1.10.1+dfsg/unix/xserver/hw/vnc/xvnc.c:351: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(file, "/tmp/.X%d-lock", num); data/tigervnc-1.10.1+dfsg/unix/xserver/hw/vnc/xvnc.c:354: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(file, "/tmp/.X11-unix/X%d", num); data/tigervnc-1.10.1+dfsg/unix/xserver/hw/vnc/xvnc.c:357: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(file, "/usr/spool/sockets/X11/%d", num); data/tigervnc-1.10.1+dfsg/unix/xserver/hw/vnc/xvnc.c:393:14: [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). screenNum = atoi(argv[i+1]); data/tigervnc-1.10.1+dfsg/unix/xserver/hw/vnc/xvnc.c:422:32: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). while ((i < argc) && (depth = atoi(argv[i++])) != 0) data/tigervnc-1.10.1+dfsg/unix/xserver/hw/vnc/xvnc.c:453:8: [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). pix = atoi(argv[i]); data/tigervnc-1.10.1+dfsg/unix/xserver/hw/vnc/xvnc.c:474:8: [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). pix = atoi(argv[i]); data/tigervnc-1.10.1+dfsg/unix/xserver/hw/vnc/xvnc.c:495:13: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). linebias = atoi(argv[i]); data/tigervnc-1.10.1+dfsg/unix/xserver/hw/vnc/xvnc.c:536:27: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). vfbScreens[0].fb.depth = atoi(argv[i]); data/tigervnc-1.10.1+dfsg/unix/xserver/hw/vnc/xvnc.c:542:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char rgbbgr[4]; data/tigervnc-1.10.1+dfsg/unix/xserver/hw/vnc/xvnc.c:596: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). nullfd = open("/dev/null", O_WRONLY); data/tigervnc-1.10.1+dfsg/unix/xserver/hw/vnc/xvnc.c:612:6: [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(displayNumStr, "%d", displayNum); data/tigervnc-1.10.1+dfsg/unix/xserver/hw/vnc/xvnc.c:1199: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(&pvfb->fb, &fb, sizeof(vfbFramebufferInfo)); data/tigervnc-1.10.1+dfsg/unix/xserver/hw/vnc/xvnc.c:1308:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[100]; data/tigervnc-1.10.1+dfsg/unix/xserver/hw/vnc/xvnc.c:1312: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(name, "%dx%d", width, height); data/tigervnc-1.10.1+dfsg/unix/xserver/hw/vnc/xvnc.c:1370:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[100]; data/tigervnc-1.10.1+dfsg/unix/xserver/hw/vnc/xvnc.c:1379: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(name, "VNC-%d", vncRandRIndex); data/tigervnc-1.10.1+dfsg/vncviewer/CConn.cxx:146:10: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char infoText[1024] = ""; data/tigervnc-1.10.1+dfsg/vncviewer/CConn.cxx:148: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 scratch[100]; data/tigervnc-1.10.1+dfsg/vncviewer/CConn.cxx:149: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 pfStr[100]; data/tigervnc-1.10.1+dfsg/vncviewer/CConn.cxx:529:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char str[256]; data/tigervnc-1.10.1+dfsg/vncviewer/DesktopWindow.cxx:549: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 textbuf[1024]; data/tigervnc-1.10.1+dfsg/vncviewer/DesktopWindow.cxx:1155:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[2048]; data/tigervnc-1.10.1+dfsg/vncviewer/DesktopWindow.cxx:1390:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[256]; data/tigervnc-1.10.1+dfsg/vncviewer/OptionsDialog.cxx:176: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 digit[2] = "0"; data/tigervnc-1.10.1+dfsg/vncviewer/OptionsDialog.cxx:290:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[32]; data/tigervnc-1.10.1+dfsg/vncviewer/OptionsDialog.cxx:333:26: [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). compressLevel.setParam(atoi(compressionInput->value())); data/tigervnc-1.10.1+dfsg/vncviewer/OptionsDialog.cxx:334:25: [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). qualityLevel.setParam(atoi(jpegInput->value())); data/tigervnc-1.10.1+dfsg/vncviewer/OptionsDialog.cxx:400:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[64]; data/tigervnc-1.10.1+dfsg/vncviewer/ServerDialog.cxx:192:15: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE* f = fopen(filename, "r"); data/tigervnc-1.10.1+dfsg/vncviewer/UserDialog.cxx:83:10: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fp = fopen(passwordFileStr.buf, "rb"); data/tigervnc-1.10.1+dfsg/vncviewer/UserDialog.cxx:190:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[1024]; data/tigervnc-1.10.1+dfsg/vncviewer/Viewport.cxx:271:7: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buffer, data, width * height * 4); data/tigervnc-1.10.1+dfsg/vncviewer/Viewport.cxx:1220:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char sendMenuKey[64]; data/tigervnc-1.10.1+dfsg/vncviewer/Viewport.cxx:1248:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[1024]; data/tigervnc-1.10.1+dfsg/vncviewer/fltk_layout.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 buffer[1024]; data/tigervnc-1.10.1+dfsg/vncviewer/gettext.h:220: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 msg_ctxt_id[msgctxt_len + msgid_len]; data/tigervnc-1.10.1+dfsg/vncviewer/gettext.h:222:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[1024]; data/tigervnc-1.10.1+dfsg/vncviewer/gettext.h:231:7: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (msg_ctxt_id, msgctxt, msgctxt_len - 1); data/tigervnc-1.10.1+dfsg/vncviewer/gettext.h:233:7: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (msg_ctxt_id + msgctxt_len, msgid, msgid_len); data/tigervnc-1.10.1+dfsg/vncviewer/gettext.h:268: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 msg_ctxt_id[msgctxt_len + msgid_len]; data/tigervnc-1.10.1+dfsg/vncviewer/gettext.h:270:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[1024]; data/tigervnc-1.10.1+dfsg/vncviewer/gettext.h:279:7: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (msg_ctxt_id, msgctxt, msgctxt_len - 1); data/tigervnc-1.10.1+dfsg/vncviewer/gettext.h:281:7: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (msg_ctxt_id + msgctxt_len, msgid, msgid_len); data/tigervnc-1.10.1+dfsg/vncviewer/parameters.cxx:275:3: [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 name[buffersize]; data/tigervnc-1.10.1+dfsg/vncviewer/parameters.cxx:282: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 encodingBuffer[buffersize]; data/tigervnc-1.10.1+dfsg/vncviewer/parameters.cxx:288:3: [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 value[buffersize]; data/tigervnc-1.10.1+dfsg/vncviewer/parameters.cxx:307:3: [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 name[buffersize]; data/tigervnc-1.10.1+dfsg/vncviewer/parameters.cxx:328:3: [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 name[buffersize]; data/tigervnc-1.10.1+dfsg/vncviewer/parameters.cxx:373:3: [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 name[buffersize]; data/tigervnc-1.10.1+dfsg/vncviewer/parameters.cxx:449:10: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char servername[buffersize]; data/tigervnc-1.10.1+dfsg/vncviewer/parameters.cxx:451: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 servernameBuffer[buffersize]; data/tigervnc-1.10.1+dfsg/vncviewer/parameters.cxx:456: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 stringValue[buffersize]; data/tigervnc-1.10.1+dfsg/vncviewer/parameters.cxx:487: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 filepath[PATH_MAX]; data/tigervnc-1.10.1+dfsg/vncviewer/parameters.cxx:488: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 encodingBuffer[buffersize]; data/tigervnc-1.10.1+dfsg/vncviewer/parameters.cxx:512:13: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE* f = fopen(filepath, "w+"); data/tigervnc-1.10.1+dfsg/vncviewer/parameters.cxx:543: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 filepath[PATH_MAX]; data/tigervnc-1.10.1+dfsg/vncviewer/parameters.cxx:544:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char line[buffersize]; data/tigervnc-1.10.1+dfsg/vncviewer/parameters.cxx:545: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 decodingBuffer[buffersize]; data/tigervnc-1.10.1+dfsg/vncviewer/parameters.cxx:546:10: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char servername[sizeof(line)]; data/tigervnc-1.10.1+dfsg/vncviewer/parameters.cxx:569:13: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE* f = fopen(filepath, "r"); data/tigervnc-1.10.1+dfsg/vncviewer/parameters.cxx:655:58: [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). ((IntParameter*)parameterArray[i])->setParam(atoi(value)); data/tigervnc-1.10.1+dfsg/vncviewer/parameters.cxx:661:59: [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). ((BoolParameter*)parameterArray[i])->setParam(atoi(value)); data/tigervnc-1.10.1+dfsg/vncviewer/vncviewer.cxx:85: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 vncServerName[VNCSERVERNAMELEN] = { '\0' }; data/tigervnc-1.10.1+dfsg/vncviewer/vncviewer.cxx:94:10: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char buffer[1024]; data/tigervnc-1.10.1+dfsg/vncviewer/vncviewer.cxx:153: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. const char *argv[2]; data/tigervnc-1.10.1+dfsg/vncviewer/vncviewer.cxx:226:7: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char icon_path[PATH_MAX]; data/tigervnc-1.10.1+dfsg/vncviewer/vncviewer.cxx:287:10: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char fltk_about[16]; data/tigervnc-1.10.1+dfsg/vncviewer/vncviewer.cxx:290:10: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char fltk_hide[16]; data/tigervnc-1.10.1+dfsg/vncviewer/vncviewer.cxx:293:10: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char fltk_quit[16]; data/tigervnc-1.10.1+dfsg/vncviewer/vncviewer.cxx:305:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[1024]; data/tigervnc-1.10.1+dfsg/vncviewer/vncviewer.cxx:451:19: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). *remotePort = atoi(pos) + portOffset; data/tigervnc-1.10.1+dfsg/vncviewer/vncviewer.cxx:473:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char lport[10], rport[10]; data/tigervnc-1.10.1+dfsg/vncviewer/vncviewer.cxx:474:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(lport, "%d", localPort); data/tigervnc-1.10.1+dfsg/vncviewer/vncviewer.cxx:475:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(rport, "%d", remotePort); data/tigervnc-1.10.1+dfsg/vncviewer/vncviewer.cxx:493: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 remoteHost[VNCSERVERNAMELEN]; data/tigervnc-1.10.1+dfsg/vncviewer/vncviewer.cxx:546: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 defaultServerName[VNCSERVERNAMELEN] = ""; data/tigervnc-1.10.1+dfsg/vncviewer/vncviewer.cxx:620:16: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). port = atoi(vncServerName); data/tigervnc-1.10.1+dfsg/common/network/TcpSocket.cxx:238:5: [1] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant character. strcat(buffer, "]"); data/tigervnc-1.10.1+dfsg/common/network/TcpSocket.cxx:274:16: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int buflen = strlen(address.buf) + 32; data/tigervnc-1.10.1+dfsg/common/network/TcpSocket.cxx:521: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(first.buf)) data/tigervnc-1.10.1+dfsg/common/network/TcpSocket.cxx:642: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). len = strlen (p); data/tigervnc-1.10.1+dfsg/common/network/TcpSocket.cxx:737:5: [1] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant character. strcat(buffer, "]"); data/tigervnc-1.10.1+dfsg/common/network/TcpSocket.cxx:750:25: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). + strlen (addr.buf) // address data/tigervnc-1.10.1+dfsg/common/network/UnixSocket.cxx:52:7: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(path) >= sizeof(addr.sun_path)) data/tigervnc-1.10.1+dfsg/common/network/UnixSocket.cxx:123:7: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(path) >= sizeof(addr.sun_path)) data/tigervnc-1.10.1+dfsg/common/network/UnixSocket.cxx:137:17: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). saved_umask = umask(0777); data/tigervnc-1.10.1+dfsg/common/network/UnixSocket.cxx:140:3: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). umask(saved_umask); data/tigervnc-1.10.1+dfsg/common/os/os.cxx:65:8: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(homedir); data/tigervnc-1.10.1+dfsg/common/os/os.cxx:82: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). memcpy(dir+strlen(dir), (TCHAR *)"\\vnc\\\0", 6); data/tigervnc-1.10.1+dfsg/common/rdr/Exception.cxx:55:3: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. Risk is low because the source is a constant string. strncat(str_, ": ", len-1-strlen(str_)); data/tigervnc-1.10.1+dfsg/common/rdr/Exception.cxx:55: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). strncat(str_, ": ", len-1-strlen(str_)); data/tigervnc-1.10.1+dfsg/common/rdr/Exception.cxx:66:5: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. strncat(str_, msg, len-1-strlen(str_)); data/tigervnc-1.10.1+dfsg/common/rdr/Exception.cxx:66:30: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strncat(str_, msg, len-1-strlen(str_)); data/tigervnc-1.10.1+dfsg/common/rdr/Exception.cxx:69:33: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). WCHAR* tmsg = new WCHAR[len-strlen(str_)]; data/tigervnc-1.10.1+dfsg/common/rdr/Exception.cxx:71:42: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). 0, err, 0, tmsg, len-1-strlen(str_), 0); data/tigervnc-1.10.1+dfsg/common/rdr/Exception.cxx:72:42: [1] (buffer) wcslen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). WideCharToMultiByte(CP_ACP, 0, tmsg, wcslen(tmsg)+1, data/tigervnc-1.10.1+dfsg/common/rdr/Exception.cxx:73:22: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). str_+strlen(str_), len-strlen(str_), 0, 0); data/tigervnc-1.10.1+dfsg/common/rdr/Exception.cxx:73:40: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). str_+strlen(str_), len-strlen(str_), 0, 0); data/tigervnc-1.10.1+dfsg/common/rdr/Exception.cxx:76:26: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). char* currStr = str_+strlen(str_); data/tigervnc-1.10.1+dfsg/common/rdr/Exception.cxx:78:45: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). 0, err, 0, currStr, len-1-strlen(str_), 0); data/tigervnc-1.10.1+dfsg/common/rdr/Exception.cxx:80:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int l = strlen(str_); data/tigervnc-1.10.1+dfsg/common/rdr/Exception.cxx:86:3: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. strncat(str_, strerror(err), len-1-strlen(str_)); data/tigervnc-1.10.1+dfsg/common/rdr/Exception.cxx:86:38: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strncat(str_, strerror(err), len-1-strlen(str_)); data/tigervnc-1.10.1+dfsg/common/rdr/Exception.cxx:88:3: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. Risk is low because the source is a constant string. strncat(str_, " (", len-1-strlen(str_)); data/tigervnc-1.10.1+dfsg/common/rdr/Exception.cxx:88: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). strncat(str_, " (", len-1-strlen(str_)); data/tigervnc-1.10.1+dfsg/common/rdr/Exception.cxx:96:3: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. strncat(str_, buf, len-1-strlen(str_)); data/tigervnc-1.10.1+dfsg/common/rdr/Exception.cxx:96: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). strncat(str_, buf, len-1-strlen(str_)); data/tigervnc-1.10.1+dfsg/common/rdr/Exception.cxx:97:3: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. Risk is low because the source is a constant character. strncat(str_, ")", len-1-strlen(str_)); data/tigervnc-1.10.1+dfsg/common/rdr/Exception.cxx:97: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). strncat(str_, ")", len-1-strlen(str_)); data/tigervnc-1.10.1+dfsg/common/rdr/HexInStream.cxx:54: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). size_t l=strlen(s); data/tigervnc-1.10.1+dfsg/common/rdr/OutStream.h:77: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). U32 len = strlen(str); data/tigervnc-1.10.1+dfsg/common/rfb/CConnection.cxx:594:25: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t sizes[1] = { strlen(filtered.buf) + 1 }; data/tigervnc-1.10.1+dfsg/common/rfb/CConnection.cxx:648:19: [1] (buffer) equal: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. if (server.pf().equal(pf) && !formatChange) data/tigervnc-1.10.1+dfsg/common/rfb/CMsgReader.cxx:55:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). pf.read(is); data/tigervnc-1.10.1+dfsg/common/rfb/CMsgWriter.cxx:194:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(str); data/tigervnc-1.10.1+dfsg/common/rfb/CSecurityPlain.cxx:39:16: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). os->writeU32(strlen(username.buf)); data/tigervnc-1.10.1+dfsg/common/rfb/CSecurityPlain.cxx:40:16: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). os->writeU32(strlen(password.buf)); data/tigervnc-1.10.1+dfsg/common/rfb/CSecurityPlain.cxx:41:31: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). os->writeBytes(username.buf,strlen(username.buf)); data/tigervnc-1.10.1+dfsg/common/rfb/CSecurityPlain.cxx:42:31: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). os->writeBytes(password.buf,strlen(password.buf)); data/tigervnc-1.10.1+dfsg/common/rfb/CSecurityTLS.cxx:89:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int len = strlen(homeDir) + 1; data/tigervnc-1.10.1+dfsg/common/rfb/CSecurityTLS.cxx:216: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). prio = (char*)malloc(strlen(Security::GnuTLSPriority) + data/tigervnc-1.10.1+dfsg/common/rfb/CSecurityTLS.cxx:217: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). strlen(kx_anon_priority) + 1); data/tigervnc-1.10.1+dfsg/common/rfb/CSecurityTLS.cxx:261:32: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strlen(client->getServerName())) != GNUTLS_E_SUCCESS) data/tigervnc-1.10.1+dfsg/common/rfb/CSecurityTLS.cxx:362:20: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). CharArray dbPath(strlen(homeDir) + 16 + 1); data/tigervnc-1.10.1+dfsg/common/rfb/CSecurityTLS.cxx:385:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen((char*)info.data); data/tigervnc-1.10.1+dfsg/common/rfb/CSecurityVncAuth.cxx:56:16: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int pwdLen = strlen(passwd.buf); data/tigervnc-1.10.1+dfsg/common/rfb/Configuration.cxx:70: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). return set(n, strlen(n), v, immutable); data/tigervnc-1.10.1+dfsg/common/rfb/Configuration.cxx:78:14: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ((int)strlen(current->getName()) == len && data/tigervnc-1.10.1+dfsg/common/rfb/Configuration.cxx:99:7: [1] (buffer) equal: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. if (equal) { data/tigervnc-1.10.1+dfsg/common/rfb/Configuration.cxx:135:18: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int column = strlen(current->getName()); data/tigervnc-1.10.1+dfsg/common/rfb/Configuration.cxx:142:22: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). else wordLen = strlen(desc); data/tigervnc-1.10.1+dfsg/common/rfb/Configuration.cxx:155:25: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (column + (int)strlen(def_str) + 11 > width) data/tigervnc-1.10.1+dfsg/common/rfb/EncodeManager.cxx:198:20: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). (int)strlen("Copies"), "", data/tigervnc-1.10.1+dfsg/common/rfb/EncodeManager.cxx:229:22: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). (int)strlen(encoderTypeName((EncoderType)j)), "", data/tigervnc-1.10.1+dfsg/common/rfb/EncodeManager.cxx:1000:37: [1] (buffer) equal: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. if (convert && !conn->client.pf().equal(pb->getPF())) { data/tigervnc-1.10.1+dfsg/common/rfb/Hostname.h:54:31: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). hostEnd = hostStart + strlen(hostStart); data/tigervnc-1.10.1+dfsg/common/rfb/Hostname.h:62:33: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). hostEnd = hostStart + strlen(hostStart); data/tigervnc-1.10.1+dfsg/common/rfb/Hostname.h:74:7: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(*host, hostStart, len-1); data/tigervnc-1.10.1+dfsg/common/rfb/JpegCompressor.cxx:180:14: [1] (buffer) equal: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. if (pfRGBX.equal(pf)) data/tigervnc-1.10.1+dfsg/common/rfb/JpegCompressor.cxx:182:19: [1] (buffer) equal: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. else if (pfBGRX.equal(pf)) data/tigervnc-1.10.1+dfsg/common/rfb/JpegCompressor.cxx:184:19: [1] (buffer) equal: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. else if (pfXRGB.equal(pf)) data/tigervnc-1.10.1+dfsg/common/rfb/JpegCompressor.cxx:186:19: [1] (buffer) equal: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. else if (pfXBGR.equal(pf)) data/tigervnc-1.10.1+dfsg/common/rfb/JpegDecompressor.cxx:181:14: [1] (buffer) equal: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. if (pfRGBX.equal(pf)) data/tigervnc-1.10.1+dfsg/common/rfb/JpegDecompressor.cxx:183:19: [1] (buffer) equal: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. else if (pfBGRX.equal(pf)) data/tigervnc-1.10.1+dfsg/common/rfb/JpegDecompressor.cxx:185:19: [1] (buffer) equal: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. else if (pfXRGB.equal(pf)) data/tigervnc-1.10.1+dfsg/common/rfb/JpegDecompressor.cxx:187:19: [1] (buffer) equal: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. else if (pfXBGR.equal(pf)) data/tigervnc-1.10.1+dfsg/common/rfb/KeyRemapper.cxx:54: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). nextComma = m + strlen(m); data/tigervnc-1.10.1+dfsg/common/rfb/LogWriter.cxx:125: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(logParam.buf) && !LogWriter::setLogParams(logParam.buf)) data/tigervnc-1.10.1+dfsg/common/rfb/Logger_file.cxx:50: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). CharArray bakFilename(strlen(m_filename) + 1 + 4); data/tigervnc-1.10.1+dfsg/common/rfb/Logger_file.cxx:65:16: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int column = strlen(logname) + 2; data/tigervnc-1.10.1+dfsg/common/rfb/Logger_file.cxx:74:20: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). else wordLen = strlen(message); data/tigervnc-1.10.1+dfsg/common/rfb/Password.cxx:58:20: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). memset(buf, 0, strlen(buf)); data/tigervnc-1.10.1+dfsg/common/rfb/Password.cxx:70:14: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t l = strlen(plainPwd.buf), i; data/tigervnc-1.10.1+dfsg/common/rfb/PixelBuffer.cxx:98:14: [1] (buffer) equal: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. if (format.equal(pf)) { data/tigervnc-1.10.1+dfsg/common/rfb/PixelFormat.cxx:98:19: [1] (buffer) equal: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. bool PixelFormat::equal(const PixelFormat& other) const data/tigervnc-1.10.1+dfsg/common/rfb/PixelFormat.cxx:147:19: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void PixelFormat::read(rdr::InStream* is) data/tigervnc-1.10.1+dfsg/common/rfb/PixelFormat.cxx:380:7: [1] (buffer) equal: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. if (equal(srcPF)) { data/tigervnc-1.10.1+dfsg/common/rfb/PixelFormat.cxx:501:3: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. Risk is low because the source is a constant string. strncat(str, "depth ", len-1-strlen(str)); data/tigervnc-1.10.1+dfsg/common/rfb/PixelFormat.cxx:501:32: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strncat(str, "depth ", len-1-strlen(str)); data/tigervnc-1.10.1+dfsg/common/rfb/PixelFormat.cxx:503:3: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. strncat(str, num, len-1-strlen(str)); data/tigervnc-1.10.1+dfsg/common/rfb/PixelFormat.cxx:503: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). strncat(str, num, len-1-strlen(str)); data/tigervnc-1.10.1+dfsg/common/rfb/PixelFormat.cxx:504:3: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. Risk is low because the source is a constant string. strncat(str, " (", len-1-strlen(str)); data/tigervnc-1.10.1+dfsg/common/rfb/PixelFormat.cxx:504: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). strncat(str, " (", len-1-strlen(str)); data/tigervnc-1.10.1+dfsg/common/rfb/PixelFormat.cxx:506:3: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. strncat(str, num, len-1-strlen(str)); data/tigervnc-1.10.1+dfsg/common/rfb/PixelFormat.cxx:506: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). strncat(str, num, len-1-strlen(str)); data/tigervnc-1.10.1+dfsg/common/rfb/PixelFormat.cxx:507:3: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. Risk is low because the source is a constant string. strncat(str, "bpp)", len-1-strlen(str)); data/tigervnc-1.10.1+dfsg/common/rfb/PixelFormat.cxx:507:30: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strncat(str, "bpp)", len-1-strlen(str)); data/tigervnc-1.10.1+dfsg/common/rfb/PixelFormat.cxx:510:7: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. Risk is low because the source is a constant string. strncat(str, " big-endian", len-1-strlen(str)); data/tigervnc-1.10.1+dfsg/common/rfb/PixelFormat.cxx:510:41: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strncat(str, " big-endian", len-1-strlen(str)); data/tigervnc-1.10.1+dfsg/common/rfb/PixelFormat.cxx:512:7: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. Risk is low because the source is a constant string. strncat(str, " little-endian", len-1-strlen(str)); data/tigervnc-1.10.1+dfsg/common/rfb/PixelFormat.cxx:512:44: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strncat(str, " little-endian", len-1-strlen(str)); data/tigervnc-1.10.1+dfsg/common/rfb/PixelFormat.cxx:516:5: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. Risk is low because the source is a constant string. strncat(str, " color-map", len-1-strlen(str)); data/tigervnc-1.10.1+dfsg/common/rfb/PixelFormat.cxx:516:38: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strncat(str, " color-map", len-1-strlen(str)); data/tigervnc-1.10.1+dfsg/common/rfb/PixelFormat.cxx:525:5: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. Risk is low because the source is a constant string. strncat(str, " rgb", len-1-strlen(str)); data/tigervnc-1.10.1+dfsg/common/rfb/PixelFormat.cxx:525:32: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strncat(str, " rgb", len-1-strlen(str)); data/tigervnc-1.10.1+dfsg/common/rfb/PixelFormat.cxx:527:5: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. strncat(str, num, len-1-strlen(str)); data/tigervnc-1.10.1+dfsg/common/rfb/PixelFormat.cxx:527: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). strncat(str, num, len-1-strlen(str)); data/tigervnc-1.10.1+dfsg/common/rfb/PixelFormat.cxx:529:5: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. strncat(str, num, len-1-strlen(str)); data/tigervnc-1.10.1+dfsg/common/rfb/PixelFormat.cxx:529: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). strncat(str, num, len-1-strlen(str)); data/tigervnc-1.10.1+dfsg/common/rfb/PixelFormat.cxx:531:5: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. strncat(str, num, len-1-strlen(str)); data/tigervnc-1.10.1+dfsg/common/rfb/PixelFormat.cxx:531: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). strncat(str, num, len-1-strlen(str)); data/tigervnc-1.10.1+dfsg/common/rfb/PixelFormat.cxx:540:5: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. Risk is low because the source is a constant string. strncat(str, " bgr", len-1-strlen(str)); data/tigervnc-1.10.1+dfsg/common/rfb/PixelFormat.cxx:540:32: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strncat(str, " bgr", len-1-strlen(str)); data/tigervnc-1.10.1+dfsg/common/rfb/PixelFormat.cxx:542:5: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. strncat(str, num, len-1-strlen(str)); data/tigervnc-1.10.1+dfsg/common/rfb/PixelFormat.cxx:542: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). strncat(str, num, len-1-strlen(str)); data/tigervnc-1.10.1+dfsg/common/rfb/PixelFormat.cxx:544:5: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. strncat(str, num, len-1-strlen(str)); data/tigervnc-1.10.1+dfsg/common/rfb/PixelFormat.cxx:544: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). strncat(str, num, len-1-strlen(str)); data/tigervnc-1.10.1+dfsg/common/rfb/PixelFormat.cxx:546:5: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. strncat(str, num, len-1-strlen(str)); data/tigervnc-1.10.1+dfsg/common/rfb/PixelFormat.cxx:546: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). strncat(str, num, len-1-strlen(str)); data/tigervnc-1.10.1+dfsg/common/rfb/PixelFormat.cxx:550:3: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. Risk is low because the source is a constant string. strncat(str, " rgb max ", len-1-strlen(str)); data/tigervnc-1.10.1+dfsg/common/rfb/PixelFormat.cxx:550:35: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strncat(str, " rgb max ", len-1-strlen(str)); data/tigervnc-1.10.1+dfsg/common/rfb/PixelFormat.cxx:552:3: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. strncat(str, num, len-1-strlen(str)); data/tigervnc-1.10.1+dfsg/common/rfb/PixelFormat.cxx:552: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). strncat(str, num, len-1-strlen(str)); data/tigervnc-1.10.1+dfsg/common/rfb/PixelFormat.cxx:554:3: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. strncat(str, num, len-1-strlen(str)); data/tigervnc-1.10.1+dfsg/common/rfb/PixelFormat.cxx:554: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). strncat(str, num, len-1-strlen(str)); data/tigervnc-1.10.1+dfsg/common/rfb/PixelFormat.cxx:556:3: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. strncat(str, num, len-1-strlen(str)); data/tigervnc-1.10.1+dfsg/common/rfb/PixelFormat.cxx:556: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). strncat(str, num, len-1-strlen(str)); data/tigervnc-1.10.1+dfsg/common/rfb/PixelFormat.cxx:557:3: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. Risk is low because the source is a constant string. strncat(str, " shift ", len-1-strlen(str)); data/tigervnc-1.10.1+dfsg/common/rfb/PixelFormat.cxx:557:33: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strncat(str, " shift ", len-1-strlen(str)); data/tigervnc-1.10.1+dfsg/common/rfb/PixelFormat.cxx:559:3: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. strncat(str, num, len-1-strlen(str)); data/tigervnc-1.10.1+dfsg/common/rfb/PixelFormat.cxx:559: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). strncat(str, num, len-1-strlen(str)); data/tigervnc-1.10.1+dfsg/common/rfb/PixelFormat.cxx:561:3: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. strncat(str, num, len-1-strlen(str)); data/tigervnc-1.10.1+dfsg/common/rfb/PixelFormat.cxx:561: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). strncat(str, num, len-1-strlen(str)); data/tigervnc-1.10.1+dfsg/common/rfb/PixelFormat.cxx:563:3: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. strncat(str, num, len-1-strlen(str)); data/tigervnc-1.10.1+dfsg/common/rfb/PixelFormat.cxx:563: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). strncat(str, num, len-1-strlen(str)); data/tigervnc-1.10.1+dfsg/common/rfb/PixelFormat.cxx:571:7: [1] (buffer) sscanf: 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 (sscanf(str, "%3s%1d%1d%1d", rgbbgr, &bits1, &bits2, &bits3) < 4) data/tigervnc-1.10.1+dfsg/common/rfb/PixelFormat.h:52:10: [1] (buffer) equal: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. bool equal(const PixelFormat& other) const; data/tigervnc-1.10.1+dfsg/common/rfb/PixelFormat.h:54:10: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void read(rdr::InStream* is); data/tigervnc-1.10.1+dfsg/common/rfb/SConnection.cxx:521:25: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t sizes[1] = { strlen(filtered.buf) + 1 }; data/tigervnc-1.10.1+dfsg/common/rfb/SMsgReader.cxx:99:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). pf.read(is); data/tigervnc-1.10.1+dfsg/common/rfb/SMsgWriter.cxx:93:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(str); data/tigervnc-1.10.1+dfsg/common/rfb/SSecurityTLS.cxx:182: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). prio = (char*)malloc(strlen(Security::GnuTLSPriority) + data/tigervnc-1.10.1+dfsg/common/rfb/SSecurityTLS.cxx:183: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). strlen(kx_anon_priority) + 1); data/tigervnc-1.10.1+dfsg/common/rfb/SSecurityVncAuth.cxx:63:16: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int pwdLen = strlen(password.buf); data/tigervnc-1.10.1+dfsg/common/rfb/ScaleFilters.cxx:83:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(filter.name, name_, sizeof(filter.name)-1); data/tigervnc-1.10.1+dfsg/common/rfb/ScreenSet.h:117:7: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. strncat(str, buffer, len - 1 - strlen(str)); data/tigervnc-1.10.1+dfsg/common/rfb/ScreenSet.h:117:38: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strncat(str, buffer, len - 1 - strlen(str)); data/tigervnc-1.10.1+dfsg/common/rfb/ScreenSet.h:125:9: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. strncat(str, buffer, len - 1 - strlen(str)); data/tigervnc-1.10.1+dfsg/common/rfb/ScreenSet.h:125:40: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strncat(str, buffer, len - 1 - strlen(str)); data/tigervnc-1.10.1+dfsg/common/rfb/TightDecoder.cxx:358:19: [1] (buffer) equal: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. if (pb->getPF().equal(pf)) { data/tigervnc-1.10.1+dfsg/common/rfb/util.cxx:57:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int l = strlen(s); data/tigervnc-1.10.1+dfsg/common/rfb/util.cxx:76:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int len = strlen(src); data/tigervnc-1.10.1+dfsg/common/rfb/util.cxx:103: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). int l=strlen(src); data/tigervnc-1.10.1+dfsg/common/rfb/util.cxx:111:7: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(dest, src, destlen-1); data/tigervnc-1.10.1+dfsg/unix/tx/TXButton.h:63:53: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int textWidth = XTextWidth(defaultFS, text.buf, strlen(text.buf)); data/tigervnc-1.10.1+dfsg/unix/tx/TXButton.h:80:46: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int tw = XTextWidth(defaultFS, text.buf, strlen(text.buf)); data/tigervnc-1.10.1+dfsg/unix/tx/TXButton.h:91:59: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). XDrawString(dpy, win(), gc, startx, starty, text.buf, strlen(text.buf)); data/tigervnc-1.10.1+dfsg/unix/tx/TXCheckbox.h:72:49: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int textWidth = XTextWidth(defaultFS, text, strlen(text)); data/tigervnc-1.10.1+dfsg/unix/tx/TXCheckbox.h:109: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). text, strlen(text)); data/tigervnc-1.10.1+dfsg/unix/vncconfig/vncExt.c:58:18: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int paramLen = strlen(param); data/tigervnc-1.10.1+dfsg/unix/vncconfig/vncExt.c:84:18: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int paramLen = strlen(param); data/tigervnc-1.10.1+dfsg/unix/vncconfig/vncExt.c:123:18: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int paramLen = strlen(param); data/tigervnc-1.10.1+dfsg/unix/vncconfig/vncExt.c:231:16: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int strLen = strlen(hostAndPort); data/tigervnc-1.10.1+dfsg/unix/vncpasswd/vncpasswd.cxx:63:16: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (result[strlen(result)-1] == '\n') data/tigervnc-1.10.1+dfsg/unix/vncpasswd/vncpasswd.cxx:64:14: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). result[strlen(result)-1] = 0; data/tigervnc-1.10.1+dfsg/unix/vncpasswd/vncpasswd.cxx:101: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(passwd.buf) < 6) { data/tigervnc-1.10.1+dfsg/unix/vncpasswd/vncpasswd.cxx:102:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(passwd.buf) == 0) { data/tigervnc-1.10.1+dfsg/unix/vncpasswd/vncpasswd.cxx:150:22: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). fname = new char[strlen(homeDir) + 7]; data/tigervnc-1.10.1+dfsg/unix/x0vncserver/Geometry.cxx:50: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). bool geometrySpecified = (strlen(param) > 0); data/tigervnc-1.10.1+dfsg/unix/x0vncserver/Geometry.cxx:70:22: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (arg != NULL && strlen(arg) > 0) { data/tigervnc-1.10.1+dfsg/unix/x0vncserver/XDesktop.cxx:119:38: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strncmp("evdev", keycodes, strlen("evdev")) == 0) { data/tigervnc-1.10.1+dfsg/unix/x0vncserver/XDesktop.cxx:123: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). } else if (strncmp("xfree86", keycodes, strlen("xfree86")) == 0) { data/tigervnc-1.10.1+dfsg/unix/x0vncserver/x0vncserver.cxx:169:15: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c = getc(fp); data/tigervnc-1.10.1+dfsg/unix/x0vncserver/x0vncserver.cxx:274: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(hostsData) != 0) data/tigervnc-1.10.1+dfsg/unix/xserver/hw/vnc/RFBGlue.cc:165:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int l = strlen(i.param->getName()); data/tigervnc-1.10.1+dfsg/unix/xserver/hw/vnc/RFBGlue.cc:176:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int l = strlen(i.param->getName()); data/tigervnc-1.10.1+dfsg/unix/xserver/hw/vnc/XserverDesktop.cc:282:53: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void XserverDesktop::handleSocketEvent(int fd, bool read, bool write) data/tigervnc-1.10.1+dfsg/unix/xserver/hw/vnc/XserverDesktop.cc:285:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read) { data/tigervnc-1.10.1+dfsg/unix/xserver/hw/vnc/XserverDesktop.cc:290:39: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (handleSocketEvent(fd, server, read, write)) data/tigervnc-1.10.1+dfsg/unix/xserver/hw/vnc/XserverDesktop.cc:324:45: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). bool read, bool write) data/tigervnc-1.10.1+dfsg/unix/xserver/hw/vnc/XserverDesktop.cc:338:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read) data/tigervnc-1.10.1+dfsg/unix/xserver/hw/vnc/XserverDesktop.h:72:39: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void handleSocketEvent(int fd, bool read, bool write); data/tigervnc-1.10.1+dfsg/unix/xserver/hw/vnc/XserverDesktop.h:112:31: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). bool read, bool write); data/tigervnc-1.10.1+dfsg/unix/xserver/hw/vnc/vncBlockHandler.c:45:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int read, write; data/tigervnc-1.10.1+dfsg/unix/xserver/hw/vnc/vncBlockHandler.c:65:45: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void vncSetNotifyFd(int fd, int scrIdx, int read, int write) data/tigervnc-1.10.1+dfsg/unix/xserver/hw/vnc/vncBlockHandler.c:68:15: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int mask = (read ? X_NOTIFY_READ : 0) | (write ? X_NOTIFY_WRITE : 0); data/tigervnc-1.10.1+dfsg/unix/xserver/hw/vnc/vncBlockHandler.c:77:21: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). entry->read = read; data/tigervnc-1.10.1+dfsg/unix/xserver/hw/vnc/vncBlockHandler.c:89:17: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). entry->read = read; data/tigervnc-1.10.1+dfsg/unix/xserver/hw/vnc/vncBlockHandler.c:178:16: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (entry->read) data/tigervnc-1.10.1+dfsg/unix/xserver/hw/vnc/vncBlockHandler.c:199:16: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (entry->read && FD_ISSET(entry->fd, fds)) data/tigervnc-1.10.1+dfsg/unix/xserver/hw/vnc/vncBlockHandler.h:29:45: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void vncSetNotifyFd(int fd, int scrIdx, int read, int write); data/tigervnc-1.10.1+dfsg/unix/xserver/hw/vnc/vncExt.c:121:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(param, (char*)&stuff[1], stuff->paramLen); data/tigervnc-1.10.1+dfsg/unix/xserver/hw/vnc/vncExt.c:189:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(param, (char*)&stuff[1], stuff->paramLen); data/tigervnc-1.10.1+dfsg/unix/xserver/hw/vnc/vncExt.c:193: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). len = value ? strlen(value) : 0; data/tigervnc-1.10.1+dfsg/unix/xserver/hw/vnc/vncExt.c:249:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(param, (char*)&stuff[1], stuff->paramLen); data/tigervnc-1.10.1+dfsg/unix/xserver/hw/vnc/vncExt.c:253:16: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = desc ? strlen(desc) : 0; data/tigervnc-1.10.1+dfsg/unix/xserver/hw/vnc/vncExt.c:310:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(params); data/tigervnc-1.10.1+dfsg/unix/xserver/hw/vnc/vncExt.c:410:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(address, (char*)&stuff[1], stuff->strLen); data/tigervnc-1.10.1+dfsg/unix/xserver/hw/vnc/vncExt.c:466: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). rep.addrLen = qcTimeout ? strlen(qcAddress) : 0; data/tigervnc-1.10.1+dfsg/unix/xserver/hw/vnc/vncExt.c:467: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). rep.userLen = qcTimeout ? strlen(qcUsername) : 0; data/tigervnc-1.10.1+dfsg/unix/xserver/hw/vnc/vncExt.c:490: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). WriteToClient(client, strlen(qcAddress), qcAddress); data/tigervnc-1.10.1+dfsg/unix/xserver/hw/vnc/vncExt.c:492: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). WriteToClient(client, strlen(qcUsername), qcUsername); data/tigervnc-1.10.1+dfsg/unix/xserver/hw/vnc/vncExtInit.cc:187:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(path, rfbunixpath, sizeof(path)); data/tigervnc-1.10.1+dfsg/unix/xserver/hw/vnc/vncExtInit.cc:256:51: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void vncHandleSocketEvent(int fd, int scrIdx, int read, int write) data/tigervnc-1.10.1+dfsg/unix/xserver/hw/vnc/vncExtInit.cc:258:42: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). desktop[scrIdx]->handleSocketEvent(fd, read, write); data/tigervnc-1.10.1+dfsg/unix/xserver/hw/vnc/vncExtInit.cc:308:7: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(addr) == 0) { data/tigervnc-1.10.1+dfsg/unix/xserver/hw/vnc/vncExtInit.h:46:51: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void vncHandleSocketEvent(int fd, int scrIdx, int read, int write); data/tigervnc-1.10.1+dfsg/unix/xserver/hw/vnc/vncSelection.c:373:38: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strlen(latin1), latin1, TRUE); data/tigervnc-1.10.1+dfsg/unix/xserver/hw/vnc/vncSelection.c:382:38: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strlen(data), data, TRUE); data/tigervnc-1.10.1+dfsg/unix/xserver/hw/vnc/vncSelection.c:543:20: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). (int)strlen(utf8)); data/tigervnc-1.10.1+dfsg/unix/xserver/hw/vnc/vncSelection.c:561:20: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). (int)strlen(filtered)); data/tigervnc-1.10.1+dfsg/unix/xserver/hw/vnc/xvnc.c:546:6: [1] (buffer) sscanf: 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 (sscanf(argv[i], "%3s%1d%1d%1d", rgbbgr,&bits1,&bits2,&bits3) < 4) { data/tigervnc-1.10.1+dfsg/unix/xserver/hw/vnc/xvnc.c:1319: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). modeInfo.nameLength = strlen(name); data/tigervnc-1.10.1+dfsg/unix/xserver/hw/vnc/xvnc.c:1382:44: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). output = RROutputCreate(pScreen, name, strlen(name), NULL); data/tigervnc-1.10.1+dfsg/vncviewer/CConn.cxx:159:3: [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(infoText, "\n"); data/tigervnc-1.10.1+dfsg/vncviewer/CConn.cxx:164:3: [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(infoText, "\n"); data/tigervnc-1.10.1+dfsg/vncviewer/CConn.cxx:169:3: [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(infoText, "\n"); data/tigervnc-1.10.1+dfsg/vncviewer/CConn.cxx:177:3: [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(infoText, "\n"); data/tigervnc-1.10.1+dfsg/vncviewer/CConn.cxx:184:3: [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(infoText, "\n"); data/tigervnc-1.10.1+dfsg/vncviewer/CConn.cxx:189:3: [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(infoText, "\n"); data/tigervnc-1.10.1+dfsg/vncviewer/CConn.cxx:194:3: [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(infoText, "\n"); data/tigervnc-1.10.1+dfsg/vncviewer/CConn.cxx:199:3: [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(infoText, "\n"); data/tigervnc-1.10.1+dfsg/vncviewer/CConn.cxx:204:3: [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(infoText, "\n"); data/tigervnc-1.10.1+dfsg/vncviewer/CConn.cxx:209:3: [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(infoText, "\n"); data/tigervnc-1.10.1+dfsg/vncviewer/ServerDialog.cxx:124:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(newservername, dialog.serverName->value(), VNCSERVERNAMELEN); data/tigervnc-1.10.1+dfsg/vncviewer/Viewport.cxx:318:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(data); data/tigervnc-1.10.1+dfsg/vncviewer/Viewport.cxx:568: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). vlog.debug("Sending clipboard data (%d bytes)", (int)strlen(filtered)); data/tigervnc-1.10.1+dfsg/vncviewer/gettext.h:216:24: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t msgctxt_len = strlen (msgctxt) + 1; data/tigervnc-1.10.1+dfsg/vncviewer/gettext.h:217:22: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t msgid_len = strlen (msgid) + 1; data/tigervnc-1.10.1+dfsg/vncviewer/gettext.h:264:24: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t msgctxt_len = strlen (msgctxt) + 1; data/tigervnc-1.10.1+dfsg/vncviewer/gettext.h:265:22: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t msgid_len = strlen (msgid) + 1; data/tigervnc-1.10.1+dfsg/vncviewer/parameters.cxx:276:38: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). unsigned size = fl_utf8towc(_name, strlen(_name)+1, name, buffersize); data/tigervnc-1.10.1+dfsg/vncviewer/parameters.cxx:289:38: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size = fl_utf8towc(encodingBuffer, strlen(encodingBuffer)+1, value, buffersize); data/tigervnc-1.10.1+dfsg/vncviewer/parameters.cxx:295:69: [1] (buffer) wcslen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). LONG res = RegSetValueExW(*hKey, name, 0, REG_SZ, (BYTE*)&value, (wcslen(value)+1)*2); data/tigervnc-1.10.1+dfsg/vncviewer/parameters.cxx:310:38: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). unsigned size = fl_utf8towc(_name, strlen(_name)+1, name, buffersize); data/tigervnc-1.10.1+dfsg/vncviewer/parameters.cxx:332:38: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). unsigned size = fl_utf8towc(_name, strlen(_name)+1, name, buffersize); data/tigervnc-1.10.1+dfsg/vncviewer/parameters.cxx:353:50: [1] (buffer) wcslen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size = fl_utf8fromwc(utf8val, destSize, value, wcslen(value)+1); data/tigervnc-1.10.1+dfsg/vncviewer/parameters.cxx:375:38: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). unsigned size = fl_utf8towc(_name, strlen(_name)+1, name, buffersize); data/tigervnc-1.10.1+dfsg/vncviewer/parameters.cxx:590: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(line) == (sizeof(line) - 1)) data/tigervnc-1.10.1+dfsg/vncviewer/parameters.cxx:596:43: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if(strncmp(line, IDENTIFIER_STRING, strlen(IDENTIFIER_STRING)) == 0) data/tigervnc-1.10.1+dfsg/vncviewer/parameters.cxx:607:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int len = strlen(line); data/tigervnc-1.10.1+dfsg/vncviewer/vncviewer.cxx:419:7: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(vncServerName, newServerName, VNCSERVERNAMELEN-1); data/tigervnc-1.10.1+dfsg/vncviewer/vncviewer.cxx:442: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(pos); data/tigervnc-1.10.1+dfsg/vncviewer/vncviewer.cxx:455:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(remoteHost, vncServerName, VNCSERVERNAMELEN); data/tigervnc-1.10.1+dfsg/vncviewer/vncviewer.cxx:457:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). Risk is low because the source is a constant string. strncpy(remoteHost, "localhost", VNCSERVERNAMELEN); data/tigervnc-1.10.1+dfsg/vncviewer/vncviewer.cxx:551:7: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(defaultServerName, configServerName, VNCSERVERNAMELEN-1); data/tigervnc-1.10.1+dfsg/vncviewer/vncviewer.cxx:577:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(vncServerName, argv[i], VNCSERVERNAMELEN); data/tigervnc-1.10.1+dfsg/vncviewer/vncviewer.cxx:604:21: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (listenMode && strlen(via.getValueStr()) > 0) { data/tigervnc-1.10.1+dfsg/vncviewer/vncviewer.cxx:675: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 (via.getValueStr()) > 0 && mktunnel() != 0) ANALYSIS SUMMARY: Hits = 497 Lines analyzed = 65433 in approximately 1.77 seconds (36998 lines/second) Physical Source Lines of Code (SLOC) = 44092 Hits@level = [0] 224 [1] 242 [2] 207 [3] 5 [4] 39 [5] 4 Hits@level+ = [0+] 721 [1+] 497 [2+] 255 [3+] 48 [4+] 43 [5+] 4 Hits/KSLOC@level+ = [0+] 16.3522 [1+] 11.2719 [2+] 5.78336 [3+] 1.08863 [4+] 0.975234 [5+] 0.0907194 Dot directories skipped = 3 (--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.