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-340xx-340.108/src/libXNVCtrl/NVCtrl.c
Examining data/nvidia-settings-legacy-340xx-340.108/src/libXNVCtrl/NVCtrl.h
Examining data/nvidia-settings-legacy-340xx-340.108/src/libXNVCtrl/NVCtrlLib.h
Examining data/nvidia-settings-legacy-340xx-340.108/src/libXNVCtrl/nv_control.h
Examining data/nvidia-settings-legacy-340xx-340.108/src/config-file.c
Examining data/nvidia-settings-legacy-340xx-340.108/src/lscf.c
Examining data/nvidia-settings-legacy-340xx-340.108/src/nvidia-settings.c
Examining data/nvidia-settings-legacy-340xx-340.108/src/query-assign.c
Examining data/nvidia-settings-legacy-340xx-340.108/src/app-profiles.c
Examining data/nvidia-settings-legacy-340xx-340.108/src/glxinfo.c
Examining data/nvidia-settings-legacy-340xx-340.108/src/libXNVCtrlAttributes/NvCtrlAttributes.c
Examining data/nvidia-settings-legacy-340xx-340.108/src/libXNVCtrlAttributes/NvCtrlAttributesNvControl.c
Examining data/nvidia-settings-legacy-340xx-340.108/src/libXNVCtrlAttributes/NvCtrlAttributesVidMode.c
Examining data/nvidia-settings-legacy-340xx-340.108/src/libXNVCtrlAttributes/NvCtrlAttributesXv.c
Examining data/nvidia-settings-legacy-340xx-340.108/src/libXNVCtrlAttributes/NvCtrlAttributesGlx.c
Examining data/nvidia-settings-legacy-340xx-340.108/src/libXNVCtrlAttributes/NvCtrlAttributesXrandr.c
Examining data/nvidia-settings-legacy-340xx-340.108/src/libXNVCtrlAttributes/NvCtrlAttributes.h
Examining data/nvidia-settings-legacy-340xx-340.108/src/libXNVCtrlAttributes/NvCtrlAttributesPrivate.h
Examining data/nvidia-settings-legacy-340xx-340.108/src/gtk+-2.x/ctkxvideo.c
Examining data/nvidia-settings-legacy-340xx-340.108/src/gtk+-2.x/ctkui.c
Examining data/nvidia-settings-legacy-340xx-340.108/src/gtk+-2.x/ctkframelock.c
Examining data/nvidia-settings-legacy-340xx-340.108/src/gtk+-2.x/ctkgauge.c
Examining data/nvidia-settings-legacy-340xx-340.108/src/gtk+-2.x/ctkcurve.c
Examining data/nvidia-settings-legacy-340xx-340.108/src/gtk+-2.x/ctkcolorcorrection.c
Examining data/nvidia-settings-legacy-340xx-340.108/src/gtk+-2.x/ctkcolorcorrectionpage.c
Examining data/nvidia-settings-legacy-340xx-340.108/src/gtk+-2.x/ctkscale.c
Examining data/nvidia-settings-legacy-340xx-340.108/src/gtk+-2.x/ctkmultisample.c
Examining data/nvidia-settings-legacy-340xx-340.108/src/gtk+-2.x/ctkconfig.c
Examining data/nvidia-settings-legacy-340xx-340.108/src/gtk+-2.x/ctkevent.c
Examining data/nvidia-settings-legacy-340xx-340.108/src/gtk+-2.x/ctkwindow.c
Examining data/nvidia-settings-legacy-340xx-340.108/src/gtk+-2.x/ctkopengl.c
Examining data/nvidia-settings-legacy-340xx-340.108/src/gtk+-2.x/ctkglx.c
Examining data/nvidia-settings-legacy-340xx-340.108/src/gtk+-2.x/ctkhelp.c
Examining data/nvidia-settings-legacy-340xx-340.108/src/gtk+-2.x/ctkimagesliders.c
Examining data/nvidia-settings-legacy-340xx-340.108/src/gtk+-2.x/ctkdisplaydevice.c
Examining data/nvidia-settings-legacy-340xx-340.108/src/gtk+-2.x/ctkditheringcontrols.c
Examining data/nvidia-settings-legacy-340xx-340.108/src/gtk+-2.x/ctkthermal.c
Examining data/nvidia-settings-legacy-340xx-340.108/src/gtk+-2.x/ctkpowermizer.c
Examining data/nvidia-settings-legacy-340xx-340.108/src/gtk+-2.x/ctkgvo.c
Examining data/nvidia-settings-legacy-340xx-340.108/src/gtk+-2.x/ctkgvo-csc.c
Examining data/nvidia-settings-legacy-340xx-340.108/src/gtk+-2.x/ctkdropdownmenu.c
Examining data/nvidia-settings-legacy-340xx-340.108/src/gtk+-2.x/ctkclocks.c
Examining data/nvidia-settings-legacy-340xx-340.108/src/gtk+-2.x/ctkutils.c
Examining data/nvidia-settings-legacy-340xx-340.108/src/gtk+-2.x/ctkedid.c
Examining data/nvidia-settings-legacy-340xx-340.108/src/gtk+-2.x/ctkserver.c
Examining data/nvidia-settings-legacy-340xx-340.108/src/gtk+-2.x/ctkdisplaylayout.c
Examining data/nvidia-settings-legacy-340xx-340.108/src/gtk+-2.x/ctkdisplayconfig.c
Examining data/nvidia-settings-legacy-340xx-340.108/src/gtk+-2.x/ctkscreen.c
Examining data/nvidia-settings-legacy-340xx-340.108/src/gtk+-2.x/ctkslimm.c
Examining data/nvidia-settings-legacy-340xx-340.108/src/gtk+-2.x/ctkgpu.c
Examining data/nvidia-settings-legacy-340xx-340.108/src/gtk+-2.x/ctkbanner.c
Examining data/nvidia-settings-legacy-340xx-340.108/src/gtk+-2.x/ctkvcs.c
Examining data/nvidia-settings-legacy-340xx-340.108/src/gtk+-2.x/ctkgvo-banner.c
Examining data/nvidia-settings-legacy-340xx-340.108/src/gtk+-2.x/ctkgvo-sync.c
Examining data/nvidia-settings-legacy-340xx-340.108/src/gtk+-2.x/ctkgvi.c
Examining data/nvidia-settings-legacy-340xx-340.108/src/gtk+-2.x/ctkecc.c
Examining data/nvidia-settings-legacy-340xx-340.108/src/gtk+-2.x/ctkappprofile.c
Examining data/nvidia-settings-legacy-340xx-340.108/src/gtk+-2.x/ctkapcprofilemodel.c
Examining data/nvidia-settings-legacy-340xx-340.108/src/gtk+-2.x/ctkapcrulemodel.c
Examining data/nvidia-settings-legacy-340xx-340.108/src/gtk+-2.x/ctkcolorcontrols.c
Examining data/nvidia-settings-legacy-340xx-340.108/src/gtk+-2.x/ctk3dvisionpro.c
Examining data/nvidia-settings-legacy-340xx-340.108/src/gtk+-2.x/ctkxvideo.h
Examining data/nvidia-settings-legacy-340xx-340.108/src/gtk+-2.x/ctkui.h
Examining data/nvidia-settings-legacy-340xx-340.108/src/gtk+-2.x/ctkframelock.h
Examining data/nvidia-settings-legacy-340xx-340.108/src/gtk+-2.x/ctkgauge.h
Examining data/nvidia-settings-legacy-340xx-340.108/src/gtk+-2.x/ctkcurve.h
Examining data/nvidia-settings-legacy-340xx-340.108/src/gtk+-2.x/ctkcolorcorrection.h
Examining data/nvidia-settings-legacy-340xx-340.108/src/gtk+-2.x/ctkcolorcorrectionpage.h
Examining data/nvidia-settings-legacy-340xx-340.108/src/gtk+-2.x/ctkscale.h
Examining data/nvidia-settings-legacy-340xx-340.108/src/gtk+-2.x/ctkmultisample.h
Examining data/nvidia-settings-legacy-340xx-340.108/src/gtk+-2.x/ctkconfig.h
Examining data/nvidia-settings-legacy-340xx-340.108/src/gtk+-2.x/ctkevent.h
Examining data/nvidia-settings-legacy-340xx-340.108/src/gtk+-2.x/ctkwindow.h
Examining data/nvidia-settings-legacy-340xx-340.108/src/gtk+-2.x/ctkopengl.h
Examining data/nvidia-settings-legacy-340xx-340.108/src/gtk+-2.x/ctkglx.h
Examining data/nvidia-settings-legacy-340xx-340.108/src/gtk+-2.x/ctkhelp.h
Examining data/nvidia-settings-legacy-340xx-340.108/src/gtk+-2.x/ctkimagesliders.h
Examining data/nvidia-settings-legacy-340xx-340.108/src/gtk+-2.x/ctkdisplaydevice.h
Examining data/nvidia-settings-legacy-340xx-340.108/src/gtk+-2.x/ctkditheringcontrols.h
Examining data/nvidia-settings-legacy-340xx-340.108/src/gtk+-2.x/ctkconstants.h
Examining data/nvidia-settings-legacy-340xx-340.108/src/gtk+-2.x/ctkthermal.h
Examining data/nvidia-settings-legacy-340xx-340.108/src/gtk+-2.x/ctkpowermizer.h
Examining data/nvidia-settings-legacy-340xx-340.108/src/gtk+-2.x/ctkgvo.h
Examining data/nvidia-settings-legacy-340xx-340.108/src/gtk+-2.x/ctkgvo-csc.h
Examining data/nvidia-settings-legacy-340xx-340.108/src/gtk+-2.x/ctkdropdownmenu.h
Examining data/nvidia-settings-legacy-340xx-340.108/src/gtk+-2.x/ctkclocks.h
Examining data/nvidia-settings-legacy-340xx-340.108/src/gtk+-2.x/ctkutils.h
Examining data/nvidia-settings-legacy-340xx-340.108/src/gtk+-2.x/ctkedid.h
Examining data/nvidia-settings-legacy-340xx-340.108/src/gtk+-2.x/ctkserver.h
Examining data/nvidia-settings-legacy-340xx-340.108/src/gtk+-2.x/ctkdisplaylayout.h
Examining data/nvidia-settings-legacy-340xx-340.108/src/gtk+-2.x/ctkdisplayconfig.h
Examining data/nvidia-settings-legacy-340xx-340.108/src/gtk+-2.x/ctkscreen.h
Examining data/nvidia-settings-legacy-340xx-340.108/src/gtk+-2.x/ctkslimm.h
Examining data/nvidia-settings-legacy-340xx-340.108/src/gtk+-2.x/ctkgpu.h
Examining data/nvidia-settings-legacy-340xx-340.108/src/gtk+-2.x/ctkbanner.h
Examining data/nvidia-settings-legacy-340xx-340.108/src/gtk+-2.x/ctkvcs.h
Examining data/nvidia-settings-legacy-340xx-340.108/src/gtk+-2.x/ctkdisplayconfig-utils.h
Examining data/nvidia-settings-legacy-340xx-340.108/src/gtk+-2.x/ctkgvo-banner.h
Examining data/nvidia-settings-legacy-340xx-340.108/src/gtk+-2.x/ctkgvo-sync.h
Examining data/nvidia-settings-legacy-340xx-340.108/src/gtk+-2.x/ctkgvi.h
Examining data/nvidia-settings-legacy-340xx-340.108/src/gtk+-2.x/ctkecc.h
Examining data/nvidia-settings-legacy-340xx-340.108/src/gtk+-2.x/ctkappprofile.h
Examining data/nvidia-settings-legacy-340xx-340.108/src/gtk+-2.x/ctkapcprofilemodel.h
Examining data/nvidia-settings-legacy-340xx-340.108/src/gtk+-2.x/ctkapcrulemodel.h
Examining data/nvidia-settings-legacy-340xx-340.108/src/gtk+-2.x/ctkcolorcontrols.h
Examining data/nvidia-settings-legacy-340xx-340.108/src/gtk+-2.x/ctk3dvisionpro.h
Examining data/nvidia-settings-legacy-340xx-340.108/src/gtk+-2.x/ctkdisplayconfig-utils.c
Examining data/nvidia-settings-legacy-340xx-340.108/src/gtk+-2.x/ctkvdpau.c
Examining data/nvidia-settings-legacy-340xx-340.108/src/gtk+-2.x/ctkvdpau.h
Examining data/nvidia-settings-legacy-340xx-340.108/src/jansson/dump.c
Examining data/nvidia-settings-legacy-340xx-340.108/src/jansson/error.c
Examining data/nvidia-settings-legacy-340xx-340.108/src/jansson/hashtable.c
Examining data/nvidia-settings-legacy-340xx-340.108/src/jansson/hashtable_seed.c
Examining data/nvidia-settings-legacy-340xx-340.108/src/jansson/load.c
Examining data/nvidia-settings-legacy-340xx-340.108/src/jansson/memory.c
Examining data/nvidia-settings-legacy-340xx-340.108/src/jansson/pack_unpack.c
Examining data/nvidia-settings-legacy-340xx-340.108/src/jansson/strbuffer.c
Examining data/nvidia-settings-legacy-340xx-340.108/src/jansson/strconv.c
Examining data/nvidia-settings-legacy-340xx-340.108/src/jansson/utf.c
Examining data/nvidia-settings-legacy-340xx-340.108/src/jansson/value.c
Examining data/nvidia-settings-legacy-340xx-340.108/src/jansson/hashtable.h
Examining data/nvidia-settings-legacy-340xx-340.108/src/jansson/jansson_config.h
Examining data/nvidia-settings-legacy-340xx-340.108/src/jansson/jansson.h
Examining data/nvidia-settings-legacy-340xx-340.108/src/jansson/jansson_private_config.h
Examining data/nvidia-settings-legacy-340xx-340.108/src/jansson/jansson_private.h
Examining data/nvidia-settings-legacy-340xx-340.108/src/jansson/lookup3.h
Examining data/nvidia-settings-legacy-340xx-340.108/src/jansson/strbuffer.h
Examining data/nvidia-settings-legacy-340xx-340.108/src/jansson/utf.h
Examining data/nvidia-settings-legacy-340xx-340.108/src/command-line.h
Examining data/nvidia-settings-legacy-340xx-340.108/src/option-table.h
Examining data/nvidia-settings-legacy-340xx-340.108/src/config-file.h
Examining data/nvidia-settings-legacy-340xx-340.108/src/lscf.h
Examining data/nvidia-settings-legacy-340xx-340.108/src/parse.h
Examining data/nvidia-settings-legacy-340xx-340.108/src/query-assign.h
Examining data/nvidia-settings-legacy-340xx-340.108/src/app-profiles.h
Examining data/nvidia-settings-legacy-340xx-340.108/src/glxinfo.h
Examining data/nvidia-settings-legacy-340xx-340.108/src/gen-manpage-opts.c
Examining data/nvidia-settings-legacy-340xx-340.108/src/image_data/antialias_pixdata.h
Examining data/nvidia-settings-legacy-340xx-340.108/src/image_data/background_pixdata.h
Examining data/nvidia-settings-legacy-340xx-340.108/src/image_data/background_tall_pixdata.h
Examining data/nvidia-settings-legacy-340xx-340.108/src/image_data/bnc_cable_pixdata.h
Examining data/nvidia-settings-legacy-340xx-340.108/src/image_data/bsd_pixdata.h
Examining data/nvidia-settings-legacy-340xx-340.108/src/image_data/clock_pixdata.h
Examining data/nvidia-settings-legacy-340xx-340.108/src/image_data/color_pixdata.h
Examining data/nvidia-settings-legacy-340xx-340.108/src/image_data/config_pixdata.h
Examining data/nvidia-settings-legacy-340xx-340.108/src/image_data/crt_pixdata.h
Examining data/nvidia-settings-legacy-340xx-340.108/src/image_data/dfp_pixdata.h
Examining data/nvidia-settings-legacy-340xx-340.108/src/image_data/display_config_pixdata.h
Examining data/nvidia-settings-legacy-340xx-340.108/src/image_data/framelock_pixdata.h
Examining data/nvidia-settings-legacy-340xx-340.108/src/image_data/glx_pixdata.h
Examining data/nvidia-settings-legacy-340xx-340.108/src/image_data/gpu_pixdata.h
Examining data/nvidia-settings-legacy-340xx-340.108/src/image_data/gvi_pixdata.h
Examining data/nvidia-settings-legacy-340xx-340.108/src/image_data/help_pixdata.h
Examining data/nvidia-settings-legacy-340xx-340.108/src/image_data/led_green_pixdata.h
Examining data/nvidia-settings-legacy-340xx-340.108/src/image_data/led_grey_pixdata.h
Examining data/nvidia-settings-legacy-340xx-340.108/src/image_data/led_red_pixdata.h
Examining data/nvidia-settings-legacy-340xx-340.108/src/image_data/logo_pixdata.h
Examining data/nvidia-settings-legacy-340xx-340.108/src/image_data/logo_tall_pixdata.h
Examining data/nvidia-settings-legacy-340xx-340.108/src/image_data/nvidia_icon_pixdata.h
Examining data/nvidia-settings-legacy-340xx-340.108/src/image_data/opengl_pixdata.h
Examining data/nvidia-settings-legacy-340xx-340.108/src/image_data/penguin_pixdata.h
Examining data/nvidia-settings-legacy-340xx-340.108/src/image_data/rj45_input_pixdata.h
Examining data/nvidia-settings-legacy-340xx-340.108/src/image_data/rj45_output_pixdata.h
Examining data/nvidia-settings-legacy-340xx-340.108/src/image_data/rj45_unused_pixdata.h
Examining data/nvidia-settings-legacy-340xx-340.108/src/image_data/sdi_pixdata.h
Examining data/nvidia-settings-legacy-340xx-340.108/src/image_data/sdi_shared_sync_bnc_pixdata.h
Examining data/nvidia-settings-legacy-340xx-340.108/src/image_data/slimm_pixdata.h
Examining data/nvidia-settings-legacy-340xx-340.108/src/image_data/solaris_pixdata.h
Examining data/nvidia-settings-legacy-340xx-340.108/src/image_data/svp_3dvp_pixdata.h
Examining data/nvidia-settings-legacy-340xx-340.108/src/image_data/thermal_pixdata.h
Examining data/nvidia-settings-legacy-340xx-340.108/src/image_data/vcs_pixdata.h
Examining data/nvidia-settings-legacy-340xx-340.108/src/image_data/vdpau_pixdata.h
Examining data/nvidia-settings-legacy-340xx-340.108/src/image_data/x_pixdata.h
Examining data/nvidia-settings-legacy-340xx-340.108/src/image_data/xvideo_pixdata.h
Examining data/nvidia-settings-legacy-340xx-340.108/src/xpm_data/blue_xpm.h
Examining data/nvidia-settings-legacy-340xx-340.108/src/xpm_data/green_xpm.h
Examining data/nvidia-settings-legacy-340xx-340.108/src/xpm_data/red_xpm.h
Examining data/nvidia-settings-legacy-340xx-340.108/src/xpm_data/rgb_xpm.h
Examining data/nvidia-settings-legacy-340xx-340.108/src/xpm_data/svp_add_glasses.h
Examining data/nvidia-settings-legacy-340xx-340.108/src/xpm_data/svp_autopick_next_channel.h
Examining data/nvidia-settings-legacy-340xx-340.108/src/xpm_data/svp_battery_0.h
Examining data/nvidia-settings-legacy-340xx-340.108/src/xpm_data/svp_battery_100.h
Examining data/nvidia-settings-legacy-340xx-340.108/src/xpm_data/svp_battery_25.h
Examining data/nvidia-settings-legacy-340xx-340.108/src/xpm_data/svp_battery_50.h
Examining data/nvidia-settings-legacy-340xx-340.108/src/xpm_data/svp_battery_75.h
Examining data/nvidia-settings-legacy-340xx-340.108/src/xpm_data/svp_status_excellent.h
Examining data/nvidia-settings-legacy-340xx-340.108/src/xpm_data/svp_status_good.h
Examining data/nvidia-settings-legacy-340xx-340.108/src/xpm_data/svp_status_low.h
Examining data/nvidia-settings-legacy-340xx-340.108/src/xpm_data/svp_status_nosignal.h
Examining data/nvidia-settings-legacy-340xx-340.108/src/xpm_data/svp_status_verygood.h
Examining data/nvidia-settings-legacy-340xx-340.108/src/xpm_data/svp_status_verylow.h
Examining data/nvidia-settings-legacy-340xx-340.108/src/XF86Config-parser/DRI.c
Examining data/nvidia-settings-legacy-340xx-340.108/src/XF86Config-parser/Device.c
Examining data/nvidia-settings-legacy-340xx-340.108/src/XF86Config-parser/Extensions.c
Examining data/nvidia-settings-legacy-340xx-340.108/src/XF86Config-parser/Files.c
Examining data/nvidia-settings-legacy-340xx-340.108/src/XF86Config-parser/Flags.c
Examining data/nvidia-settings-legacy-340xx-340.108/src/XF86Config-parser/Input.c
Examining data/nvidia-settings-legacy-340xx-340.108/src/XF86Config-parser/Keyboard.c
Examining data/nvidia-settings-legacy-340xx-340.108/src/XF86Config-parser/Layout.c
Examining data/nvidia-settings-legacy-340xx-340.108/src/XF86Config-parser/Merge.c
Examining data/nvidia-settings-legacy-340xx-340.108/src/XF86Config-parser/Module.c
Examining data/nvidia-settings-legacy-340xx-340.108/src/XF86Config-parser/Pointer.c
Examining data/nvidia-settings-legacy-340xx-340.108/src/XF86Config-parser/Read.c
Examining data/nvidia-settings-legacy-340xx-340.108/src/XF86Config-parser/Scan.c
Examining data/nvidia-settings-legacy-340xx-340.108/src/XF86Config-parser/Screen.c
Examining data/nvidia-settings-legacy-340xx-340.108/src/XF86Config-parser/Util.c
Examining data/nvidia-settings-legacy-340xx-340.108/src/XF86Config-parser/Vendor.c
Examining data/nvidia-settings-legacy-340xx-340.108/src/XF86Config-parser/Video.c
Examining data/nvidia-settings-legacy-340xx-340.108/src/XF86Config-parser/Write.c
Examining data/nvidia-settings-legacy-340xx-340.108/src/XF86Config-parser/Configint.h
Examining data/nvidia-settings-legacy-340xx-340.108/src/XF86Config-parser/configProcs.h
Examining data/nvidia-settings-legacy-340xx-340.108/src/XF86Config-parser/xf86Parser.h
Examining data/nvidia-settings-legacy-340xx-340.108/src/XF86Config-parser/xf86tokens.h
Examining data/nvidia-settings-legacy-340xx-340.108/src/XF86Config-parser/Monitor.c
Examining data/nvidia-settings-legacy-340xx-340.108/src/XF86Config-parser/Generate.c
Examining data/nvidia-settings-legacy-340xx-340.108/src/common-utils/nvgetopt.c
Examining data/nvidia-settings-legacy-340xx-340.108/src/common-utils/common-utils.c
Examining data/nvidia-settings-legacy-340xx-340.108/src/common-utils/msg.c
Examining data/nvidia-settings-legacy-340xx-340.108/src/common-utils/nvgetopt.h
Examining data/nvidia-settings-legacy-340xx-340.108/src/common-utils/msg.h
Examining data/nvidia-settings-legacy-340xx-340.108/src/common-utils/gen-manpage-opts-helper.c
Examining data/nvidia-settings-legacy-340xx-340.108/src/common-utils/gen-manpage-opts-helper.h
Examining data/nvidia-settings-legacy-340xx-340.108/src/common-utils/common-utils.h
Examining data/nvidia-settings-legacy-340xx-340.108/src/common-unix/virtual-resolutions/nvvr.c
Examining data/nvidia-settings-legacy-340xx-340.108/src/common-unix/virtual-resolutions/nvvr.h
Examining data/nvidia-settings-legacy-340xx-340.108/src/command-line.c
Examining data/nvidia-settings-legacy-340xx-340.108/src/parse.c
Examining data/nvidia-settings-legacy-340xx-340.108/samples/nv-control-dvc.c
Examining data/nvidia-settings-legacy-340xx-340.108/samples/nv-control-3dvisionpro.c
Examining data/nvidia-settings-legacy-340xx-340.108/samples/nv-control-dpy.c
Examining data/nvidia-settings-legacy-340xx-340.108/samples/nv-control-info.c
Examining data/nvidia-settings-legacy-340xx-340.108/samples/nv-control-events.c
Examining data/nvidia-settings-legacy-340xx-340.108/samples/nv-control-gvi.c
Examining data/nvidia-settings-legacy-340xx-340.108/samples/nv-control-targets.c
Examining data/nvidia-settings-legacy-340xx-340.108/samples/nv-control-framelock.c
Examining data/nvidia-settings-legacy-340xx-340.108/samples/nv-control-warpblend.c
Examining data/nvidia-settings-legacy-340xx-340.108/samples/nv-control-warpblend.h
Examining data/nvidia-settings-legacy-340xx-340.108/samples/nv-control-screen.h

