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/soqt-1.6.0+ds1/build/misc/config-wrapper.h Examining data/soqt-1.6.0+ds1/build/msvc6/src/Inventor/Qt/SoQtBasic.h Examining data/soqt-1.6.0+ds1/build/msvc6/src/config-debug.h Examining data/soqt-1.6.0+ds1/build/msvc6/src/config-release.h Examining data/soqt-1.6.0+ds1/build/msvc6/src/config.h Examining data/soqt-1.6.0+ds1/build/msvc6/src/soqtdefs.h Examining data/soqt-1.6.0+ds1/build/msvc7/src/Inventor/Qt/SoQtBasic.h Examining data/soqt-1.6.0+ds1/build/msvc7/src/config-debug.h Examining data/soqt-1.6.0+ds1/build/msvc7/src/config-release.h Examining data/soqt-1.6.0+ds1/build/msvc7/src/config.h Examining data/soqt-1.6.0+ds1/build/msvc7/src/soqtdefs.h Examining data/soqt-1.6.0+ds1/build/msvc8/src/Inventor/Qt/SoQtBasic.h Examining data/soqt-1.6.0+ds1/build/msvc8/src/config-debug.h Examining data/soqt-1.6.0+ds1/build/msvc8/src/config-release.h Examining data/soqt-1.6.0+ds1/build/msvc8/src/config.h Examining data/soqt-1.6.0+ds1/build/msvc8/src/soqtdefs.h Examining data/soqt-1.6.0+ds1/build/msvc9/src/Inventor/Qt/SoQtBasic.h Examining data/soqt-1.6.0+ds1/build/msvc9/src/config-debug.h Examining data/soqt-1.6.0+ds1/build/msvc9/src/config-release.h Examining data/soqt-1.6.0+ds1/build/msvc9/src/config.h Examining data/soqt-1.6.0+ds1/build/msvc9/src/soqtdefs.h Examining data/soqt-1.6.0+ds1/src/Inventor/Qt/SoQt.cpp Examining data/soqt-1.6.0+ds1/src/Inventor/Qt/SoQtComponent.cpp Examining data/soqt-1.6.0+ds1/src/Inventor/Qt/SoQtComponentP.h Examining data/soqt-1.6.0+ds1/src/Inventor/Qt/SoQtGLWidget.cpp Examining data/soqt-1.6.0+ds1/src/Inventor/Qt/SoQtGLWidgetP.h Examining data/soqt-1.6.0+ds1/src/Inventor/Qt/SoQtImageReader.cpp Examining data/soqt-1.6.0+ds1/src/Inventor/Qt/SoQtImageReader.h Examining data/soqt-1.6.0+ds1/src/Inventor/Qt/SoQtInternal.h Examining data/soqt-1.6.0+ds1/src/Inventor/Qt/SoQtLightSliderSet.cpp Examining data/soqt-1.6.0+ds1/src/Inventor/Qt/SoQtLightSliderSet.h Examining data/soqt-1.6.0+ds1/src/Inventor/Qt/SoQtMaterialList.cpp Examining data/soqt-1.6.0+ds1/src/Inventor/Qt/SoQtMaterialSliderSet.cpp Examining data/soqt-1.6.0+ds1/src/Inventor/Qt/SoQtMaterialSliderSet.h Examining data/soqt-1.6.0+ds1/src/Inventor/Qt/SoQtP.h Examining data/soqt-1.6.0+ds1/src/Inventor/Qt/SoQtSignalThread.cpp Examining data/soqt-1.6.0+ds1/src/Inventor/Qt/SoQtSignalThread.h Examining data/soqt-1.6.0+ds1/src/Inventor/Qt/SoQtSliderSet.cpp Examining data/soqt-1.6.0+ds1/src/Inventor/Qt/SoQtSliderSet.h Examining data/soqt-1.6.0+ds1/src/Inventor/Qt/SoQtSliderSetBase.cpp Examining data/soqt-1.6.0+ds1/src/Inventor/Qt/SoQtSliderSetBase.h Examining data/soqt-1.6.0+ds1/src/Inventor/Qt/SoQtTransformSliderSet.cpp Examining data/soqt-1.6.0+ds1/src/Inventor/Qt/SoQtTransformSliderSet.h Examining data/soqt-1.6.0+ds1/src/Inventor/Qt/all-soqt-cpp.cpp Examining data/soqt-1.6.0+ds1/src/Inventor/Qt/all-soqt2-cpp.cpp Examining data/soqt-1.6.0+ds1/src/Inventor/Qt/devices/6DOFEvents.cpp Examining data/soqt-1.6.0+ds1/src/Inventor/Qt/devices/6DOFEvents.h Examining data/soqt-1.6.0+ds1/src/Inventor/Qt/devices/SoQtDevice.cpp Examining data/soqt-1.6.0+ds1/src/Inventor/Qt/devices/SoQtDeviceP.h Examining data/soqt-1.6.0+ds1/src/Inventor/Qt/devices/SoQtInputFocus.cpp Examining data/soqt-1.6.0+ds1/src/Inventor/Qt/devices/SoQtKeyboard.cpp Examining data/soqt-1.6.0+ds1/src/Inventor/Qt/devices/SoQtLinuxJoystick.cpp Examining data/soqt-1.6.0+ds1/src/Inventor/Qt/devices/SoQtLinuxJoystick.h Examining data/soqt-1.6.0+ds1/src/Inventor/Qt/devices/SoQtLinuxJoystickP.h Examining data/soqt-1.6.0+ds1/src/Inventor/Qt/devices/SoQtMouse.cpp Examining data/soqt-1.6.0+ds1/src/Inventor/Qt/devices/all-devices-cpp.cpp Examining data/soqt-1.6.0+ds1/src/Inventor/Qt/devices/all-devices2-cpp.cpp Examining data/soqt-1.6.0+ds1/src/Inventor/Qt/editors/RGBCubeEditorKit.cpp Examining data/soqt-1.6.0+ds1/src/Inventor/Qt/editors/RGBCubeEditorKit.h Examining data/soqt-1.6.0+ds1/src/Inventor/Qt/editors/RadioGroupKit.cpp Examining data/soqt-1.6.0+ds1/src/Inventor/Qt/editors/RadioGroupKit.h Examining data/soqt-1.6.0+ds1/src/Inventor/Qt/editors/all-editors-cpp.cpp Examining data/soqt-1.6.0+ds1/src/Inventor/Qt/editors/old/QColorSelection.cpp Examining data/soqt-1.6.0+ds1/src/Inventor/Qt/editors/old/QColorSelection.h Examining data/soqt-1.6.0+ds1/src/Inventor/Qt/editors/old/SoGLMaterialSphere.cpp Examining data/soqt-1.6.0+ds1/src/Inventor/Qt/editors/old/SoGLMaterialSphere.h Examining data/soqt-1.6.0+ds1/src/Inventor/Qt/editors/old/SoQtColorSlider.cpp Examining data/soqt-1.6.0+ds1/src/Inventor/Qt/editors/old/SoQtColorSlider.h Examining data/soqt-1.6.0+ds1/src/Inventor/Qt/editors/old/SoQtMaterialEditor.cpp Examining data/soqt-1.6.0+ds1/src/Inventor/Qt/editors/old/SoQtMaterialEditor.h Examining data/soqt-1.6.0+ds1/src/Inventor/Qt/editors/old/SoQtMaterialList.cpp Examining data/soqt-1.6.0+ds1/src/Inventor/Qt/editors/old/SoQtMaterialList.h Examining data/soqt-1.6.0+ds1/src/Inventor/Qt/engines/all-engines-cpp.cpp Examining data/soqt-1.6.0+ds1/src/Inventor/Qt/nodes/all-nodes-cpp.cpp Examining data/soqt-1.6.0+ds1/src/Inventor/Qt/viewers/ExaminerViewer.cpp Examining data/soqt-1.6.0+ds1/src/Inventor/Qt/viewers/FullViewer.cpp Examining data/soqt-1.6.0+ds1/src/Inventor/Qt/viewers/PlaneViewer.cpp Examining data/soqt-1.6.0+ds1/src/Inventor/Qt/viewers/SoQtExaminerViewerP.h Examining data/soqt-1.6.0+ds1/src/Inventor/Qt/viewers/SoQtFullViewerP.h Examining data/soqt-1.6.0+ds1/src/Inventor/Qt/viewers/SoQtPlaneViewerP.h Examining data/soqt-1.6.0+ds1/src/Inventor/Qt/viewers/WalkViewer.cpp Examining data/soqt-1.6.0+ds1/src/Inventor/Qt/viewers/all-viewers-cpp.cpp Examining data/soqt-1.6.0+ds1/src/Inventor/Qt/widgets/QtNativePopupMenu.cpp Examining data/soqt-1.6.0+ds1/src/Inventor/Qt/widgets/QtNativePopupMenu.h Examining data/soqt-1.6.0+ds1/src/Inventor/Qt/widgets/SoQtGLArea.cpp Examining data/soqt-1.6.0+ds1/src/Inventor/Qt/widgets/SoQtGLArea.h Examining data/soqt-1.6.0+ds1/src/Inventor/Qt/widgets/SoQtThumbWheel.cpp Examining data/soqt-1.6.0+ds1/src/Inventor/Qt/widgets/SoQtThumbWheel.h Examining data/soqt-1.6.0+ds1/src/Inventor/Qt/widgets/all-widgets-cpp.cpp Examining data/soqt-1.6.0+ds1/src/qt-config.h Examining data/soqt-1.6.0+ds1/test-code/assertdbg/crash.cpp Examining data/soqt-1.6.0+ds1/test-code/components/coloreditor.cpp Examining data/soqt-1.6.0+ds1/test-code/components/embeddedexaminer.cpp Examining data/soqt-1.6.0+ds1/test-code/components/renderarea.cpp Examining data/soqt-1.6.0+ds1/test-code/components/scrollview.cpp Examining data/soqt-1.6.0+ds1/test-code/components/tripleview.cpp Examining data/soqt-1.6.0+ds1/test-code/components/withoutdecor0.cpp Examining data/soqt-1.6.0+ds1/test-code/components/withoutdecor1.cpp Examining data/soqt-1.6.0+ds1/test-code/widgets/thumbwheel.cpp Examining data/soqt-1.6.0+ds1/sogui/SbGuiList.h FINAL RESULTS: data/soqt-1.6.0+ds1/src/Inventor/Qt/SoQt.cpp:405:18: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. instructions.sprintf("Set environment variable %s to \"1\" and " data/soqt-1.6.0+ds1/src/Inventor/Qt/devices/SoQtLinuxJoystick.cpp:187:20: [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). this->name = strcpy(new char [strlen(name)+1], name); data/soqt-1.6.0+ds1/src/Inventor/Qt/editors/old/QColorSelection.cpp:108:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(titleString, "%sColorEditor", typeString); data/soqt-1.6.0+ds1/src/Inventor/Qt/editors/old/SoQtMaterialEditor.cpp:478:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(colorString + length, "%s", colorStrings[i]); data/soqt-1.6.0+ds1/src/Inventor/Qt/editors/old/SoQtMaterialList.cpp:59: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(materialDir, dir); data/soqt-1.6.0+ds1/src/Inventor/Qt/editors/old/SoQtMaterialList.cpp:63: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(materialDir, DEFAULT_MATERIAL_DIR); data/soqt-1.6.0+ds1/src/Inventor/Qt/editors/old/SoQtMaterialList.cpp:142: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(curPalettePath, materialDir); data/soqt-1.6.0+ds1/src/Inventor/Qt/editors/old/SoQtMaterialList.cpp:144: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(curPalettePath, dir); data/soqt-1.6.0+ds1/src/Inventor/Qt/editors/old/SoQtMaterialList.cpp:163: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(fullPath, curPalettePath); data/soqt-1.6.0+ds1/src/Inventor/Qt/editors/old/SoQtMaterialList.cpp:165: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(fullPath, file); data/soqt-1.6.0+ds1/src/Inventor/Qt/viewers/FullViewer.cpp:749:26: [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). this->leftWheelStr = strcpy(new char [strlen(string)+1], string); data/soqt-1.6.0+ds1/src/Inventor/Qt/viewers/FullViewer.cpp:764:28: [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). this->bottomWheelStr = strcpy(new char [strlen(string)+1], string); data/soqt-1.6.0+ds1/src/Inventor/Qt/viewers/FullViewer.cpp:786:27: [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). this->rightWheelStr = strcpy(new char [strlen(string)+1], string); data/soqt-1.6.0+ds1/src/Inventor/Qt/widgets/QtNativePopupMenu.cpp:199:16: [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). rec->title = strcpy(new char [strlen(title)+1], title); data/soqt-1.6.0+ds1/src/Inventor/Qt/widgets/QtNativePopupMenu.cpp:277:16: [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). rec->title = strcpy(new char [strlen(title)+1], title); data/soqt-1.6.0+ds1/src/Inventor/Qt/widgets/QtNativePopupMenu.cpp:661:15: [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). rec->name = strcpy(new char [strlen(name)+1], name); data/soqt-1.6.0+ds1/src/Inventor/Qt/widgets/QtNativePopupMenu.cpp:662:16: [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). rec->title = strcpy(new char [strlen(name)+1], name); data/soqt-1.6.0+ds1/src/Inventor/Qt/widgets/QtNativePopupMenu.cpp:689:15: [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). rec->name = strcpy(new char [strlen(name)+1], name); data/soqt-1.6.0+ds1/src/Inventor/Qt/widgets/QtNativePopupMenu.cpp:690:16: [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). rec->title = strcpy(new char [strlen(name)+1], name); data/soqt-1.6.0+ds1/src/Inventor/Qt/SoQt.cpp:310:35: [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 * env = SoAny::si()->getenv("SOQT_USE_SIMPLE_TIMERS"); data/soqt-1.6.0+ds1/src/Inventor/Qt/SoQt.cpp:376:37: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. const char * env = SoAny::si()->getenv("SOQT_BRIL_X11_SILENCER_HACK"); data/soqt-1.6.0+ds1/src/Inventor/Qt/SoQt.cpp:758:37: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. const char * env = SoAny::si()->getenv(SoQtP::SOQT_X11_ERRORHANDLER); data/soqt-1.6.0+ds1/src/Inventor/Qt/SoQt.cpp:767:39: [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 * env = SoAny::si()->getenv(SoQtP::SOQT_XSYNC); data/soqt-1.6.0+ds1/src/Inventor/Qt/SoQt.cpp:787:37: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. const char * env = SoAny::si()->getenv("SOGUI_DEBUG_LISTMODULES"); data/soqt-1.6.0+ds1/src/Inventor/Qt/SoQt.cpp:922:37: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. const char * env = SoAny::si()->getenv("SOQT_DELETE_QAPPLICATION"); data/soqt-1.6.0+ds1/src/Inventor/Qt/SoQtComponent.cpp:999:39: [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 * env = SoAny::si()->getenv("SOQT_NO_QTMAC_BUG_WARNINGS"); data/soqt-1.6.0+ds1/src/Inventor/Qt/devices/SoQtLinuxJoystick.cpp:322:36: [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 * devicepath = SoAny::getenv("SOQT_JOYSTICK_DEVICE"); data/soqt-1.6.0+ds1/src/Inventor/Qt/editors/old/SoGLMaterialSphere.cpp:63:9: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. #define random() rand() data/soqt-1.6.0+ds1/src/Inventor/Qt/editors/old/SoGLMaterialSphere.cpp:311:35: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. theta = acos(1.0 - 2.0*(float)random()/(float)LONG_MAX); data/soqt-1.6.0+ds1/src/Inventor/Qt/editors/old/SoGLMaterialSphere.cpp:312:30: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. angle2 = 2.0*M_PI*(float)random()/(float)LONG_MAX; data/soqt-1.6.0+ds1/src/Inventor/Qt/viewers/FullViewer.cpp:821: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. SoAny::si()->getenv("FORCE_NO_QTMAC_31_RESIZE_WORKAROUND"); data/soqt-1.6.0+ds1/src/Inventor/Qt/viewers/FullViewer.cpp:828:39: [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 * env = SoAny::si()->getenv("SOQT_NO_QTMAC_BUG_WARNINGS"); data/soqt-1.6.0+ds1/src/Inventor/Qt/SoQt.cpp:312:39: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). qt_win_use_simple_timers = (bool) atoi(env); data/soqt-1.6.0+ds1/src/Inventor/Qt/SoQt.cpp:377:38: [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). SoQtP::BRIL_X11_SILENCER = env ? atoi(env) : 0; data/soqt-1.6.0+ds1/src/Inventor/Qt/SoQt.cpp:709:18: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static const char * dummyargv[1]; data/soqt-1.6.0+ds1/src/Inventor/Qt/SoQt.cpp:759:37: [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). SoQtP::X11_ERRORHANDLER = env ? atoi(env) : 0; data/soqt-1.6.0+ds1/src/Inventor/Qt/SoQt.cpp:768:36: [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). SoQtP::DEBUG_X11SYNC = env ? atoi(env) : 0; data/soqt-1.6.0+ds1/src/Inventor/Qt/SoQt.cpp:788:38: [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). SoQtP::DEBUG_LISTMODULES = env ? atoi(env) : 0; data/soqt-1.6.0+ds1/src/Inventor/Qt/SoQt.cpp:923: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). if (env && atoi(env) > 0) { data/soqt-1.6.0+ds1/src/Inventor/Qt/SoQtComponent.cpp:1000:20: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). if (!env || !atoi(env)) data/soqt-1.6.0+ds1/src/Inventor/Qt/SoQtImageReader.cpp:90:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buffer + i*w, image.scanLine(h-(i+1)), w); data/soqt-1.6.0+ds1/src/Inventor/Qt/devices/SoQtLinuxJoystick.cpp:161: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). this->joydev = open(devpathname, O_RDONLY | O_NONBLOCK); data/soqt-1.6.0+ds1/src/Inventor/Qt/devices/SoQtLinuxJoystick.cpp:185:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char name[128]; data/soqt-1.6.0+ds1/src/Inventor/Qt/devices/SoQtLinuxJoystick.cpp:191:20: [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. this->name = strcpy(new char [sizeof("Unknown")+1], "Unknown"); data/soqt-1.6.0+ds1/src/Inventor/Qt/devices/SoQtLinuxJoystick.cpp:310: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). int joydev = open(jsdevicepath, O_RDONLY); data/soqt-1.6.0+ds1/src/Inventor/Qt/editors/RGBCubeEditorKit.cpp:346: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[8]; data/soqt-1.6.0+ds1/src/Inventor/Qt/editors/RGBCubeEditorKit.cpp:348: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(buffer, "[%.2f]", red); data/soqt-1.6.0+ds1/src/Inventor/Qt/editors/RGBCubeEditorKit.cpp:351: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(buffer, "[%.2f]", green); data/soqt-1.6.0+ds1/src/Inventor/Qt/editors/RGBCubeEditorKit.cpp:354: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(buffer, "[%.2f]", blue); data/soqt-1.6.0+ds1/src/Inventor/Qt/editors/old/QColorSelection.h:67: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 titleString[MAX_TITLE + 1]; data/soqt-1.6.0+ds1/src/Inventor/Qt/editors/old/SoQtColorSlider.cpp:81: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 temp[20]; data/soqt-1.6.0+ds1/src/Inventor/Qt/editors/old/SoQtColorSlider.cpp:85:9: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(temp, "%1.2f", (float) value / 100.0); data/soqt-1.6.0+ds1/src/Inventor/Qt/editors/old/SoQtMaterialEditor.cpp:470:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char colorString[41]; data/soqt-1.6.0+ds1/src/Inventor/Qt/viewers/FullViewer.cpp:822:36: [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 (!forcenoresizeworkaround || (atoi(forcenoresizeworkaround) == 0)) { data/soqt-1.6.0+ds1/src/Inventor/Qt/viewers/FullViewer.cpp:829:20: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). if (!env || !atoi(env)) { data/soqt-1.6.0+ds1/src/Inventor/Qt/SoQtMaterialList.cpp:273: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). reader.setBuffer((void *) materialdata, strlen(materialdata)); data/soqt-1.6.0+ds1/src/Inventor/Qt/SoQtMaterialList.cpp:283:15: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (! SoDB::read(&reader, material)) { data/soqt-1.6.0+ds1/src/Inventor/Qt/devices/SoQtLinuxJoystick.cpp:187:37: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). this->name = strcpy(new char [strlen(name)+1], name); data/soqt-1.6.0+ds1/src/Inventor/Qt/devices/SoQtLinuxJoystick.cpp:498:15: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int bytes = read(this->joydev, &event, sizeof(struct js_event)); data/soqt-1.6.0+ds1/src/Inventor/Qt/devices/SoQtLinuxJoystick.cpp:517:15: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). bytes = read(this->joydev, &event, sizeof(struct js_event)); data/soqt-1.6.0+ds1/src/Inventor/Qt/devices/SoQtLinuxJoystick.cpp:537:13: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). bytes = read(this->joydev, &event, sizeof(struct js_event)); data/soqt-1.6.0+ds1/src/Inventor/Qt/editors/RadioGroupKit.cpp:179:63: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). input.setBuffer((void *) RADIOBULLET_radiobulletgeometry, strlen(RADIOBULLET_radiobulletgeometry)); data/soqt-1.6.0+ds1/src/Inventor/Qt/editors/old/SoQtMaterialEditor.cpp:480:19: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). length += strlen(colorStrings[i]); data/soqt-1.6.0+ds1/src/Inventor/Qt/editors/old/SoQtMaterialList.cpp:58: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). materialDir = new char[strlen(dir)+1]; data/soqt-1.6.0+ds1/src/Inventor/Qt/editors/old/SoQtMaterialList.cpp:62: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). materialDir = new char[strlen(DEFAULT_MATERIAL_DIR)+1]; data/soqt-1.6.0+ds1/src/Inventor/Qt/editors/old/SoQtMaterialList.cpp:141: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). curPalettePath = new char[strlen(dir) + strlen(materialDir) + 2]; data/soqt-1.6.0+ds1/src/Inventor/Qt/editors/old/SoQtMaterialList.cpp:141: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). curPalettePath = new char[strlen(dir) + strlen(materialDir) + 2]; data/soqt-1.6.0+ds1/src/Inventor/Qt/editors/old/SoQtMaterialList.cpp:143: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(curPalettePath, "/"); data/soqt-1.6.0+ds1/src/Inventor/Qt/editors/old/SoQtMaterialList.cpp:162:30: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). char * fullPath = new char[strlen(curPalettePath) + strlen(file) + 2]; data/soqt-1.6.0+ds1/src/Inventor/Qt/editors/old/SoQtMaterialList.cpp:162:55: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). char * fullPath = new char[strlen(curPalettePath) + strlen(file) + 2]; data/soqt-1.6.0+ds1/src/Inventor/Qt/editors/old/SoQtMaterialList.cpp: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(fullPath, "/"); data/soqt-1.6.0+ds1/src/Inventor/Qt/editors/old/SoQtMaterialList.cpp:171:13: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (SoDB::read(&in, node) == FALSE) { data/soqt-1.6.0+ds1/src/Inventor/Qt/viewers/FullViewer.cpp:749: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). this->leftWheelStr = strcpy(new char [strlen(string)+1], string); data/soqt-1.6.0+ds1/src/Inventor/Qt/viewers/FullViewer.cpp:764: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). this->bottomWheelStr = strcpy(new char [strlen(string)+1], string); data/soqt-1.6.0+ds1/src/Inventor/Qt/viewers/FullViewer.cpp:786: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). this->rightWheelStr = strcpy(new char [strlen(string)+1], string); data/soqt-1.6.0+ds1/src/Inventor/Qt/widgets/QtNativePopupMenu.cpp:199: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). rec->title = strcpy(new char [strlen(title)+1], title); data/soqt-1.6.0+ds1/src/Inventor/Qt/widgets/QtNativePopupMenu.cpp:277: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). rec->title = strcpy(new char [strlen(title)+1], title); data/soqt-1.6.0+ds1/src/Inventor/Qt/widgets/QtNativePopupMenu.cpp:661: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). rec->name = strcpy(new char [strlen(name)+1], name); data/soqt-1.6.0+ds1/src/Inventor/Qt/widgets/QtNativePopupMenu.cpp:662: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). rec->title = strcpy(new char [strlen(name)+1], name); data/soqt-1.6.0+ds1/src/Inventor/Qt/widgets/QtNativePopupMenu.cpp:689: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). rec->name = strcpy(new char [strlen(name)+1], name); data/soqt-1.6.0+ds1/src/Inventor/Qt/widgets/QtNativePopupMenu.cpp:690: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). rec->title = strcpy(new char [strlen(name)+1], name); ANALYSIS SUMMARY: Hits = 81 Lines analyzed = 18657 in approximately 0.53 seconds (34928 lines/second) Physical Source Lines of Code (SLOC) = 9643 Hits@level = [0] 47 [1] 26 [2] 23 [3] 13 [4] 19 [5] 0 Hits@level+ = [0+] 128 [1+] 81 [2+] 55 [3+] 32 [4+] 19 [5+] 0 Hits/KSLOC@level+ = [0+] 13.2739 [1+] 8.39988 [2+] 5.70362 [3+] 3.31847 [4+] 1.97034 [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.