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/x2goclient-4.1.2.2/portable/stopu3client.cpp Examining data/x2goclient-4.1.2.2/src/appdialog.cpp Examining data/x2goclient-4.1.2.2/src/appdialog.h Examining data/x2goclient-4.1.2.2/src/brokerpassdlg.cpp Examining data/x2goclient-4.1.2.2/src/brokerpassdlg.h Examining data/x2goclient-4.1.2.2/src/compat.cpp Examining data/x2goclient-4.1.2.2/src/compat.h Examining data/x2goclient-4.1.2.2/src/configdialog.cpp Examining data/x2goclient-4.1.2.2/src/configdialog.h Examining data/x2goclient-4.1.2.2/src/configwidget.cpp Examining data/x2goclient-4.1.2.2/src/configwidget.h Examining data/x2goclient-4.1.2.2/src/connectionwidget.cpp Examining data/x2goclient-4.1.2.2/src/connectionwidget.h Examining data/x2goclient-4.1.2.2/src/contest.cpp Examining data/x2goclient-4.1.2.2/src/contest.h Examining data/x2goclient-4.1.2.2/src/cupsprint.cpp Examining data/x2goclient-4.1.2.2/src/cupsprintersettingsdialog.cpp Examining data/x2goclient-4.1.2.2/src/cupsprintersettingsdialog.h Examining data/x2goclient-4.1.2.2/src/cupsprint.h Examining data/x2goclient-4.1.2.2/src/cupsprintwidget.cpp Examining data/x2goclient-4.1.2.2/src/cupsprintwidget.h Examining data/x2goclient-4.1.2.2/src/exportdialog.cpp Examining data/x2goclient-4.1.2.2/src/exportdialog.h Examining data/x2goclient-4.1.2.2/src/folderbutton.cpp Examining data/x2goclient-4.1.2.2/src/folderbutton.h Examining data/x2goclient-4.1.2.2/src/folderexplorer.cpp Examining data/x2goclient-4.1.2.2/src/folderexplorer.h Examining data/x2goclient-4.1.2.2/src/help.cpp Examining data/x2goclient-4.1.2.2/src/helpdialog.cpp Examining data/x2goclient-4.1.2.2/src/helpdialog.h Examining data/x2goclient-4.1.2.2/src/help.h Examining data/x2goclient-4.1.2.2/src/httpbrokerclient.cpp Examining data/x2goclient-4.1.2.2/src/httpbrokerclient.h Examining data/x2goclient-4.1.2.2/src/imgframe.cpp Examining data/x2goclient-4.1.2.2/src/imgframe.h Examining data/x2goclient-4.1.2.2/src/InteractionDialog.h Examining data/x2goclient-4.1.2.2/src/LDAPSession.cpp Examining data/x2goclient-4.1.2.2/src/LDAPSession.h Examining data/x2goclient-4.1.2.2/src/mediawidget.cpp Examining data/x2goclient-4.1.2.2/src/mediawidget.h Examining data/x2goclient-4.1.2.2/src/non_modal_messagebox.cpp Examining data/x2goclient-4.1.2.2/src/non_modal_messagebox.h Examining data/x2goclient-4.1.2.2/src/ongetpass.h Examining data/x2goclient-4.1.2.2/src/printdialog.cpp Examining data/x2goclient-4.1.2.2/src/printdialog.h Examining data/x2goclient-4.1.2.2/src/printercmddialog.cpp Examining data/x2goclient-4.1.2.2/src/printercmddialog.h Examining data/x2goclient-4.1.2.2/src/printprocess.cpp Examining data/x2goclient-4.1.2.2/src/printprocess.h Examining data/x2goclient-4.1.2.2/src/printwidget.cpp Examining data/x2goclient-4.1.2.2/src/printwidget.h Examining data/x2goclient-4.1.2.2/src/pulsemanager.h Examining data/x2goclient-4.1.2.2/src/sessionbutton.h Examining data/x2goclient-4.1.2.2/src/sessionexplorer.cpp Examining data/x2goclient-4.1.2.2/src/sessionexplorer.h Examining data/x2goclient-4.1.2.2/src/sessionmanagedialog.cpp Examining data/x2goclient-4.1.2.2/src/sessionmanagedialog.h Examining data/x2goclient-4.1.2.2/src/sharewidget.h Examining data/x2goclient-4.1.2.2/src/sshmasterconnection.cpp Examining data/x2goclient-4.1.2.2/src/sshmasterconnection.h Examining data/x2goclient-4.1.2.2/src/sshprocess.cpp Examining data/x2goclient-4.1.2.2/src/sshprocess.h Examining data/x2goclient-4.1.2.2/src/SVGFrame.cpp Examining data/x2goclient-4.1.2.2/src/SVGFrame.h Examining data/x2goclient-4.1.2.2/src/unixhelper.cpp Examining data/x2goclient-4.1.2.2/src/unixhelper.h Examining data/x2goclient-4.1.2.2/src/unix_stdint.h Examining data/x2goclient-4.1.2.2/src/userbutton.cpp Examining data/x2goclient-4.1.2.2/src/userbutton.h Examining data/x2goclient-4.1.2.2/src/version.h Examining data/x2goclient-4.1.2.2/src/wapi.cpp Examining data/x2goclient-4.1.2.2/src/wapi.h Examining data/x2goclient-4.1.2.2/src/windows_stdint.h Examining data/x2goclient-4.1.2.2/src/x2goclientconfig.h Examining data/x2goclient-4.1.2.2/src/x2goclient.cpp Examining data/x2goclient-4.1.2.2/src/x2gologdebug.cpp Examining data/x2goclient-4.1.2.2/src/x2gologdebug.h Examining data/x2goclient-4.1.2.2/src/x2gosettings.cpp Examining data/x2goclient-4.1.2.2/src/x2gosettings.h Examining data/x2goclient-4.1.2.2/src/x2goutils.cpp Examining data/x2goclient-4.1.2.2/src/x2goutils.h Examining data/x2goclient-4.1.2.2/src/xsettingswidget.cpp Examining data/x2goclient-4.1.2.2/src/xsettingswidget.h Examining data/x2goclient-4.1.2.2/src/clicklineedit.cpp Examining data/x2goclient-4.1.2.2/src/clicklineedit.h Examining data/x2goclient-4.1.2.2/src/editconnectiondialog.cpp Examining data/x2goclient-4.1.2.2/src/editconnectiondialog.h Examining data/x2goclient-4.1.2.2/src/ongetpass.cpp Examining data/x2goclient-4.1.2.2/src/onmainwindow.cpp Examining data/x2goclient-4.1.2.2/src/onmainwindow.h Examining data/x2goclient-4.1.2.2/src/onmainwindow_privat.h Examining data/x2goclient-4.1.2.2/src/pulsemanager.cpp Examining data/x2goclient-4.1.2.2/src/sessionbutton.cpp Examining data/x2goclient-4.1.2.2/src/sessionwidget.cpp Examining data/x2goclient-4.1.2.2/src/sessionwidget.h Examining data/x2goclient-4.1.2.2/src/settingswidget.cpp Examining data/x2goclient-4.1.2.2/src/settingswidget.h Examining data/x2goclient-4.1.2.2/src/sharewidget.cpp Examining data/x2goclient-4.1.2.2/src/InteractionDialog.cpp Examining data/x2goclient-4.1.2.2/x2gohelper/x2gohelper.cpp FINAL RESULTS: data/x2goclient-4.1.2.2/src/LDAPSession.cpp:130: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 ( mods[i]->mod_type, ( *it ).attr.c_str() ); data/x2goclient-4.1.2.2/src/LDAPSession.cpp:145:4: [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 ( mods[i]->mod_vals.modv_strvals[j], data/x2goclient-4.1.2.2/src/LDAPSession.cpp:178: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 ( mods[i]->mod_type, ( *it ).attr.c_str() ); data/x2goclient-4.1.2.2/src/LDAPSession.cpp:191:4: [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 ( mods[i]->mod_vals.modv_strvals[j], data/x2goclient-4.1.2.2/src/LDAPSession.cpp:227: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 ( attr[i], ( *it ).c_str() ); data/x2goclient-4.1.2.2/src/LDAPSession.cpp:294: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 ( attr[i], ( *it ).c_str() ); data/x2goclient-4.1.2.2/src/httpbrokerclient.cpp:874:12: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. bt.sprintf ( "%02X", ( unsigned char ) ba[i] ); data/x2goclient-4.1.2.2/src/mediawidget.cpp:131:45: [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. void MediaWidget::slot_sndSysSelected ( int system ) data/x2goclient-4.1.2.2/src/mediawidget.cpp:139:14: [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. switch ( system ) data/x2goclient-4.1.2.2/src/mediawidget.h:48:36: [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. void slot_sndSysSelected ( int system ); data/x2goclient-4.1.2.2/src/onmainwindow.cpp:668:58: [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. filename = QString (filename + "_%1" ).arg (QLocale::system ().name ()); data/x2goclient-4.1.2.2/src/onmainwindow.cpp:671:29: [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. ui_languages = QLocale::system ().uiLanguages (); data/x2goclient-4.1.2.2/src/onmainwindow.cpp:7431:32: [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. QString locallong=QLocale::system().name(); data/x2goclient-4.1.2.2/src/onmainwindow.cpp:7432:33: [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. QString localshort=QLocale::system().name().split("_")[0]; data/x2goclient-4.1.2.2/src/onmainwindow.cpp:11300:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy ( desktop,desktopName.c_str() ); data/x2goclient-4.1.2.2/src/sessionexplorer.cpp:240:5: [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 ( scrname.toLatin1() ); data/x2goclient-4.1.2.2/src/sshmasterconnection.cpp:121:22: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. byte.sprintf("%02x",(uchar)(data[j])); data/x2goclient-4.1.2.2/src/wapi.cpp:449:9: [4] (shell) ShellExecute: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. ShellExecute ( win, ( LPCTSTR ) ( operation.utf16() ), data/x2goclient-4.1.2.2/src/wapi.cpp:453:9: [4] (shell) ShellExecute: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. ShellExecute ( win, ( LPCTSTR ) ( operation.utf16() ), data/x2goclient-4.1.2.2/src/x2goclient.cpp:60:14: [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. if (0 != execvp (new_argv_c_str.front (), &(new_argv_c_str.front ()))) { data/x2goclient-4.1.2.2/src/onmainwindow.cpp:9650:22: [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. QString xsocket (getenv ("DISPLAY")); data/x2goclient-4.1.2.2/src/onmainwindow.cpp:11298:18: [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. desktopName+=getenv ( "USERNAME" ); data/x2goclient-4.1.2.2/src/sshmasterconnection.cpp:236:22: [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. this->user = getenv ("USERNAME"); data/x2goclient-4.1.2.2/src/sshmasterconnection.cpp:238:22: [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. this->user = getenv ("USER"); data/x2goclient-4.1.2.2/src/x2gosettings.cpp:78:20: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. QString uname=getenv("USERNAME"); data/x2goclient-4.1.2.2/src/LDAPSession.cpp:51: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,buf,len ); data/x2goclient-4.1.2.2/src/compat.cpp:46:20: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. return ((char *) memcpy (result, s, len)); data/x2goclient-4.1.2.2/src/connectionwidget.cpp:125:13: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ( !file.open ( QIODevice::ReadOnly | QIODevice::Text ) ) data/x2goclient-4.1.2.2/src/help.cpp:72:14: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if (file.open (QIODevice::ReadOnly | QIODevice::Text)) { data/x2goclient-4.1.2.2/src/httpbrokerclient.cpp:759:12: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fl.open ( QIODevice::ReadOnly | QIODevice::Text ); data/x2goclient-4.1.2.2/src/httpbrokerclient.cpp:855:12: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fl.open ( QIODevice::WriteOnly | QIODevice::Text ); data/x2goclient-4.1.2.2/src/httpbrokerclient.cpp:874:41: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. bt.sprintf ( "%02X", ( unsigned char ) ba[i] ); data/x2goclient-4.1.2.2/src/onmainwindow.cpp:58: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). if(fl.open( QIODevice::ReadOnly)) data/x2goclient-4.1.2.2/src/onmainwindow.cpp:599:15: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if (!file.open(QIODevice::WriteOnly | QIODevice::Text)) data/x2goclient-4.1.2.2/src/onmainwindow.cpp:4440:16: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ( !file.open ( QIODevice::ReadOnly | QIODevice::Text ) ) data/x2goclient-4.1.2.2/src/onmainwindow.cpp:4746:16: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ( !file.open ( QIODevice::ReadOnly | QIODevice::Text ) ) data/x2goclient-4.1.2.2/src/onmainwindow.cpp:5752:23: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ( file.open ( QIODevice::ReadOnly | data/x2goclient-4.1.2.2/src/onmainwindow.cpp:5936:16: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ( !file.open ( QIODevice::WriteOnly | QIODevice::Text ) ) data/x2goclient-4.1.2.2/src/onmainwindow.cpp:6623:12: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fl.open(QIODevice::WriteOnly|QIODevice::Append); data/x2goclient-4.1.2.2/src/onmainwindow.cpp:7988:19: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) data/x2goclient-4.1.2.2/src/onmainwindow.cpp:8269:16: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ( !file.open ( QIODevice::ReadOnly | QIODevice::Text ) ) data/x2goclient-4.1.2.2/src/onmainwindow.cpp:8345:16: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ( !file.open ( QIODevice::ReadOnly | QIODevice::Text ) ) data/x2goclient-4.1.2.2/src/onmainwindow.cpp:8373:16: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ( !file.open ( QIODevice::ReadOnly | QIODevice::Text ) ) data/x2goclient-4.1.2.2/src/onmainwindow.cpp:8921:16: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ( !file.open ( QIODevice::ReadOnly | QIODevice::Text ) ) data/x2goclient-4.1.2.2/src/onmainwindow.cpp:8942:31: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if (!authorized_keys_file.open (QIODevice::ReadOnly | QIODevice::Text)) { data/x2goclient-4.1.2.2/src/onmainwindow.cpp:8949: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). tfile.open (); data/x2goclient-4.1.2.2/src/onmainwindow.cpp:9001:20: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ( !file.open ( QIODevice::ReadOnly | QIODevice::Text ) ) data/x2goclient-4.1.2.2/src/onmainwindow.cpp:9080:20: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ( !file.open ( QIODevice::ReadOnly | QIODevice::Text ) ) data/x2goclient-4.1.2.2/src/onmainwindow.cpp:9136:15: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) data/x2goclient-4.1.2.2/src/onmainwindow.cpp:9352:16: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ( !file.open ( QIODevice::ReadOnly | QIODevice::Text ) ) data/x2goclient-4.1.2.2/src/onmainwindow.cpp:10048:16: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ( !file.open ( QIODevice::ReadOnly | QIODevice::Text ) ) data/x2goclient-4.1.2.2/src/onmainwindow.cpp:10071:31: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if (!authorized_keys_file.open (QIODevice::WriteOnly | QIODevice::Text | QIODevice::Append)) { data/x2goclient-4.1.2.2/src/onmainwindow.cpp:10246:20: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ( !file.open ( QIODevice::ReadOnly | QIODevice::Text ) ) data/x2goclient-4.1.2.2/src/onmainwindow.cpp:10396:16: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ( !file.open ( QIODevice::ReadOnly | QIODevice::Text ) ) data/x2goclient-4.1.2.2/src/onmainwindow.cpp:10842:16: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ( !file.open ( QIODevice::WriteOnly | QIODevice::Text ) ) data/x2goclient-4.1.2.2/src/onmainwindow.cpp:11054:17: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). temp_file.open (); data/x2goclient-4.1.2.2/src/onmainwindow.cpp:11182:13: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if (!(rsa.open (QIODevice::ReadOnly | QIODevice::Text))) { data/x2goclient-4.1.2.2/src/onmainwindow.cpp:11189:15: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if (!(rsa.open (QIODevice::ReadOnly | QIODevice::Text))) { data/x2goclient-4.1.2.2/src/onmainwindow.cpp:11215:14: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if (!(file.open (QIODevice::WriteOnly | QIODevice::Text | QIODevice::Append))) { data/x2goclient-4.1.2.2/src/onmainwindow.cpp:11282:21: [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). sshLogTemp->open(); data/x2goclient-4.1.2.2/src/onmainwindow.cpp:11439:12: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). buffer.open(QIODevice::WriteOnly); data/x2goclient-4.1.2.2/src/pulsemanager.cpp:602:23: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if (config_tmp_file.open ()) { data/x2goclient-4.1.2.2/src/pulsemanager.cpp:690:30: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if (client_config_tmp_file.open ()) { data/x2goclient-4.1.2.2/src/sessionexplorer.cpp:199:16: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ( !file.open ( QIODevice::WriteOnly | QIODevice::Text ) ) data/x2goclient-4.1.2.2/src/sessionexplorer.cpp:219:16: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ( !file.open ( QIODevice::WriteOnly | QIODevice::Text ) ) data/x2goclient-4.1.2.2/src/sessionexplorer.cpp:449:16: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). buffer.open(QIODevice::WriteOnly); data/x2goclient-4.1.2.2/src/sharewidget.cpp:339:16: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ( !file.open ( QIODevice::ReadOnly | QIODevice::Text ) ) data/x2goclient-4.1.2.2/src/sshmasterconnection.cpp:67:13: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if (!fl.open(QFile::ReadOnly)) data/x2goclient-4.1.2.2/src/sshmasterconnection.cpp:1333:12: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fl.open(); data/x2goclient-4.1.2.2/src/sshmasterconnection.cpp:1378:20: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if (tmp_file.open (QIODevice::ReadOnly)) { data/x2goclient-4.1.2.2/src/sshmasterconnection.cpp:1692:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[1024*512]; //512K buffer data/x2goclient-4.1.2.2/src/sshmasterconnection.cpp:1855:20: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ( !file.open ( QIODevice::ReadOnly ) ) data/x2goclient-4.1.2.2/src/sshmasterconnection.cpp:1943:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[1024*512]; //512K buffer data/x2goclient-4.1.2.2/src/wapi.cpp:275:13: [2] (buffer) TCHAR: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. TCHAR vol[MAX_PATH+1]; data/x2goclient-4.1.2.2/src/wapi.cpp:276:13: [2] (buffer) TCHAR: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. TCHAR fs[MAX_PATH+1]; data/x2goclient-4.1.2.2/src/wapi.cpp:515:5: [2] (buffer) TCHAR: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. TCHAR infoBuf[INFO_BUFFER_SIZE]; data/x2goclient-4.1.2.2/src/x2gologdebug.cpp:25:16: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if(logFile.open(QIODevice::WriteOnly|QIODevice::Text|QIODevice::Append)) data/x2goclient-4.1.2.2/src/x2gosettings.cpp:29:14: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). cfgFile->open(); data/x2goclient-4.1.2.2/x2gohelper/x2gohelper.cpp:70: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). DWORD pid=atoi(argv[1]); data/x2goclient-4.1.2.2/src/compat.cpp:34:16: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t len = strlen (s); data/x2goclient-4.1.2.2/src/onmainwindow.cpp:11313:9: [1] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant character. strcpy ( desktop,"" ); data/x2goclient-4.1.2.2/src/sessionexplorer.cpp:116: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). folder=folder.mid(strlen("icon_")); data/x2goclient-4.1.2.2/src/sshmasterconnection.cpp:535:19: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. this->usleep(200); data/x2goclient-4.1.2.2/src/sshmasterconnection.cpp:646:19: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. this->usleep(100); data/x2goclient-4.1.2.2/src/sshmasterconnection.cpp:1040:23: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. this->usleep(30); data/x2goclient-4.1.2.2/src/sshmasterconnection.cpp:1143:31: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. this->usleep(200); data/x2goclient-4.1.2.2/src/sshmasterconnection.cpp:1231:23: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. this->usleep (200); data/x2goclient-4.1.2.2/src/sshmasterconnection.cpp:1286:19: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. this->usleep(200); data/x2goclient-4.1.2.2/src/sshmasterconnection.cpp:1401:19: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. this->usleep(200); data/x2goclient-4.1.2.2/src/sshmasterconnection.cpp:1741:19: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. this->usleep(30); data/x2goclient-4.1.2.2/src/sshmasterconnection.cpp:1961:13: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep ( 500 ); data/x2goclient-4.1.2.2/src/x2goclient.cpp:54: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). new_argv_c_str.push_back (strndup (elem, std::strlen (elem))); ANALYSIS SUMMARY: Hits = 92 Lines analyzed = 33941 in approximately 0.81 seconds (41716 lines/second) Physical Source Lines of Code (SLOC) = 27158 Hits@level = [0] 1 [1] 13 [2] 54 [3] 5 [4] 20 [5] 0 Hits@level+ = [0+] 93 [1+] 92 [2+] 79 [3+] 25 [4+] 20 [5+] 0 Hits/KSLOC@level+ = [0+] 3.42441 [1+] 3.38758 [2+] 2.9089 [3+] 0.920539 [4+] 0.736431 [5+] 0 Dot directories skipped = 1 (--followdotdir overrides) Minimum risk level = 1 Not every hit is necessarily a security vulnerability. There may be other security vulnerabilities; review your code! See 'Secure Programming HOWTO' (https://dwheeler.com/secure-programs) for more information.