FINAL RESULTS:

data/nvidia-settings-legacy-340xx-340.108/samples/nv-control-warpblend.h:293:13:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
            sprintf(newAttribute, " {%s}", attributes);
data/nvidia-settings-legacy-340xx-340.108/samples/nv-control-warpblend.h:297:13:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
            sprintf(newAttribute, ", %s}", attributes);
data/nvidia-settings-legacy-340xx-340.108/samples/nv-control-warpblend.h:300:13:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
            sprintf(newAttribute, " {%s},", attributes);
data/nvidia-settings-legacy-340xx-340.108/samples/nv-control-warpblend.h:315:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(newMetaMode, "%s%s%s",
data/nvidia-settings-legacy-340xx-340.108/samples/nv-control-warpblend.h:412:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(newAttributes, "%s=%s, BlendOrder=BlendAfterWarp",
data/nvidia-settings-legacy-340xx-340.108/samples/nv-control-warpblend.h:415:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(newAttributes, "%s=%s, BlendOrder=WarpAfterBlend",
data/nvidia-settings-legacy-340xx-340.108/samples/nv-control-warpblend.h:515:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(newAttributes, "WarpMesh=%s", tempName);
data/nvidia-settings-legacy-340xx-340.108/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-340xx-340.108/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-340xx-340.108/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-340xx-340.108/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-340xx-340.108/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-340xx-340.108/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-340xx-340.108/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-340xx-340.108/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-340xx-340.108/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-340xx-340.108/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-340xx-340.108/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-340xx-340.108/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-340xx-340.108/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-340xx-340.108/src/XF86Config-parser/Generate.c:1360: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-340xx-340.108/src/XF86Config-parser/Generate.c:1366: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-340xx-340.108/src/XF86Config-parser/Generate.c:1479: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-340xx-340.108/src/XF86Config-parser/Generate.c:1523: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-340xx-340.108/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-340xx-340.108/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-340xx-340.108/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-340xx-340.108/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-340xx-340.108/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-340xx-340.108/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-340xx-340.108/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-340xx-340.108/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-340xx-340.108/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-340xx-340.108/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-340xx-340.108/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-340xx-340.108/src/app-profiles.c:89:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(*s + b, "%s%s", replace, tail);
data/nvidia-settings-legacy-340xx-340.108/src/common-utils/common-utils.c:86: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-340xx-340.108/src/common-utils/common-utils.c:90: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-340xx-340.108/src/common-utils/common-utils.c:334: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-340xx-340.108/src/common-utils/common-utils.c:335: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-340xx-340.108/src/common-utils/gen-manpage-opts-helper.c:36: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-340xx-340.108/src/common-utils/msg.c:219: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-340xx-340.108/src/common-utils/msg.h:66: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-340xx-340.108/src/gtk+-2.x/ctkappprofile.c:3643:17:  [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 (file && access(file, F_OK) != -1) {
data/nvidia-settings-legacy-340xx-340.108/src/gtk+-2.x/ctkappprofile.c:3645:16:  [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(file_noversion, F_OK) != -1) {
data/nvidia-settings-legacy-340xx-340.108/src/gtk+-2.x/ctkdisplayconfig-utils.c:3969: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-340xx-340.108/src/gtk+-2.x/ctkdisplayconfig-utils.c:3972: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-340xx-340.108/src/gtk+-2.x/ctkdisplayconfig-utils.c:3994: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-340xx-340.108/src/gtk+-2.x/ctkframelock.c:5668: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-340xx-340.108/src/jansson/dump.c:196:20:  [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.
            size = snprintf(buffer, MAX_INTEGER_STR_LENGTH,
data/nvidia-settings-legacy-340xx-340.108/src/jansson/error.c:28: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(error->source, source);
data/nvidia-settings-legacy-340xx-340.108/src/jansson/error.c:32: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(error->source + 3, source + extra);
data/nvidia-settings-legacy-340xx-340.108/src/jansson/error.c:61:5:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
    vsnprintf(error->text, JSON_ERROR_TEXT_LENGTH, msg, ap);
data/nvidia-settings-legacy-340xx-340.108/src/jansson/hashtable.c:250: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(pair->key, key);
data/nvidia-settings-legacy-340xx-340.108/src/jansson/jansson_private.h:95:9:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
#define snprintf _snprintf
data/nvidia-settings-legacy-340xx-340.108/src/jansson/jansson_private.h:95:18:  [4] (format) _snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
#define snprintf _snprintf
data/nvidia-settings-legacy-340xx-340.108/src/jansson/jansson_private.h:96:9:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
#define vsnprintf _vsnprintf
data/nvidia-settings-legacy-340xx-340.108/src/jansson/jansson_private_config.h:51:11:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
#  define snprintf snprintf
data/nvidia-settings-legacy-340xx-340.108/src/jansson/jansson_private_config.h:51:20:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
#  define snprintf snprintf
data/nvidia-settings-legacy-340xx-340.108/src/jansson/load.c:95:5:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
    vsnprintf(msg_text, JSON_ERROR_TEXT_LENGTH, msg, ap);
data/nvidia-settings-legacy-340xx-340.108/src/query-assign.c:1911: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-340xx-340.108/src/query-assign.c:2133: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-340xx-340.108/src/query-assign.c:2947: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-340xx-340.108/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-340xx-340.108/samples/nv-control-warpblend.c:135:5:  [3] (random) srand:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
    srand(time(NULL));
data/nvidia-settings-legacy-340xx-340.108/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-340xx-340.108/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-340xx-340.108/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-340xx-340.108/src/common-utils/common-utils.c:304: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-340xx-340.108/src/gtk+-2.x/ctkapcprofilemodel.c:187:25:  [3] (random) g_random_int:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
    prof_model->stamp = g_random_int(); // random int to catch iterator type mismatches
data/nvidia-settings-legacy-340xx-340.108/src/gtk+-2.x/ctkapcrulemodel.c:147:25:  [3] (random) g_random_int:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
    rule_model->stamp = g_random_int(); // random int to catch iterator type mismatches
data/nvidia-settings-legacy-340xx-340.108/src/gtk+-2.x/ctkappprofile.c:3621: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.
    const char *homeStr = getenv("HOME");
data/nvidia-settings-legacy-340xx-340.108/src/gtk+-2.x/ctkappprofile.c:3678: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.
    const char *homeStr = getenv("HOME");
data/nvidia-settings-legacy-340xx-340.108/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-340xx-340.108/samples/nv-control-dpy.c:286: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-340xx-340.108/samples/nv-control-dpy.c:317: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-340xx-340.108/samples/nv-control-dpy.c:967: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-340xx-340.108/samples/nv-control-dvc.c:66: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-340xx-340.108/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-340xx-340.108/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-340xx-340.108/samples/nv-control-warpblend.c:87: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).
    nvDpyId = atoi(av[1]);
data/nvidia-settings-legacy-340xx-340.108/samples/nv-control-warpblend.h:147:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char displayName[512];
data/nvidia-settings-legacy-340xx-340.108/samples/nv-control-warpblend.h:179: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(displayName, "DPY-%i", nvDpyId);
data/nvidia-settings-legacy-340xx-340.108/samples/nv-control-warpblend.h:246:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char displayName[512];
data/nvidia-settings-legacy-340xx-340.108/samples/nv-control-warpblend.h:261: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(displayName, "DPY-%i", nvDpyId);
data/nvidia-settings-legacy-340xx-340.108/samples/nv-control-warpblend.h:267: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 newAttribute[256];
data/nvidia-settings-legacy-340xx-340.108/samples/nv-control-warpblend.h:390:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char tempName[256];
data/nvidia-settings-legacy-340xx-340.108/samples/nv-control-warpblend.h:391:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char newAttributes[256];
data/nvidia-settings-legacy-340xx-340.108/samples/nv-control-warpblend.h:409: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(tempName, "%d", rand());
data/nvidia-settings-legacy-340xx-340.108/samples/nv-control-warpblend.h:461:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char tempName[256];
data/nvidia-settings-legacy-340xx-340.108/samples/nv-control-warpblend.h:462:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char newAttributes[256];
data/nvidia-settings-legacy-340xx-340.108/samples/nv-control-warpblend.h:473: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(tempName, "%d", rand());
data/nvidia-settings-legacy-340xx-340.108/samples/nv-control-warpblend.h:501: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(paddedBuffer, warpData, neededSize);
data/nvidia-settings-legacy-340xx-340.108/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-340xx-340.108/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-340xx-340.108/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-340xx-340.108/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-340xx-340.108/src/XF86Config-parser/Flags.c:129: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-340xx-340.108/src/XF86Config-parser/Flags.c:431: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-340xx-340.108/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-340xx-340.108/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-340xx-340.108/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-340xx-340.108/src/XF86Config-parser/Generate.c:1480: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-340xx-340.108/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-340xx-340.108/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-340xx-340.108/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-340xx-340.108/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-340xx-340.108/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-340xx-340.108/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-340xx-340.108/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-340xx-340.108/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-340xx-340.108/src/app-profiles.c:194:11:  [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, perms);
data/nvidia-settings-legacy-340xx-340.108/src/common-utils/common-utils.c:386:17:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                memcpy(tmpbuf, buf, len);
data/nvidia-settings-legacy-340xx-340.108/src/common-utils/common-utils.c:435: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(pathname, flags, mode);
data/nvidia-settings-legacy-340xx-340.108/src/common-utils/gen-manpage-opts-helper.c:28:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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-340xx-340.108/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-340xx-340.108/src/config-file.c:138: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-340xx-340.108/src/config-file.c:239:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char *prefix, scratch[4];
data/nvidia-settings-legacy-340xx-340.108/src/config-file.c:247: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-340xx-340.108/src/config-file.c:500: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-340xx-340.108/src/gtk+-2.x/ctk3dvisionpro.c:353: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-340xx-340.108/src/gtk+-2.x/ctk3dvisionpro.c:526:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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-340xx-340.108/src/gtk+-2.x/ctk3dvisionpro.c:621:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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-340xx-340.108/src/gtk+-2.x/ctk3dvisionpro.c:704:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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-340xx-340.108/src/gtk+-2.x/ctk3dvisionpro.c:794:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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-340xx-340.108/src/gtk+-2.x/ctk3dvisionpro.c:1473:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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-340xx-340.108/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-340xx-340.108/src/gtk+-2.x/ctkappprofile.c:1929: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(items_copy, items, sizeof(items));
data/nvidia-settings-legacy-340xx-340.108/src/gtk+-2.x/ctkappprofile.c:2583: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(*settings_items_copy, settings_items, sizeof(settings_items));
data/nvidia-settings-legacy-340xx-340.108/src/gtk+-2.x/ctkappprofile.c:2587: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(*dialog_items_copy, dialog_items, sizeof(dialog_items));
data/nvidia-settings-legacy-340xx-340.108/src/gtk+-2.x/ctkappprofile.c:2868: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(settings_tree_view_columns_copy, settings_tree_view_columns, sizeof(settings_tree_view_columns));
data/nvidia-settings-legacy-340xx-340.108/src/gtk+-2.x/ctkappprofile.c:3816: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(save_reload_toolbar_items_copy, save_reload_toolbar_items, sizeof(save_reload_toolbar_items));
data/nvidia-settings-legacy-340xx-340.108/src/gtk+-2.x/ctkappprofile.c:3935: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(items_copy, items, sizeof(items));
data/nvidia-settings-legacy-340xx-340.108/src/gtk+-2.x/ctkcolorcorrection.c:714: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-340xx-340.108/src/gtk+-2.x/ctkdisplayconfig-utils.c:127: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-340xx-340.108/src/gtk+-2.x/ctkdisplayconfig-utils.c:198: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-340xx-340.108/src/gtk+-2.x/ctkdisplayconfig-utils.c:201: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-340xx-340.108/src/gtk+-2.x/ctkdisplayconfig-utils.c:204: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-340xx-340.108/src/gtk+-2.x/ctkdisplayconfig-utils.c:207: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-340xx-340.108/src/gtk+-2.x/ctkdisplayconfig-utils.c:4016: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-340xx-340.108/src/gtk+-2.x/ctkdisplayconfig-utils.c:4241: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-340xx-340.108/src/gtk+-2.x/ctkdisplayconfig.c:3207:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(&rotatedViewPortIn, &selected_mode->viewPortIn, sizeof(nvSize));
data/nvidia-settings-legacy-340xx-340.108/src/gtk+-2.x/ctkdisplayconfig.c:6868: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-340xx-340.108/src/gtk+-2.x/ctkdisplayconfig.c:7253: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).
            int id = atoi(str+3);
data/nvidia-settings-legacy-340xx-340.108/src/gtk+-2.x/ctkdisplayconfig.c:7364: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).
            int id = atoi(tmp+3);
data/nvidia-settings-legacy-340xx-340.108/src/gtk+-2.x/ctkdisplayconfig.c:8367: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-340xx-340.108/src/gtk+-2.x/ctkdisplaydevice.c:671:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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-340xx-340.108/src/gtk+-2.x/ctkdisplaylayout.c:2121: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-340xx-340.108/src/gtk+-2.x/ctkdisplaylayout.c:2172: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-340xx-340.108/src/gtk+-2.x/ctkdisplaylayout.c:3378:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(mode, display->cur_mode, sizeof(*mode));
data/nvidia-settings-legacy-340xx-340.108/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-340xx-340.108/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-340xx-340.108/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-340xx-340.108/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-340xx-340.108/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-340xx-340.108/src/gtk+-2.x/ctkframelock.c:885:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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-340xx-340.108/src/gtk+-2.x/ctkframelock.c:922:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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-340xx-340.108/src/gtk+-2.x/ctkframelock.c:4061:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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-340xx-340.108/src/gtk+-2.x/ctkframelock.c:5676: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-340xx-340.108/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-340xx-340.108/src/gtk+-2.x/ctkglx.c:451: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-340xx-340.108/src/gtk+-2.x/ctkgpu.c:194: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->graphics = atoi(value);
data/nvidia-settings-legacy-340xx-340.108/src/gtk+-2.x/ctkgpu.c:197:25:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
        pEntry->video = atoi(value);
data/nvidia-settings-legacy-340xx-340.108/src/gtk+-2.x/ctkgpu.c:200: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).
        pEntry->pcie = atoi(value);
data/nvidia-settings-legacy-340xx-340.108/src/gtk+-2.x/ctkpowermizer.c:202: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-340xx-340.108/src/gtk+-2.x/ctkpowermizer.c:205: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-340xx-340.108/src/gtk+-2.x/ctkpowermizer.c:208: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->nvclockmin = atoi(value);
data/nvidia-settings-legacy-340xx-340.108/src/gtk+-2.x/ctkpowermizer.c:211: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->nvclockmax = atoi(value);
data/nvidia-settings-legacy-340xx-340.108/src/gtk+-2.x/ctkpowermizer.c:214:35:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
        pEntry->nvclockeditable = atoi(value);
data/nvidia-settings-legacy-340xx-340.108/src/gtk+-2.x/ctkpowermizer.c:216:35:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
        pEntry->memtransferrate = atoi(value);
data/nvidia-settings-legacy-340xx-340.108/src/gtk+-2.x/ctkpowermizer.c:219: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).
        pEntry->memtransferratemin = atoi(value);
data/nvidia-settings-legacy-340xx-340.108/src/gtk+-2.x/ctkpowermizer.c:222: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).
        pEntry->memtransferratemax = atoi(value);
data/nvidia-settings-legacy-340xx-340.108/src/gtk+-2.x/ctkpowermizer.c:225:43:  [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->memtransferrateeditable = atoi(value);
data/nvidia-settings-legacy-340xx-340.108/src/gtk+-2.x/ctkpowermizer.c:227: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-340xx-340.108/src/gtk+-2.x/ctkpowermizer.c:230: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).
        pEntry->processorclockmin = atoi(value);
data/nvidia-settings-legacy-340xx-340.108/src/gtk+-2.x/ctkpowermizer.c:233: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).
        pEntry->processorclockmax = atoi(value);
data/nvidia-settings-legacy-340xx-340.108/src/gtk+-2.x/ctkpowermizer.c:236:35:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
        pEntry->nvclockeditable = atoi(value);
data/nvidia-settings-legacy-340xx-340.108/src/gtk+-2.x/ctkpowermizer.c:332:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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-340xx-340.108/src/gtk+-2.x/ctkpowermizer.c:593:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char tmp_str[24];
data/nvidia-settings-legacy-340xx-340.108/src/gtk+-2.x/ctkpowermizer.c:1838:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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-340xx-340.108/src/gtk+-2.x/ctkscreen.c:148:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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-340xx-340.108/src/gtk+-2.x/ctkscreen.c:442:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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-340xx-340.108/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-340xx-340.108/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-340xx-340.108/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-340xx-340.108/src/gtk+-2.x/ctkvcs.c:61: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-340xx-340.108/src/gtk+-2.x/ctkvcs.c:63: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-340xx-340.108/src/gtk+-2.x/ctkvcs.c:65: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-340xx-340.108/src/gtk+-2.x/ctkvcs.c:74: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-340xx-340.108/src/gtk+-2.x/ctkvcs.c:79: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-340xx-340.108/src/gtk+-2.x/ctkvcs.c:85: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-340xx-340.108/src/gtk+-2.x/ctkvcs.c:124:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char output_str[16];
data/nvidia-settings-legacy-340xx-340.108/src/jansson/dump.c:81:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char seq[13];
data/nvidia-settings-legacy-340xx-340.108/src/jansson/dump.c:130: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(seq, "\\u%04X", codepoint);
data/nvidia-settings-legacy-340xx-340.108/src/jansson/dump.c:143: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(seq, "\\u%04X\\u%04X", first, last);
data/nvidia-settings-legacy-340xx-340.108/src/jansson/dump.c:193: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 buffer[MAX_INTEGER_STR_LENGTH];
data/nvidia-settings-legacy-340xx-340.108/src/jansson/dump.c:207: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 buffer[MAX_REAL_STR_LENGTH];
data/nvidia-settings-legacy-340xx-340.108/src/jansson/dump.c:440:20:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    FILE *output = fopen(path, "w");
data/nvidia-settings-legacy-340xx-340.108/src/jansson/error.c:31:9:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
        strcpy(error->source, "...");
data/nvidia-settings-legacy-340xx-340.108/src/jansson/hashtable.h:24:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char key[1];
data/nvidia-settings-legacy-340xx-340.108/src/jansson/hashtable_seed.c:66:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char data[sizeof(uint32_t)];
data/nvidia-settings-legacy-340xx-340.108/src/jansson/hashtable_seed.c:71: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).
    urandom = open("/dev/urandom", O_RDONLY);
