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/nvidia-settings-legacy-304xx-304.137/src/libXNVCtrl/NVCtrl.c Examining data/nvidia-settings-legacy-304xx-304.137/src/libXNVCtrl/NVCtrl.h Examining data/nvidia-settings-legacy-304xx-304.137/src/libXNVCtrl/NVCtrlLib.h Examining data/nvidia-settings-legacy-304xx-304.137/src/libXNVCtrl/nv_control.h Examining data/nvidia-settings-legacy-304xx-304.137/src/command-line.c Examining data/nvidia-settings-legacy-304xx-304.137/src/config-file.c Examining data/nvidia-settings-legacy-304xx-304.137/src/msg.c Examining data/nvidia-settings-legacy-304xx-304.137/src/nvidia-settings.c Examining data/nvidia-settings-legacy-304xx-304.137/src/glxinfo.c Examining data/nvidia-settings-legacy-304xx-304.137/src/libXNVCtrlAttributes/NvCtrlAttributes.c Examining data/nvidia-settings-legacy-304xx-304.137/src/libXNVCtrlAttributes/NvCtrlAttributesNvControl.c Examining data/nvidia-settings-legacy-304xx-304.137/src/libXNVCtrlAttributes/NvCtrlAttributesVidMode.c Examining data/nvidia-settings-legacy-304xx-304.137/src/libXNVCtrlAttributes/NvCtrlAttributesXv.c Examining data/nvidia-settings-legacy-304xx-304.137/src/libXNVCtrlAttributes/NvCtrlAttributesGlx.c Examining data/nvidia-settings-legacy-304xx-304.137/src/libXNVCtrlAttributes/NvCtrlAttributesXrandr.c Examining data/nvidia-settings-legacy-304xx-304.137/src/libXNVCtrlAttributes/NvCtrlAttributes.h Examining data/nvidia-settings-legacy-304xx-304.137/src/libXNVCtrlAttributes/NvCtrlAttributesPrivate.h Examining data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkxvideo.c Examining data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkcursorshadow.c Examining data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkui.c Examining data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkgauge.c Examining data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkcurve.c Examining data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkcolorcorrection.c Examining data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkcolorcorrectionpage.c Examining data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkscale.c Examining data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkconfig.c Examining data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkevent.c Examining data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkwindow.c Examining data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkopengl.c Examining data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkhelp.c Examining data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkimagesliders.c Examining data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkdisplaydevice-tv.c Examining data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkdisplaydevice.c Examining data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkditheringcontrols.c Examining data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkthermal.c Examining data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkpowermizer.c Examining data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkgvo.c Examining data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkdropdownmenu.c Examining data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkclocks.c Examining data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkutils.c Examining data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkedid.c Examining data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkserver.c Examining data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkdisplayconfig.c Examining data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkscreen.c Examining data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkbanner.c Examining data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkvcs.c Examining data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkgvo-banner.c Examining data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkgvo-sync.c Examining data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkpowersavings.c Examining data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkgvi.c Examining data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctklicense.c Examining data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkecc.c Examining data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkcolorcontrols.c Examining data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctk3dvisionpro.c Examining data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkxvideo.h Examining data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkcursorshadow.h Examining data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkui.h Examining data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkframelock.h Examining data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkgauge.h Examining data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkcurve.h Examining data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkcolorcorrection.h Examining data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkcolorcorrectionpage.h Examining data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkscale.h Examining data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkmultisample.h Examining data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkconfig.h Examining data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkevent.h Examining data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkwindow.h Examining data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkopengl.h Examining data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkglx.h Examining data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkhelp.h Examining data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkimagesliders.h Examining data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkdisplaydevice-tv.h Examining data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkdisplaydevice.h Examining data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkditheringcontrols.h Examining data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkconstants.h Examining data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkthermal.h Examining data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkpowermizer.h Examining data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkgvo.h Examining data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkgvo-csc.h Examining data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkdropdownmenu.h Examining data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkclocks.h Examining data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkutils.h Examining data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkedid.h Examining data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkserver.h Examining data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkdisplaylayout.h Examining data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkdisplayconfig.h Examining data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkscreen.h Examining data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkslimm.h Examining data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkgpu.h Examining data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkbanner.h Examining data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkvcs.h Examining data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkdisplayconfig-utils.h Examining data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkpowersavings.h Examining data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkgvo-banner.h Examining data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkgvo-sync.h Examining data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkgvi.h Examining data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctklicense.h Examining data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkecc.h Examining data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkcolorcontrols.h Examining data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctk3dvisionpro.h Examining data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkdisplayconfig-utils.c Examining data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkdisplaylayout.c Examining data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkframelock.c Examining data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkglx.c Examining data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkgpu.c Examining data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkgvo-csc.c Examining data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkslimm.c Examining data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkmultisample.c Examining data/nvidia-settings-legacy-304xx-304.137/src/command-line.h Examining data/nvidia-settings-legacy-304xx-304.137/src/option-table.h Examining data/nvidia-settings-legacy-304xx-304.137/src/config-file.h Examining data/nvidia-settings-legacy-304xx-304.137/src/lscf.h Examining data/nvidia-settings-legacy-304xx-304.137/src/msg.h Examining data/nvidia-settings-legacy-304xx-304.137/src/parse.h Examining data/nvidia-settings-legacy-304xx-304.137/src/query-assign.h Examining data/nvidia-settings-legacy-304xx-304.137/src/glxinfo.h Examining data/nvidia-settings-legacy-304xx-304.137/src/gen-manpage-opts.c Examining data/nvidia-settings-legacy-304xx-304.137/src/image_data/antialias_pixdata.h Examining data/nvidia-settings-legacy-304xx-304.137/src/image_data/background_pixdata.h Examining data/nvidia-settings-legacy-304xx-304.137/src/image_data/background_tall_pixdata.h Examining data/nvidia-settings-legacy-304xx-304.137/src/image_data/bnc_cable_pixdata.h Examining data/nvidia-settings-legacy-304xx-304.137/src/image_data/bsd_pixdata.h Examining data/nvidia-settings-legacy-304xx-304.137/src/image_data/clock_pixdata.h Examining data/nvidia-settings-legacy-304xx-304.137/src/image_data/color_pixdata.h Examining data/nvidia-settings-legacy-304xx-304.137/src/image_data/config_pixdata.h Examining data/nvidia-settings-legacy-304xx-304.137/src/image_data/crt_pixdata.h Examining data/nvidia-settings-legacy-304xx-304.137/src/image_data/cursor_shadow_pixdata.h Examining data/nvidia-settings-legacy-304xx-304.137/src/image_data/dfp_pixdata.h Examining data/nvidia-settings-legacy-304xx-304.137/src/image_data/display_config_pixdata.h Examining data/nvidia-settings-legacy-304xx-304.137/src/image_data/framelock_pixdata.h Examining data/nvidia-settings-legacy-304xx-304.137/src/image_data/glx_pixdata.h Examining data/nvidia-settings-legacy-304xx-304.137/src/image_data/gpu_pixdata.h Examining data/nvidia-settings-legacy-304xx-304.137/src/image_data/gvi_pixdata.h Examining data/nvidia-settings-legacy-304xx-304.137/src/image_data/help_pixdata.h Examining data/nvidia-settings-legacy-304xx-304.137/src/image_data/led_green_pixdata.h Examining data/nvidia-settings-legacy-304xx-304.137/src/image_data/led_grey_pixdata.h Examining data/nvidia-settings-legacy-304xx-304.137/src/image_data/led_red_pixdata.h Examining data/nvidia-settings-legacy-304xx-304.137/src/image_data/logo_pixdata.h Examining data/nvidia-settings-legacy-304xx-304.137/src/image_data/logo_tall_pixdata.h Examining data/nvidia-settings-legacy-304xx-304.137/src/image_data/nvidia_icon_pixdata.h Examining data/nvidia-settings-legacy-304xx-304.137/src/image_data/opengl_pixdata.h Examining data/nvidia-settings-legacy-304xx-304.137/src/image_data/penguin_pixdata.h Examining data/nvidia-settings-legacy-304xx-304.137/src/image_data/rj45_input_pixdata.h Examining data/nvidia-settings-legacy-304xx-304.137/src/image_data/rj45_output_pixdata.h Examining data/nvidia-settings-legacy-304xx-304.137/src/image_data/rj45_unused_pixdata.h Examining data/nvidia-settings-legacy-304xx-304.137/src/image_data/sdi_pixdata.h Examining data/nvidia-settings-legacy-304xx-304.137/src/image_data/sdi_shared_sync_bnc_pixdata.h Examining data/nvidia-settings-legacy-304xx-304.137/src/image_data/slimm_pixdata.h Examining data/nvidia-settings-legacy-304xx-304.137/src/image_data/solaris_pixdata.h Examining data/nvidia-settings-legacy-304xx-304.137/src/image_data/svp_3dvp_pixdata.h Examining data/nvidia-settings-legacy-304xx-304.137/src/image_data/thermal_pixdata.h Examining data/nvidia-settings-legacy-304xx-304.137/src/image_data/tv_pixdata.h Examining data/nvidia-settings-legacy-304xx-304.137/src/image_data/vcs_pixdata.h Examining data/nvidia-settings-legacy-304xx-304.137/src/image_data/x_pixdata.h Examining data/nvidia-settings-legacy-304xx-304.137/src/image_data/xvideo_pixdata.h Examining data/nvidia-settings-legacy-304xx-304.137/src/xpm_data/blue_xpm.h Examining data/nvidia-settings-legacy-304xx-304.137/src/xpm_data/green_xpm.h Examining data/nvidia-settings-legacy-304xx-304.137/src/xpm_data/red_xpm.h Examining data/nvidia-settings-legacy-304xx-304.137/src/xpm_data/rgb_xpm.h Examining data/nvidia-settings-legacy-304xx-304.137/src/xpm_data/svp_add_glasses.h Examining data/nvidia-settings-legacy-304xx-304.137/src/xpm_data/svp_autopick_next_channel.h Examining data/nvidia-settings-legacy-304xx-304.137/src/xpm_data/svp_battery_0.h Examining data/nvidia-settings-legacy-304xx-304.137/src/xpm_data/svp_battery_100.h Examining data/nvidia-settings-legacy-304xx-304.137/src/xpm_data/svp_battery_25.h Examining data/nvidia-settings-legacy-304xx-304.137/src/xpm_data/svp_battery_50.h Examining data/nvidia-settings-legacy-304xx-304.137/src/xpm_data/svp_battery_75.h Examining data/nvidia-settings-legacy-304xx-304.137/src/xpm_data/svp_status_excellent.h Examining data/nvidia-settings-legacy-304xx-304.137/src/xpm_data/svp_status_good.h Examining data/nvidia-settings-legacy-304xx-304.137/src/xpm_data/svp_status_low.h Examining data/nvidia-settings-legacy-304xx-304.137/src/xpm_data/svp_status_nosignal.h Examining data/nvidia-settings-legacy-304xx-304.137/src/xpm_data/svp_status_verygood.h Examining data/nvidia-settings-legacy-304xx-304.137/src/xpm_data/svp_status_verylow.h Examining data/nvidia-settings-legacy-304xx-304.137/src/XF86Config-parser/DRI.c Examining data/nvidia-settings-legacy-304xx-304.137/src/XF86Config-parser/Device.c Examining data/nvidia-settings-legacy-304xx-304.137/src/XF86Config-parser/Extensions.c Examining data/nvidia-settings-legacy-304xx-304.137/src/XF86Config-parser/Files.c Examining data/nvidia-settings-legacy-304xx-304.137/src/XF86Config-parser/Flags.c Examining data/nvidia-settings-legacy-304xx-304.137/src/XF86Config-parser/Input.c Examining data/nvidia-settings-legacy-304xx-304.137/src/XF86Config-parser/Keyboard.c Examining data/nvidia-settings-legacy-304xx-304.137/src/XF86Config-parser/Layout.c Examining data/nvidia-settings-legacy-304xx-304.137/src/XF86Config-parser/Merge.c Examining data/nvidia-settings-legacy-304xx-304.137/src/XF86Config-parser/Module.c Examining data/nvidia-settings-legacy-304xx-304.137/src/XF86Config-parser/Pointer.c Examining data/nvidia-settings-legacy-304xx-304.137/src/XF86Config-parser/Read.c Examining data/nvidia-settings-legacy-304xx-304.137/src/XF86Config-parser/Scan.c Examining data/nvidia-settings-legacy-304xx-304.137/src/XF86Config-parser/Screen.c Examining data/nvidia-settings-legacy-304xx-304.137/src/XF86Config-parser/Util.c Examining data/nvidia-settings-legacy-304xx-304.137/src/XF86Config-parser/Vendor.c Examining data/nvidia-settings-legacy-304xx-304.137/src/XF86Config-parser/Video.c Examining data/nvidia-settings-legacy-304xx-304.137/src/XF86Config-parser/Write.c Examining data/nvidia-settings-legacy-304xx-304.137/src/XF86Config-parser/Configint.h Examining data/nvidia-settings-legacy-304xx-304.137/src/XF86Config-parser/configProcs.h Examining data/nvidia-settings-legacy-304xx-304.137/src/XF86Config-parser/xf86Parser.h Examining data/nvidia-settings-legacy-304xx-304.137/src/XF86Config-parser/xf86tokens.h Examining data/nvidia-settings-legacy-304xx-304.137/src/XF86Config-parser/Monitor.c Examining data/nvidia-settings-legacy-304xx-304.137/src/XF86Config-parser/Generate.c Examining data/nvidia-settings-legacy-304xx-304.137/src/common-utils/nvgetopt.c Examining data/nvidia-settings-legacy-304xx-304.137/src/common-utils/common-utils.c Examining data/nvidia-settings-legacy-304xx-304.137/src/common-utils/nvgetopt.h Examining data/nvidia-settings-legacy-304xx-304.137/src/common-utils/common-utils.h Examining data/nvidia-settings-legacy-304xx-304.137/src/common-utils/gen-manpage-opts-helper.c Examining data/nvidia-settings-legacy-304xx-304.137/src/common-utils/gen-manpage-opts-helper.h Examining data/nvidia-settings-legacy-304xx-304.137/src/query-assign.c Examining data/nvidia-settings-legacy-304xx-304.137/src/lscf.c Examining data/nvidia-settings-legacy-304xx-304.137/src/parse.c Examining data/nvidia-settings-legacy-304xx-304.137/samples/nv-control-dvc.c Examining data/nvidia-settings-legacy-304xx-304.137/samples/nv-control-3dvisionpro.c Examining data/nvidia-settings-legacy-304xx-304.137/samples/nv-control-dpy.c Examining data/nvidia-settings-legacy-304xx-304.137/samples/nv-control-info.c Examining data/nvidia-settings-legacy-304xx-304.137/samples/nv-control-events.c Examining data/nvidia-settings-legacy-304xx-304.137/samples/nv-control-gvi.c Examining data/nvidia-settings-legacy-304xx-304.137/samples/nv-control-targets.c Examining data/nvidia-settings-legacy-304xx-304.137/samples/nv-control-framelock.c Examining data/nvidia-settings-legacy-304xx-304.137/samples/nv-control-screen.h FINAL RESULTS: data/nvidia-settings-legacy-304xx-304.137/src/XF86Config-parser/Files.c:125:13: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat (ptr->fontpath, str); data/nvidia-settings-legacy-304xx-304.137/src/XF86Config-parser/Files.c:157:13: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat (ptr->modulepath, str); data/nvidia-settings-legacy-304xx-304.137/src/XF86Config-parser/Files.c:184:13: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat (ptr->inputdevs, str); data/nvidia-settings-legacy-304xx-304.137/src/XF86Config-parser/Generate.c:110: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(screen->identifier, 32, SCREEN_IDENTIFIER, count); data/nvidia-settings-legacy-304xx-304.137/src/XF86Config-parser/Generate.c:185:13: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. return (access(filename, F_OK) == 0); data/nvidia-settings-legacy-304xx-304.137/src/XF86Config-parser/Generate.c:218:14: [4] (shell) popen: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. stream = popen("pkg-config --variable=libdir xorg-server", "r"); data/nvidia-settings-legacy-304xx-304.137/src/XF86Config-parser/Generate.c:303:11: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. ret = system("ps -e -o fname | grep -v grep | egrep \"^xfs$\" > /dev/null"); data/nvidia-settings-legacy-304xx-304.137/src/XF86Config-parser/Generate.c:305:11: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. ret = system("ps -e -o comm | grep -v grep | egrep \"^xfs$\" > /dev/null"); data/nvidia-settings-legacy-304xx-304.137/src/XF86Config-parser/Generate.c:307:11: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. ret = system("ps -C xfs 2>&1 > /dev/null"); data/nvidia-settings-legacy-304xx-304.137/src/XF86Config-parser/Generate.c:431: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(monitor->identifier, 32, MONITOR_IDENTIFIER, count); data/nvidia-settings-legacy-304xx-304.137/src/XF86Config-parser/Generate.c:475: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(device->identifier, 32, DEVICE_IDENTIFIER, count); data/nvidia-settings-legacy-304xx-304.137/src/XF86Config-parser/Generate.c:991:13: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (access("/dev/psaux", F_OK) == 0) { data/nvidia-settings-legacy-304xx-304.137/src/XF86Config-parser/Generate.c:993:20: [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. } else if (access("/dev/input/mice", F_OK) == 0) { data/nvidia-settings-legacy-304xx-304.137/src/XF86Config-parser/Generate.c:1353:10: [4] (buffer) sscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. If the scanf format is influenceable by an attacker, it's exploitable. (sscanf(ptr, XSERVER_VERSION_FORMAT_1 " %d.%d", &major, &minor) == 2)) { data/nvidia-settings-legacy-304xx-304.137/src/XF86Config-parser/Generate.c:1359:10: [4] (buffer) sscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. If the scanf format is influenceable by an attacker, it's exploitable. (sscanf(ptr, XSERVER_VERSION_FORMAT_2 " %d.%d", &major, &minor) == 2)) { data/nvidia-settings-legacy-304xx-304.137/src/XF86Config-parser/Generate.c:1436:19: [4] (shell) popen: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. if ((stream = popen(cmd, "r"))) { data/nvidia-settings-legacy-304xx-304.137/src/XF86Config-parser/Generate.c:1477:13: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (access(xorgpath, F_OK)==0) { data/nvidia-settings-legacy-304xx-304.137/src/XF86Config-parser/Keyboard.c:140:17: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "%s %s", s1, s2); data/nvidia-settings-legacy-304xx-304.137/src/XF86Config-parser/Keyboard.c:156:21: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(s, s1); data/nvidia-settings-legacy-304xx-304.137/src/XF86Config-parser/Pointer.c:179:17: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "%s %s", s1, s2); data/nvidia-settings-legacy-304xx-304.137/src/XF86Config-parser/Scan.c:442:13: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy (val.str, configRBuf); /* private copy ! */ data/nvidia-settings-legacy-304xx-304.137/src/XF86Config-parser/Scan.c:631:33: [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(result + l, s); \ data/nvidia-settings-legacy-304xx-304.137/src/XF86Config-parser/Scan.c:878:9: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(pathcopy, searchpath); data/nvidia-settings-legacy-304xx-304.137/src/XF86Config-parser/Scan.c:944: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 (configSection, section); data/nvidia-settings-legacy-304xx-304.137/src/XF86Config-parser/Scan.c:993: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(cur + curlen, add); data/nvidia-settings-legacy-304xx-304.137/src/XF86Config-parser/Util.c:94: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(concat, str); data/nvidia-settings-legacy-304xx-304.137/src/XF86Config-parser/Util.c:98:9: [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(concat, s); data/nvidia-settings-legacy-304xx-304.137/src/XF86Config-parser/Util.c:129:15: [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(b, current_len, fmt, ap); data/nvidia-settings-legacy-304xx-304.137/src/common-utils/common-utils.c:88: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(concat, str); data/nvidia-settings-legacy-304xx-304.137/src/common-utils/common-utils.c:92:9: [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(concat, s); data/nvidia-settings-legacy-304xx-304.137/src/common-utils/common-utils.c:293:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(ret, prefix); data/nvidia-settings-legacy-304xx-304.137/src/common-utils/common-utils.c:294: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(ret, replace); data/nvidia-settings-legacy-304xx-304.137/src/common-utils/common-utils.h:101:19: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. len = vsnprintf((buf), current_len, (fmt), ap); \ data/nvidia-settings-legacy-304xx-304.137/src/common-utils/gen-manpage-opts-helper.c:34:13: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(scratch, o->arg_name); data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkdisplayconfig-utils.c:3218: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. if ((access(filename, F_OK) == 0)) { data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkdisplayconfig-utils.c:3221:14: [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(filename, W_OK) != 0)) { data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkdisplayconfig-utils.c:3243:13: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (access(backup_filename, F_OK) == 0) { data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkframelock.c:5592:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(server_name, "%s", display_name); data/nvidia-settings-legacy-304xx-304.137/src/msg.c:143: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. int vsnprintf(char *str, size_t size, const char *format, data/nvidia-settings-legacy-304xx-304.137/src/msg.c:170:9: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(local_prefix, prefix); data/nvidia-settings-legacy-304xx-304.137/src/query-assign.c:658:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(d_str, ", display device: %s", tmp_d_str); data/nvidia-settings-legacy-304xx-304.137/src/query-assign.c:872:18: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. c += sprintf(c, "%s", targetTypeTable[i].name); data/nvidia-settings-legacy-304xx-304.137/src/query-assign.c:1589:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(str, ", display device: %s", tmp_d_str); data/nvidia-settings-legacy-304xx-304.137/samples/nv-control-events.c:106:17: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt(argc, argv, "d:acbsh")) >= 0) { data/nvidia-settings-legacy-304xx-304.137/src/XF86Config-parser/Scan.c:706:27: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. env = getenv(XCONFENV); data/nvidia-settings-legacy-304xx-304.137/src/XF86Config-parser/Scan.c:716:27: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. env = getenv(XCONFENV); data/nvidia-settings-legacy-304xx-304.137/src/XF86Config-parser/Scan.c:726:27: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. env = getenv(XCONFENV); data/nvidia-settings-legacy-304xx-304.137/src/common-utils/common-utils.c:263: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. prefix = getenv("HOME"); data/nvidia-settings-legacy-304xx-304.137/samples/nv-control-3dvisionpro.c:52:21: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). target_id = atoi(argv[1]); data/nvidia-settings-legacy-304xx-304.137/samples/nv-control-dpy.c:85:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *displayDeviceNames[8]; data/nvidia-settings-legacy-304xx-304.137/samples/nv-control-dpy.c:294: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 pGtfString[128]; data/nvidia-settings-legacy-304xx-304.137/samples/nv-control-dpy.c:325: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 pCvtString[128]; data/nvidia-settings-legacy-304xx-304.137/samples/nv-control-dpy.c:988: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 *pMetaModes, *pModeLines[8], *tmp, *modeString; data/nvidia-settings-legacy-304xx-304.137/samples/nv-control-dvc.c:104:18: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). setval = atoi(argv[1]); data/nvidia-settings-legacy-304xx-304.137/samples/nv-control-events.c:417: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 unknown[24]; data/nvidia-settings-legacy-304xx-304.137/samples/nv-control-events.c:446: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 tmp[256]; data/nvidia-settings-legacy-304xx-304.137/src/XF86Config-parser/Device.c:470:12: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). *bus = atoi(p); data/nvidia-settings-legacy-304xx-304.137/src/XF86Config-parser/Device.c:472:10: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). *bus += atoi(d) << 8; data/nvidia-settings-legacy-304xx-304.137/src/XF86Config-parser/Device.c:484: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). *device = atoi(p); data/nvidia-settings-legacy-304xx-304.137/src/XF86Config-parser/Device.c:497: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). *func = atoi(p); data/nvidia-settings-legacy-304xx-304.137/src/XF86Config-parser/Flags.c:128:25: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buff[16]; data/nvidia-settings-legacy-304xx-304.137/src/XF86Config-parser/Flags.c:430: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(s, "%lu", i); data/nvidia-settings-legacy-304xx-304.137/src/XF86Config-parser/Generate.c:221:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[256]; data/nvidia-settings-legacy-304xx-304.137/src/XF86Config-parser/Generate.c:796:15: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((fd = open(filename, O_RDONLY)) == -1) goto done; data/nvidia-settings-legacy-304xx-304.137/src/XF86Config-parser/Generate.c:812:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf, data, stat_buf.st_size); data/nvidia-settings-legacy-304xx-304.137/src/XF86Config-parser/Generate.c:1437:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[NV_LINE_LEN]; data/nvidia-settings-legacy-304xx-304.137/src/XF86Config-parser/Scan.c:645: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 majorvers[3] = ""; data/nvidia-settings-legacy-304xx-304.137/src/XF86Config-parser/Scan.c:742:21: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(majorvers, "%d", X_VERSION_MAJOR); data/nvidia-settings-legacy-304xx-304.137/src/XF86Config-parser/Scan.c:862:31: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((configFile = fopen(configPath, "r")) != 0) { data/nvidia-settings-legacy-304xx-304.137/src/XF86Config-parser/Scan.c:885:35: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((configFile = fopen(configPath, "r")) != 0) { data/nvidia-settings-legacy-304xx-304.137/src/XF86Config-parser/Util.c:123:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[64]; data/nvidia-settings-legacy-304xx-304.137/src/XF86Config-parser/Util.c:146: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(scratch, "%d", configLineNo); data/nvidia-settings-legacy-304xx-304.137/src/XF86Config-parser/Util.c:151: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(scratch, "%d", configLineNo); data/nvidia-settings-legacy-304xx-304.137/src/XF86Config-parser/Write.c:75: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). if ((cf = fopen(filename, "w")) == NULL) data/nvidia-settings-legacy-304xx-304.137/src/common-utils/common-utils.c:652:17: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(tmpbuf, buf, len); data/nvidia-settings-legacy-304xx-304.137/src/common-utils/gen-manpage-opts-helper.c:26:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[64], *s; data/nvidia-settings-legacy-304xx-304.137/src/common-utils/nvgetopt.c:406:13: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char scratch[16]; data/nvidia-settings-legacy-304xx-304.137/src/config-file.c:121:10: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open(file, O_RDONLY); data/nvidia-settings-legacy-304xx-304.137/src/config-file.c:222:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *tmp_d_str, *prefix, scratch[4]; data/nvidia-settings-legacy-304xx-304.137/src/config-file.c:231: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). stream = fopen(filename, "w"); data/nvidia-settings-legacy-304xx-304.137/src/config-file.c:464: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 target_str[64]; data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctk3dvisionpro.c:329: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 str[NUM_GLASSES_INFO_ATTRIBS + 1][MAX_ATTRIB_LENGTH]; data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctk3dvisionpro.c:525:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[64]; //scratchpad memory used to construct labels. data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctk3dvisionpro.c:624:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[64]; //scratchpad memory used to construct labels. data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctk3dvisionpro.c:709:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[64]; data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctk3dvisionpro.c:800:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[64]; data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctk3dvisionpro.c:1486:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[64]; //scratchpad memory used to construct labels. data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctk3dvisionpro.h:64:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char name[GLASSES_NAME_MAX_LENGTH]; data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkcolorcorrection.c:636: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 (ctk_color_correction->prev_slider_val, data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkcursorshadow.c:211:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[16]; data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkcursorshadow.c:330:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(str, "#%2.2X%2.2X%2.2X", red, green, blue); data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkcursorshadow.c:1062:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[16]; data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkcursorshadow.c:1063:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(str, "#%2.2X%2.2X%2.2X", red, green, blue); data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkdisplayconfig-utils.c:128:28: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). metamode->id = atoi(value); data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkdisplayconfig-utils.c:212: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). screen_info->x = atoi(value); data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkdisplayconfig-utils.c:216: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). screen_info->y = atoi(value); data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkdisplayconfig-utils.c:220:30: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). screen_info->width = atoi(value); data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkdisplayconfig-utils.c:224:31: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). screen_info->height = atoi(value); data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkdisplayconfig-utils.c:3265:10: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fp = fopen(filename, "w"); data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkdisplayconfig-utils.c:3490:14: [2] (tmpfile) mkstemp: Potential for temporary file vulnerability in some circumstances. Some older Unix-like systems create temp files with permission to write by all by default, so be sure to set the umask to override this. Also, some older Unix systems might fail to use O_EXCL when opening the file, so make sure that O_EXCL is used by the library (CWE-377). tmp_fd = mkstemp(tmp_filename); data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkdisplayconfig.c:5818:11: [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). idx = atoi(str) -1; data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkdisplayconfig.c:6936:13: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[32]; data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkdisplaydevice.c:615:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char tmp[32]; data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkdisplaylayout.c:69: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 *__palettes_color_names[NUM_COLORS] = { data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkdisplaylayout.c:2249:17: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(tmpzo, data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkdisplaylayout.c:2300: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(ctk_object->Zorder, tmpzo, data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkecc.c:201:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char message[128]; data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkedid.c:350:14: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fp = fopen(filename, "wt"); data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkedid.c:368:17: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. if (sprintf(pbuf, "%02x ", data[i]) < 0) { data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkedid.c:375: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(pbuf, "%c", '\0'); data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkedid.c:386:14: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fp = fopen(filename, "wb"); data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkframelock.c:866:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char tmp[32]; data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkframelock.c:903:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char tmp[32]; data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkframelock.c:4012:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[32]; data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkframelock.c:5600: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(server_name + strlen(server_name), ":0"); data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkglx.c:266:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. const char *fbconfig_tooltips[NUM_FBCONFIG_ATTRIBS] = { data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkglx.c:460:13: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char str[NUM_FBCONFIG_ATTRIBS + 1][16]; data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkpowermizer.c:130:30: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). pEntry->perf_level = atoi(value); data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkpowermizer.c:132: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). pEntry->nvclock = atoi(value); data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkpowermizer.c:134:28: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). pEntry->memclock = atoi(value); data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkpowermizer.c:136:34: [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). pEntry->processorclock = atoi(value); data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkpowermizer.c:151:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char tmp_str[24]; data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkscreen.c:178:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char tmp[16]; data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkscreen.c:494:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char tmp[16]; data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkvcs.c:48:33: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). pFanEntry->fan_number = atoi(value); data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkvcs.c:50: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). pFanEntry->fan_speed = atoi(value); data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkvcs.c:52:33: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). pFanEntry->fan_failed = atoi(value); data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkvcs.c:64: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). pThermalEntry->intake_temp = atoi(value); data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkvcs.c:66: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). pThermalEntry->exhaust_temp = atoi(value); data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkvcs.c:68: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). pThermalEntry->board_temp = atoi(value); data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkvcs.c:80:34: [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). pPSUEntry->psu_current = atoi(value); data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkvcs.c:85: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). pPSUEntry->psu_power = atoi(value); data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkvcs.c:91: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). pPSUEntry->psu_voltage = atoi(value); data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkvcs.c:133:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char output_str[16]; data/nvidia-settings-legacy-304xx-304.137/src/libXNVCtrlAttributes/NvCtrlAttributesNvControl.c:312: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 str[16]; data/nvidia-settings-legacy-304xx-304.137/src/libXNVCtrlAttributes/NvCtrlAttributesNvControl.c:316: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(str, "%d.%d", h->nv->major_version, h->nv->minor_version); data/nvidia-settings-legacy-304xx-304.137/src/libXNVCtrlAttributes/NvCtrlAttributesVidMode.c:229: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 str[16]; data/nvidia-settings-legacy-304xx-304.137/src/libXNVCtrlAttributes/NvCtrlAttributesVidMode.c:230: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(str, "%d.%d", h->vm->major_version, h->vm->minor_version); data/nvidia-settings-legacy-304xx-304.137/src/libXNVCtrlAttributes/NvCtrlAttributesXrandr.c:410: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 str[16]; data/nvidia-settings-legacy-304xx-304.137/src/libXNVCtrlAttributes/NvCtrlAttributesXrandr.c:411: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(str, "%d.%d", h->xrandr->major_version, h->xrandr->minor_version); data/nvidia-settings-legacy-304xx-304.137/src/libXNVCtrlAttributes/NvCtrlAttributesXv.c:246: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 str[16]; data/nvidia-settings-legacy-304xx-304.137/src/libXNVCtrlAttributes/NvCtrlAttributesXv.c:247: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(str, "%d.%d", h->xv->major_version, h->xv->minor_version); data/nvidia-settings-legacy-304xx-304.137/src/parse.c:512:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char tmpname[NV_PARSER_MAX_NAME_LEN]; data/nvidia-settings-legacy-304xx-304.137/src/parse.c:1080:23: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. else s += sprintf(s, ", "); data/nvidia-settings-legacy-304xx-304.137/src/parse.c:1081:18: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. s += sprintf(s, "CRT-%X", devcnt); data/nvidia-settings-legacy-304xx-304.137/src/parse.c:1092:23: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. else s += sprintf(s, ", "); data/nvidia-settings-legacy-304xx-304.137/src/parse.c:1093:18: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. s += sprintf(s, "DFP-%X", devcnt); data/nvidia-settings-legacy-304xx-304.137/src/parse.c:1104:23: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. else s += sprintf(s, ", "); data/nvidia-settings-legacy-304xx-304.137/src/parse.c:1105:18: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. s += sprintf(s, "TV-%X", devcnt); data/nvidia-settings-legacy-304xx-304.137/src/parse.c:1113:19: [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. else s += sprintf(s, ", "); data/nvidia-settings-legacy-304xx-304.137/src/parse.c:1114:14: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. s += sprintf(s, "CRT"); data/nvidia-settings-legacy-304xx-304.137/src/parse.c:1119:19: [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. else s += sprintf(s, ", "); data/nvidia-settings-legacy-304xx-304.137/src/parse.c:1120:14: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. s += sprintf(s, "TV"); data/nvidia-settings-legacy-304xx-304.137/src/parse.c:1125:19: [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. else s += sprintf(s, ", "); data/nvidia-settings-legacy-304xx-304.137/src/parse.c:1126:14: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. s += sprintf(s, "DFP"); data/nvidia-settings-legacy-304xx-304.137/src/parse.c:1371:22: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). screen = atoi(dot + 1); data/nvidia-settings-legacy-304xx-304.137/src/parse.c:1659:12: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). *num = atoi(str); data/nvidia-settings-legacy-304xx-304.137/src/parse.c:1749:23: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). *mask = 1 << (atoi(str+4)); data/nvidia-settings-legacy-304xx-304.137/src/parse.c:1752:24: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). *mask = (1 << (atoi(str+3))) << 8; data/nvidia-settings-legacy-304xx-304.137/src/parse.c:1755:24: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). *mask = (1 << (atoi(str+4))) << 16; data/nvidia-settings-legacy-304xx-304.137/src/parse.c:1789: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). *id = atoi(str+4); data/nvidia-settings-legacy-304xx-304.137/src/query-assign.c:644:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char d_str[256]; data/nvidia-settings-legacy-304xx-304.137/src/query-assign.c:753:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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/nvidia-settings-legacy-304xx-304.137/src/query-assign.c:755:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char str2[256]; data/nvidia-settings-legacy-304xx-304.137/src/query-assign.c:838:28: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. *at += sprintf(*at, "%d", print_bit); data/nvidia-settings-legacy-304xx-304.137/src/query-assign.c:840:28: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. *at += sprintf(*at, " and %d", print_bit); data/nvidia-settings-legacy-304xx-304.137/src/query-assign.c:842:28: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. *at += sprintf(*at, ", %d", print_bit); data/nvidia-settings-legacy-304xx-304.137/src/query-assign.c:871:29: [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. if (n > 0) c += sprintf(c, ", "); data/nvidia-settings-legacy-304xx-304.137/src/query-assign.c:877:17: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. if (n == 0) sprintf(c, "None"); data/nvidia-settings-legacy-304xx-304.137/src/query-assign.c:911:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char d_str[64], val_str[64], *tmp_d_str; data/nvidia-settings-legacy-304xx-304.137/src/query-assign.c:1583:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[32], *tmp_d_str; data/nvidia-settings-legacy-304xx-304.137/src/query-assign.h:56:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *protoNames[NV_DPY_PROTO_NAME_MAX]; /* List of valid names for this target */ data/nvidia-settings-legacy-304xx-304.137/samples/nv-control-dpy.c:1494:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(str); data/nvidia-settings-legacy-304xx-304.137/samples/nv-control-events.c:475: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). for (len = 0; len < strlen(entry->name); len++) { data/nvidia-settings-legacy-304xx-304.137/samples/nv-control-info.c:58: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). for (len = 0; len < strlen(entry->name); len++) { data/nvidia-settings-legacy-304xx-304.137/src/XF86Config-parser/Device.c:419: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). *retID = busID + strlen(p) + 1; data/nvidia-settings-legacy-304xx-304.137/src/XF86Config-parser/Files.c:110: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). i = strlen (str) + 1; data/nvidia-settings-legacy-304xx-304.137/src/XF86Config-parser/Files.c:114: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). i = strlen (ptr->fontpath) + strlen (str) + 1; data/nvidia-settings-legacy-304xx-304.137/src/XF86Config-parser/Files.c:114: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). i = strlen (ptr->fontpath) + strlen (str) + 1; data/nvidia-settings-legacy-304xx-304.137/src/XF86Config-parser/Files.c:115:35: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (ptr->fontpath[strlen (ptr->fontpath) - 1] != ',') data/nvidia-settings-legacy-304xx-304.137/src/XF86Config-parser/Files.c:123:17: [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 (ptr->fontpath, ","); data/nvidia-settings-legacy-304xx-304.137/src/XF86Config-parser/Files.c:142: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). k = strlen (str) + 1; data/nvidia-settings-legacy-304xx-304.137/src/XF86Config-parser/Files.c:146: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). k = strlen (ptr->modulepath) + strlen (str) + 1; data/nvidia-settings-legacy-304xx-304.137/src/XF86Config-parser/Files.c:146:48: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). k = strlen (ptr->modulepath) + strlen (str) + 1; data/nvidia-settings-legacy-304xx-304.137/src/XF86Config-parser/Files.c:147: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). if (ptr->modulepath[strlen (ptr->modulepath) - 1] != ',') data/nvidia-settings-legacy-304xx-304.137/src/XF86Config-parser/Files.c:155:17: [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 (ptr->modulepath, ","); data/nvidia-settings-legacy-304xx-304.137/src/XF86Config-parser/Files.c:169: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). k = strlen (str) + 1; data/nvidia-settings-legacy-304xx-304.137/src/XF86Config-parser/Files.c:173: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). k = strlen (ptr->inputdevs) + strlen (str) + 1; data/nvidia-settings-legacy-304xx-304.137/src/XF86Config-parser/Files.c:173: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). k = strlen (ptr->inputdevs) + strlen (str) + 1; data/nvidia-settings-legacy-304xx-304.137/src/XF86Config-parser/Files.c:174:36: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (ptr->inputdevs[strlen (ptr->inputdevs) - 1] != ',') data/nvidia-settings-legacy-304xx-304.137/src/XF86Config-parser/Files.c:182:17: [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 (ptr->inputdevs, ","); data/nvidia-settings-legacy-304xx-304.137/src/XF86Config-parser/Generate.c:841: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). start = tmp + strlen(keyword); data/nvidia-settings-legacy-304xx-304.137/src/XF86Config-parser/Generate.c:853:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(value, start, len); data/nvidia-settings-legacy-304xx-304.137/src/XF86Config-parser/Generate.c:860:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(tmp, value + 1, len - 2); data/nvidia-settings-legacy-304xx-304.137/src/XF86Config-parser/Generate.c:966:34: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). e->device = device + strlen("/dev/"); data/nvidia-settings-legacy-304xx-304.137/src/XF86Config-parser/Keyboard.c:138: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). l = strlen(s1) + 1 + strlen(s2) + 1; data/nvidia-settings-legacy-304xx-304.137/src/XF86Config-parser/Keyboard.c:138: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). l = strlen(s1) + 1 + strlen(s2) + 1; data/nvidia-settings-legacy-304xx-304.137/src/XF86Config-parser/Keyboard.c:149: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). l = strlen(s) + 1; data/nvidia-settings-legacy-304xx-304.137/src/XF86Config-parser/Keyboard.c:153: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). l += (1 + strlen(s1)); data/nvidia-settings-legacy-304xx-304.137/src/XF86Config-parser/Keyboard.c:155:21: [1] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant character. strcat(s, " "); data/nvidia-settings-legacy-304xx-304.137/src/XF86Config-parser/Merge.c:57: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). len = 32 + strlen(name) + strlen(value); data/nvidia-settings-legacy-304xx-304.137/src/XF86Config-parser/Merge.c:57: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). len = 32 + strlen(name) + strlen(value); data/nvidia-settings-legacy-304xx-304.137/src/XF86Config-parser/Merge.c:62: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). len = 32 + strlen(name); data/nvidia-settings-legacy-304xx-304.137/src/XF86Config-parser/Pointer.c:177: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). l = strlen(s1) + 1 + strlen(s2) + 1; data/nvidia-settings-legacy-304xx-304.137/src/XF86Config-parser/Pointer.c:177: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). l = strlen(s1) + 1 + strlen(s2) + 1; data/nvidia-settings-legacy-304xx-304.137/src/XF86Config-parser/Scan.c:341:27: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). ret = strncpy(configBuf, builtinConfig[builtinIndex], data/nvidia-settings-legacy-304xx-304.137/src/XF86Config-parser/Scan.c:441: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). val.str = malloc (strlen (configRBuf) + 1); data/nvidia-settings-legacy-304xx-304.137/src/XF86Config-parser/Scan.c:567:10: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ((strlen(path) > 3) && !strcmp(path + strlen(path) - 3, "/..")) data/nvidia-settings-legacy-304xx-304.137/src/XF86Config-parser/Scan.c:567: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). if ((strlen(path) > 3) && !strcmp(path + strlen(path) - 3, "/..")) data/nvidia-settings-legacy-304xx-304.137/src/XF86Config-parser/Scan.c:628: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). if (strlen(s) + l > PATH_MAX) { \ data/nvidia-settings-legacy-304xx-304.137/src/XF86Config-parser/Scan.c:632: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). l += strlen(s); \ data/nvidia-settings-legacy-304xx-304.137/src/XF86Config-parser/Scan.c:943: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). configSection = malloc(strlen (section) + 1); data/nvidia-settings-legacy-304xx-304.137/src/XF86Config-parser/Scan.c:963: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). curlen = strlen(cur); data/nvidia-settings-legacy-304xx-304.137/src/XF86Config-parser/Scan.c:980: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(add); data/nvidia-settings-legacy-304xx-304.137/src/XF86Config-parser/Scan.c:995:9: [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(cur, "\n"); data/nvidia-settings-legacy-304xx-304.137/src/XF86Config-parser/Util.c:81: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). l = 1 + strlen(str); data/nvidia-settings-legacy-304xx-304.137/src/XF86Config-parser/Util.c:86: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). l += strlen(s); data/nvidia-settings-legacy-304xx-304.137/src/common-utils/common-utils.c:75: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). l = 1 + strlen(str); data/nvidia-settings-legacy-304xx-304.137/src/common-utils/common-utils.c:80: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). l += strlen(s); data/nvidia-settings-legacy-304xx-304.137/src/common-utils/common-utils.c:172:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (m, s, n); data/nvidia-settings-legacy-304xx-304.137/src/common-utils/common-utils.c:279:39: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (!replace) replace = str + strlen(str); data/nvidia-settings-legacy-304xx-304.137/src/common-utils/common-utils.c:283:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(user, str+1, len-1); data/nvidia-settings-legacy-304xx-304.137/src/common-utils/common-utils.c:292: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). ret = malloc(strlen(prefix) + strlen(replace) + 1); data/nvidia-settings-legacy-304xx-304.137/src/common-utils/common-utils.c:292: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). ret = malloc(strlen(prefix) + strlen(replace) + 1); data/nvidia-settings-legacy-304xx-304.137/src/common-utils/common-utils.c:354: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). z = strlen(buf); /* length of entire string */ data/nvidia-settings-legacy-304xx-304.137/src/common-utils/common-utils.c:360: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). prefix_len = strlen(prefix); data/nvidia-settings-legacy-304xx-304.137/src/common-utils/common-utils.c:407:27: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). if (local_prefix) strncpy(line, local_prefix, prefix_len); data/nvidia-settings-legacy-304xx-304.137/src/common-utils/common-utils.c:408:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(line + prefix_len, a, len - prefix_len); data/nvidia-settings-legacy-304xx-304.137/src/common-utils/common-utils.c:460:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(msg); data/nvidia-settings-legacy-304xx-304.137/src/common-utils/common-utils.c:659:15: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ret = fgetc(fp); data/nvidia-settings-legacy-304xx-304.137/src/common-utils/gen-manpage-opts-helper.c:36:19: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(o->name); data/nvidia-settings-legacy-304xx-304.137/src/config-file.c:592:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (tmp, cur, len); data/nvidia-settings-legacy-304xx-304.137/src/glxinfo.c:68: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). extTmp = malloc( (strlen(ext) +i +1) *sizeof(char) ); data/nvidia-settings-legacy-304xx-304.137/src/glxinfo.c:85: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). while ( extTmp[ strlen(extTmp)-1 ] == ' ' || data/nvidia-settings-legacy-304xx-304.137/src/glxinfo.c:86: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). extTmp[ strlen(extTmp)-1 ] == ',' ) { data/nvidia-settings-legacy-304xx-304.137/src/glxinfo.c:87: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). extTmp[ strlen(extTmp)-1 ] = '\0'; data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctk3dvisionpro.c:304:60: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). dlg->glasses_new_name = realloc(dlg->glasses_new_name, strlen(str) + 1); data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctk3dvisionpro.c:305:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(dlg->glasses_new_name, str, strlen(str) + 1); data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctk3dvisionpro.c:305: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). strncpy(dlg->glasses_new_name, str, strlen(str) + 1); data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctk3dvisionpro.c:566:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(glasses->name, glasses_name, sizeof(glasses->name));; data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctk3dvisionpro.c:776:17: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(glasses->name, glasses_name, sizeof(glasses->name)); data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctk3dvisionpro.c:1299:50: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (dlg->glasses_new_name == NULL || strlen(dlg->glasses_new_name) == 0) { data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctk3dvisionpro.c:1324:21: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(HTU(0)->glasses_info[dlg->glasses_selected_index]->name, dlg->glasses_new_name, data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctk3dvisionpro.c:1580:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(glasses->name, glasses_name, sizeof(glasses->name)); data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkdisplayconfig-utils.c:64: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). if (!modeline || !token || !strlen(token)) { data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkdisplayconfig-utils.c:70: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). if (!value || !strlen(value)) { data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkdisplayconfig-utils.c:90: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). if (!value || !strlen(value)) { data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkdisplayconfig-utils.c:119: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). if (!metamode || !token || !strlen(token)) { data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkdisplayconfig-utils.c:125: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). if (!value || !strlen(value)) { data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkdisplayconfig-utils.c:133: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). if (!value || !strlen(value)) { data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkdisplayconfig-utils.c:147: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). if (!value || !strlen(value)) { data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkdisplayconfig-utils.c:176: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). if (!source || !token || !strlen(token)) { data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkdisplayconfig-utils.c:206:36: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (!screen_info || !token || !strlen(token)) { data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkdisplayconfig-utils.c:303: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). while ((str = parse_read_name(str, &tmp, 0)) && strlen(tmp)) { data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkdisplayconfig-utils.c:450: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). if (!mode || !token || !strlen(token)) { data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkdisplayconfig-utils.c:1055: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). while (strlen(str)) { data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkdisplayconfig-utils.c:1076: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). str += strlen(str) +1; data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkdisplayconfig-utils.c:1816: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). (str && strlen(str)); data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkdisplayconfig-utils.c:1817: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). str += strlen(str) +1) { data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkdisplayconfig.c:622:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(metamode_strs); data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkdisplayconfig.c:659: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). metamode_len = strlen(metamode_str); data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkdisplayconfig.c:6164:34: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). for (m = metamode_strs; m && strlen(m); m += strlen(m) +1) { data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkdisplayconfig.c:6164:50: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). for (m = metamode_strs; m && strlen(m); m += strlen(m) +1) { data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkdisplayconfig.c:6291: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). len = 24 + strlen(metamode_str); data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkdisplayconfig.c:6326: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). metamode_str && strlen(metamode_str); data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkdisplayconfig.c:6327: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). metamode_str += strlen(metamode_str) +1) { data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkdisplayconfig.c:6649: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(display->logName); data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkedid.c:219: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(ctk_edid->filename); data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkedid.c:224:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(filename, ctk_edid->filename, len); data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkedid.c:261:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(buffer, filename, n); data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkframelock.c:5587: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). server_name = malloc(strlen(display_name) + 3); data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkframelock.c:5600: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). sprintf(server_name + strlen(server_name), ":0"); data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkglx.c:467:17: [1] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source is a constant character. sprintf((char *) (&(str[cell++])),"."); data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkglx.c:474:17: [1] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source is a constant character. sprintf((char *) (&(str[cell++])),"."); data/nvidia-settings-legacy-304xx-304.137/src/gtk+-2.x/ctkgvo-sync.c:191: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). tmp = strlen(videoFormatNames[i].name); data/nvidia-settings-legacy-304xx-304.137/src/libXNVCtrl/NVCtrl.c:530: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 = strlen(ptr)+1; data/nvidia-settings-legacy-304xx-304.137/src/libXNVCtrl/NVCtrl.c:1083: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). inSize = strlen(pIn) + 1; data/nvidia-settings-legacy-304xx-304.137/src/msg.c:164: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). z = strlen(buf); data/nvidia-settings-legacy-304xx-304.137/src/msg.c:168: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). prefix_len = strlen(prefix); data/nvidia-settings-legacy-304xx-304.137/src/msg.c:220:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(line, a, len); data/nvidia-settings-legacy-304xx-304.137/src/parse.c:565:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(tmpname, name, len); data/nvidia-settings-legacy-304xx-304.137/src/parse.c:619: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). tmp = s + strlen(s); data/nvidia-settings-legacy-304xx-304.137/src/parse.c:636: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). tmp = s + strlen(s); data/nvidia-settings-legacy-304xx-304.137/src/parse.c:645: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). tmp = s + strlen(s); data/nvidia-settings-legacy-304xx-304.137/src/parse.c:653: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). tmp = s + strlen(s); data/nvidia-settings-legacy-304xx-304.137/src/parse.c:1353:19: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(display_name) + strlen(uname_buf.nodename) + 1; data/nvidia-settings-legacy-304xx-304.137/src/parse.c:1353: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). len = strlen(display_name) + strlen(uname_buf.nodename) + 1; data/nvidia-settings-legacy-304xx-304.137/src/parse.c:1394:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(display_name) + 8; data/nvidia-settings-legacy-304xx-304.137/src/parse.c:1418: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 (o); data/nvidia-settings-legacy-304xx-304.137/src/parse.c:1452: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(o); data/nvidia-settings-legacy-304xx-304.137/src/parse.c:1619: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). char *tmp = str + strlen(str) -1; data/nvidia-settings-legacy-304xx-304.137/src/parse.c:1724:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(*name, tmp, str -tmp); data/nvidia-settings-legacy-304xx-304.137/src/query-assign.c:306:23: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(tmp) + strlen(targetTypeTable[j].parsed_name) +16; data/nvidia-settings-legacy-304xx-304.137/src/query-assign.c:306: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). len = strlen(tmp) + strlen(targetTypeTable[j].parsed_name) +16; ANALYSIS SUMMARY: Hits = 294 Lines analyzed = 153982 in approximately 8.18 seconds (18833 lines/second) Physical Source Lines of Code (SLOC) = 114688 Hits@level = [0] 820 [1] 122 [2] 124 [3] 5 [4] 43 [5] 0 Hits@level+ = [0+] 1114 [1+] 294 [2+] 172 [3+] 48 [4+] 43 [5+] 0 Hits/KSLOC@level+ = [0+] 9.71331 [1+] 2.56348 [2+] 1.49972 [3+] 0.418527 [4+] 0.37493 [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.