data/nvidia-settings-legacy-340xx-340.108/src/jansson/hashtable_seed.c:80: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).
    urandom = fopen("/dev/urandom", "rb");
data/nvidia-settings-legacy-340xx-340.108/src/jansson/jansson.h:125:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char source[JSON_ERROR_SOURCE_LENGTH];
data/nvidia-settings-legacy-340xx-340.108/src/jansson/jansson.h:126:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char text[JSON_ERROR_TEXT_LENGTH];
data/nvidia-settings-legacy-340xx-340.108/src/jansson/jansson_private.h:30:24:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
#define va_copy(a, b)  memcpy(&(a), &(b), sizeof(va_list))
data/nvidia-settings-legacy-340xx-340.108/src/jansson/load.c:53:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buffer[5];
data/nvidia-settings-legacy-340xx-340.108/src/jansson/load.c:84:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char msg_text[JSON_ERROR_TEXT_LENGTH];
data/nvidia-settings-legacy-340xx-340.108/src/jansson/load.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 msg_with_context[JSON_ERROR_TEXT_LENGTH];
data/nvidia-settings-legacy-340xx-340.108/src/jansson/load.c:1038: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(path, "rb");
data/nvidia-settings-legacy-340xx-340.108/src/jansson/load.c:1056:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char data[MAX_BUF_LEN];
data/nvidia-settings-legacy-340xx-340.108/src/jansson/memory.c:52: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(new_str, str, len);
data/nvidia-settings-legacy-340xx-340.108/src/jansson/strbuffer.c:93:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(new_value, strbuff->value, strbuff->length);
data/nvidia-settings-legacy-340xx-340.108/src/jansson/strbuffer.c:100: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(strbuff->value + strbuff->length, data, size);
data/nvidia-settings-legacy-340xx-340.108/src/jansson/value.c:428:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(&dest[dpos], &src[spos], count * sizeof(json_t *));
data/nvidia-settings-legacy-340xx-340.108/src/libXNVCtrlAttributes/NvCtrlAttributesNvControl.c:283: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-340xx-340.108/src/libXNVCtrlAttributes/NvCtrlAttributesNvControl.c:287: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-340xx-340.108/src/libXNVCtrlAttributes/NvCtrlAttributesVidMode.c:245: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-340xx-340.108/src/libXNVCtrlAttributes/NvCtrlAttributesVidMode.c:246: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-340xx-340.108/src/libXNVCtrlAttributes/NvCtrlAttributesXrandr.c:403: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-340xx-340.108/src/libXNVCtrlAttributes/NvCtrlAttributesXrandr.c:404: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-340xx-340.108/src/libXNVCtrlAttributes/NvCtrlAttributesXv.c:239: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-340xx-340.108/src/libXNVCtrlAttributes/NvCtrlAttributesXv.c:240: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-340xx-340.108/src/parse.c:772:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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-340xx-340.108/src/parse.c:1196: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-340xx-340.108/src/parse.c:1197: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-340xx-340.108/src/parse.c:1208: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-340xx-340.108/src/parse.c:1209: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-340xx-340.108/src/parse.c:1220: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-340xx-340.108/src/parse.c:1221: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-340xx-340.108/src/parse.c:1229: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-340xx-340.108/src/parse.c:1230: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-340xx-340.108/src/parse.c:1235: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-340xx-340.108/src/parse.c:1236: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-340xx-340.108/src/parse.c:1241: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-340xx-340.108/src/parse.c:1242: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-340xx-340.108/src/parse.c:1436: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-340xx-340.108/src/parse.c:1724: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-340xx-340.108/src/parse.c:1811: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-340xx-340.108/src/parse.c:1814: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-340xx-340.108/src/parse.c:1817: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-340xx-340.108/src/parse.c:1851: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-340xx-340.108/src/query-assign.c:1892:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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-340xx-340.108/src/query-assign.c:2004:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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-340xx-340.108/src/query-assign.c:2006:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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-340xx-340.108/src/query-assign.c:2098: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-340xx-340.108/src/query-assign.c:2100: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-340xx-340.108/src/query-assign.c:2102: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-340xx-340.108/src/query-assign.c:2132: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-340xx-340.108/src/query-assign.c:2138: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-340xx-340.108/src/query-assign.c:2176:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char d_str[64], val_str[64], *tmp_d_str;
data/nvidia-settings-legacy-340xx-340.108/src/query-assign.c:2736: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 buff[PRODUCT_NAME_LEN];
data/nvidia-settings-legacy-340xx-340.108/src/query-assign.c:2940:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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-340xx-340.108/src/query-assign.h:65:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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_PROTO_NAME_MAX];  /* List of valid names for this target */
data/nvidia-settings-legacy-340xx-340.108/samples/nv-control-dpy.c:1232: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-340xx-340.108/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-340xx-340.108/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-340xx-340.108/samples/nv-control-warpblend.h:160: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).
    attributeLen = strlen(attribute);
data/nvidia-settings-legacy-340xx-340.108/samples/nv-control-warpblend.h:303: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).
        neededLength = strlen(pCurrentMetaMode) +
data/nvidia-settings-legacy-340xx-340.108/samples/nv-control-warpblend.h:304:24:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                       strlen(newAttribute) +
data/nvidia-settings-legacy-340xx-340.108/samples/nv-control-warpblend.h:305:24:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                       strlen(pDisplay);
data/nvidia-settings-legacy-340xx-340.108/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-340xx-340.108/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-340xx-340.108/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-340xx-340.108/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-340xx-340.108/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-340xx-340.108/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-340xx-340.108/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-340xx-340.108/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-340xx-340.108/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-340xx-340.108/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-340xx-340.108/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-340xx-340.108/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-340xx-340.108/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-340xx-340.108/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-340xx-340.108/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-340xx-340.108/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-340xx-340.108/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-340xx-340.108/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-340xx-340.108/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-340xx-340.108/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-340xx-340.108/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-340xx-340.108/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-340xx-340.108/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-340xx-340.108/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-340xx-340.108/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-340xx-340.108/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-340xx-340.108/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-340xx-340.108/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-340xx-340.108/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-340xx-340.108/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-340xx-340.108/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-340xx-340.108/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-340xx-340.108/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-340xx-340.108/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-340xx-340.108/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-340xx-340.108/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-340xx-340.108/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-340xx-340.108/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-340xx-340.108/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-340xx-340.108/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-340xx-340.108/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-340xx-340.108/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-340xx-340.108/src/app-profiles.c:85: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).
    *s = realloc(*s, b + strlen(replace) + strlen(tail) + 1);
data/nvidia-settings-legacy-340xx-340.108/src/app-profiles.c:85:44:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    *s = realloc(*s, b + strlen(replace) + strlen(tail) + 1);
data/nvidia-settings-legacy-340xx-340.108/src/app-profiles.c:152:54:  [1] (buffer) strlen:
  Does not handle 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 (errno || (endptr - old_substr != strlen(old_substr))) {
data/nvidia-settings-legacy-340xx-340.108/src/app-profiles.c:2285: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).
    size_t len = strlen(filename);
data/nvidia-settings-legacy-340xx-340.108/src/common-utils/common-utils.c:73: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-340xx-340.108/src/common-utils/common-utils.c:78:14:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        l += strlen(s);
data/nvidia-settings-legacy-340xx-340.108/src/common-utils/common-utils.c:170: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-340xx-340.108/src/common-utils/common-utils.c:320: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-340xx-340.108/src/common-utils/common-utils.c:324: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-340xx-340.108/src/common-utils/common-utils.c:333: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-340xx-340.108/src/common-utils/common-utils.c:333: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-340xx-340.108/src/common-utils/common-utils.c:393: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-340xx-340.108/src/common-utils/common-utils.c:418: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).
        return (s + strlen(s));
data/nvidia-settings-legacy-340xx-340.108/src/common-utils/common-utils.c:542: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).
    for (end = ret + strlen(ret) - 1; end >= ret && isspace(*end); end--) {
data/nvidia-settings-legacy-340xx-340.108/src/common-utils/common-utils.c:571:11:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    len = strlen(string);
data/nvidia-settings-legacy-340xx-340.108/src/common-utils/gen-manpage-opts-helper.c:38: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-340xx-340.108/src/common-utils/msg.c:263: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-340xx-340.108/src/common-utils/msg.c:269: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-340xx-340.108/src/common-utils/msg.c:316: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-340xx-340.108/src/common-utils/msg.c:317: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-340xx-340.108/src/common-utils/msg.c:369: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-340xx-340.108/src/config-file.c:614: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-340xx-340.108/src/glxinfo.c:68: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).
   extTmp = nvalloc( (strlen(ext) +i +1) *sizeof(char) );
data/nvidia-settings-legacy-340xx-340.108/src/glxinfo.c:82: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-340xx-340.108/src/glxinfo.c:83: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-340xx-340.108/src/glxinfo.c:84: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-340xx-340.108/src/gtk+-2.x/ctk3dvisionpro.c:328: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-340xx-340.108/src/gtk+-2.x/ctk3dvisionpro.c:329: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-340xx-340.108/src/gtk+-2.x/ctk3dvisionpro.c:329: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-340xx-340.108/src/gtk+-2.x/ctk3dvisionpro.c:563: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-340xx-340.108/src/gtk+-2.x/ctk3dvisionpro.c:770: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-340xx-340.108/src/gtk+-2.x/ctk3dvisionpro.c:1287: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-340xx-340.108/src/gtk+-2.x/ctk3dvisionpro.c:1311: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-340xx-340.108/src/gtk+-2.x/ctk3dvisionpro.c:1555: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-340xx-340.108/src/gtk+-2.x/ctkdisplayconfig-utils.c:65: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-340xx-340.108/src/gtk+-2.x/ctkdisplayconfig-utils.c:71: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-340xx-340.108/src/gtk+-2.x/ctkdisplayconfig-utils.c:89: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-340xx-340.108/src/gtk+-2.x/ctkdisplayconfig-utils.c:118: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-340xx-340.108/src/gtk+-2.x/ctkdisplayconfig-utils.c:124: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-340xx-340.108/src/gtk+-2.x/ctkdisplayconfig-utils.c:132: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-340xx-340.108/src/gtk+-2.x/ctkdisplayconfig-utils.c:146: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-340xx-340.108/src/gtk+-2.x/ctkdisplayconfig-utils.c:169: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-340xx-340.108/src/gtk+-2.x/ctkdisplayconfig-utils.c:193: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-340xx-340.108/src/gtk+-2.x/ctkdisplayconfig-utils.c:280: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-340xx-340.108/src/gtk+-2.x/ctkdisplayconfig-utils.c:598: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-340xx-340.108/src/gtk+-2.x/ctkdisplayconfig-utils.c:1474: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-340xx-340.108/src/gtk+-2.x/ctkdisplayconfig-utils.c:1495: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-340xx-340.108/src/gtk+-2.x/ctkdisplayconfig-utils.c:2359: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-340xx-340.108/src/gtk+-2.x/ctkdisplayconfig-utils.c:2360: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-340xx-340.108/src/gtk+-2.x/ctkdisplayconfig.c:663: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-340xx-340.108/src/gtk+-2.x/ctkdisplayconfig.c:702: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-340xx-340.108/src/gtk+-2.x/ctkdisplayconfig.c:7250: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-340xx-340.108/src/gtk+-2.x/ctkdisplayconfig.c:7250: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-340xx-340.108/src/gtk+-2.x/ctkdisplayconfig.c:7573:16:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    len = 24 + strlen(metamode->cpl_str);
data/nvidia-settings-legacy-340xx-340.108/src/gtk+-2.x/ctkdisplayconfig.c:7672: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-340xx-340.108/src/gtk+-2.x/ctkdisplayconfig.c:7673: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, idx++) {
data/nvidia-settings-legacy-340xx-340.108/src/gtk+-2.x/ctkdisplayconfig.c:7795:17:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
         str && strlen(str);
data/nvidia-settings-legacy-340xx-340.108/src/gtk+-2.x/ctkdisplayconfig.c:7796:17:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
         str += strlen(str) +1) {
data/nvidia-settings-legacy-340xx-340.108/src/gtk+-2.x/ctkdisplayconfig.c:7804:17:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
         str && strlen(str);
data/nvidia-settings-legacy-340xx-340.108/src/gtk+-2.x/ctkdisplayconfig.c:7805:17:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
         str += strlen(str) +1) {
data/nvidia-settings-legacy-340xx-340.108/src/gtk+-2.x/ctkdisplayconfig.c:8080: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-340xx-340.108/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-340xx-340.108/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-340xx-340.108/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-340xx-340.108/src/gtk+-2.x/ctkframelock.c:5663: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-340xx-340.108/src/gtk+-2.x/ctkframelock.c:5676: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-340xx-340.108/src/gtk+-2.x/ctkglx.c:458: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-340xx-340.108/src/gtk+-2.x/ctkglx.c:465: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-340xx-340.108/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-340xx-340.108/src/jansson/dump.c:340: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).
                    dump_string(key, strlen(key), dump, data, flags);
data/nvidia-settings-legacy-340xx-340.108/src/jansson/dump.c:378: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).
                    dump_string(key, strlen(key), dump, data, flags);
data/nvidia-settings-legacy-340xx-340.108/src/jansson/error.c:26: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).
    length = strlen(source);
data/nvidia-settings-legacy-340xx-340.108/src/jansson/hashtable.c:33:57:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
#define hash_str(key)        ((size_t)hashlittle((key), strlen(key), hashtable_seed))
data/nvidia-settings-legacy-340xx-340.108/src/jansson/hashtable.c:238:22:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        size_t len = strlen(key);
data/nvidia-settings-legacy-340xx-340.108/src/jansson/hashtable_seed.c:75:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    ok = read(urandom, data, sizeof(uint32_t)) == sizeof(uint32_t);
data/nvidia-settings-legacy-340xx-340.108/src/jansson/load.c:1017:33:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    if(lex_init(&lex, (get_func)fgetc, input))
data/nvidia-settings-legacy-340xx-340.108/src/jansson/memory.c:41:31:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    return jsonp_strndup(str, strlen(str));
data/nvidia-settings-legacy-340xx-340.108/src/jansson/pack_unpack.c:148: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).
        length = strlen(str);
data/nvidia-settings-legacy-340xx-340.108/src/jansson/pack_unpack.c:180: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).
            length = strlen(str);
data/nvidia-settings-legacy-340xx-340.108/src/jansson/strbuffer.c:65:52:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    return strbuffer_append_bytes(strbuff, string, strlen(string));
data/nvidia-settings-legacy-340xx-340.108/src/jansson/value.c:127:40:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if(!key || !utf8_check_string(key, strlen(key)))
data/nvidia-settings-legacy-340xx-340.108/src/jansson/value.c:673: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).
    return string_create(value, strlen(value), 0);
data/nvidia-settings-legacy-340xx-340.108/src/jansson/value.c:692:32:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    return json_stringn(value, strlen(value));
data/nvidia-settings-legacy-340xx-340.108/src/jansson/value.c:724: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).
    return json_string_setn_nocheck(json, value, strlen(value));
data/nvidia-settings-legacy-340xx-340.108/src/jansson/value.c:752: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).
    return json_string_setn(json, value, strlen(value));
data/nvidia-settings-legacy-340xx-340.108/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-340xx-340.108/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-340xx-340.108/src/libXNVCtrl/NVCtrl.c:1150: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).
    nameLen = strlen(name) + 1;
data/nvidia-settings-legacy-340xx-340.108/src/parse.c:847: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-340xx-340.108/src/parse.c:921: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-340xx-340.108/src/parse.c:930: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).
                        tmp = s + strlen(s);
data/nvidia-settings-legacy-340xx-340.108/src/parse.c:938: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-340xx-340.108/src/parse.c:949: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-340xx-340.108/src/parse.c:960: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-340xx-340.108/src/parse.c:1418: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-340xx-340.108/src/parse.c:1418: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-340xx-340.108/src/parse.c:1459: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-340xx-340.108/src/parse.c:1483: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-340xx-340.108/src/parse.c:1517: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-340xx-340.108/src/parse.c:1684: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-340xx-340.108/src/parse.c:1786: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-340xx-340.108/src/query-assign.c:954: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(tmp) + strlen(targetTypeTable[target].parsed_name) + 16;
data/nvidia-settings-legacy-340xx-340.108/src/query-assign.c:954: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).
        len = strlen(tmp) + strlen(targetTypeTable[target].parsed_name) + 16;

ANALYSIS SUMMARY:

Hits = 406
Lines analyzed = 173903 in approximately 8.57 seconds (20296 lines/second)
Physical Source Lines of Code (SLOC) = 128912
Hits@level = [0] 825 [1] 152 [2] 181 [3]  10 [4]  63 [5]   0
Hits@level+ = [0+] 1231 [1+] 406 [2+] 254 [3+]  73 [4+]  63 [5+]   0
Hits/KSLOC@level+ = [0+] 9.54915 [1+] 3.14944 [2+] 1.97034 [3+] 0.566278 [4+] 0.488705 [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.