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/virglrenderer-0.8.2/src/gallium/auxiliary/cso_cache/cso_cache.c
Examining data/virglrenderer-0.8.2/src/gallium/auxiliary/cso_cache/cso_cache.h
Examining data/virglrenderer-0.8.2/src/gallium/auxiliary/cso_cache/cso_hash.c
Examining data/virglrenderer-0.8.2/src/gallium/auxiliary/cso_cache/cso_hash.h
Examining data/virglrenderer-0.8.2/src/gallium/auxiliary/os/os_memory.h
Examining data/virglrenderer-0.8.2/src/gallium/auxiliary/os/os_memory_aligned.h
Examining data/virglrenderer-0.8.2/src/gallium/auxiliary/os/os_memory_debug.h
Examining data/virglrenderer-0.8.2/src/gallium/auxiliary/os/os_memory_stdc.h
Examining data/virglrenderer-0.8.2/src/gallium/auxiliary/os/os_misc.c
Examining data/virglrenderer-0.8.2/src/gallium/auxiliary/os/os_misc.h
Examining data/virglrenderer-0.8.2/src/gallium/auxiliary/os/os_mman.h
Examining data/virglrenderer-0.8.2/src/gallium/auxiliary/os/os_thread.h
Examining data/virglrenderer-0.8.2/src/gallium/auxiliary/tgsi/tgsi_build.c
Examining data/virglrenderer-0.8.2/src/gallium/auxiliary/tgsi/tgsi_build.h
Examining data/virglrenderer-0.8.2/src/gallium/auxiliary/tgsi/tgsi_dump.c
Examining data/virglrenderer-0.8.2/src/gallium/auxiliary/tgsi/tgsi_dump.h
Examining data/virglrenderer-0.8.2/src/gallium/auxiliary/tgsi/tgsi_info.c
Examining data/virglrenderer-0.8.2/src/gallium/auxiliary/tgsi/tgsi_info.h
Examining data/virglrenderer-0.8.2/src/gallium/auxiliary/tgsi/tgsi_iterate.c
Examining data/virglrenderer-0.8.2/src/gallium/auxiliary/tgsi/tgsi_iterate.h
Examining data/virglrenderer-0.8.2/src/gallium/auxiliary/tgsi/tgsi_opcode_tmp.h
Examining data/virglrenderer-0.8.2/src/gallium/auxiliary/tgsi/tgsi_parse.c
Examining data/virglrenderer-0.8.2/src/gallium/auxiliary/tgsi/tgsi_parse.h
Examining data/virglrenderer-0.8.2/src/gallium/auxiliary/tgsi/tgsi_sanity.c
Examining data/virglrenderer-0.8.2/src/gallium/auxiliary/tgsi/tgsi_sanity.h
Examining data/virglrenderer-0.8.2/src/gallium/auxiliary/tgsi/tgsi_scan.c
Examining data/virglrenderer-0.8.2/src/gallium/auxiliary/tgsi/tgsi_scan.h
Examining data/virglrenderer-0.8.2/src/gallium/auxiliary/tgsi/tgsi_strings.c
Examining data/virglrenderer-0.8.2/src/gallium/auxiliary/tgsi/tgsi_strings.h
Examining data/virglrenderer-0.8.2/src/gallium/auxiliary/tgsi/tgsi_text.c
Examining data/virglrenderer-0.8.2/src/gallium/auxiliary/tgsi/tgsi_text.h
Examining data/virglrenderer-0.8.2/src/gallium/auxiliary/tgsi/tgsi_transform.c
Examining data/virglrenderer-0.8.2/src/gallium/auxiliary/tgsi/tgsi_transform.h
Examining data/virglrenderer-0.8.2/src/gallium/auxiliary/tgsi/tgsi_ureg.c
Examining data/virglrenderer-0.8.2/src/gallium/auxiliary/tgsi/tgsi_ureg.h
Examining data/virglrenderer-0.8.2/src/gallium/auxiliary/tgsi/tgsi_util.c
Examining data/virglrenderer-0.8.2/src/gallium/auxiliary/tgsi/tgsi_util.h
Examining data/virglrenderer-0.8.2/src/gallium/auxiliary/util/rgtc.c
Examining data/virglrenderer-0.8.2/src/gallium/auxiliary/util/rgtc.h
Examining data/virglrenderer-0.8.2/src/gallium/auxiliary/util/u_atomic.h
Examining data/virglrenderer-0.8.2/src/gallium/auxiliary/util/u_bitmask.c
Examining data/virglrenderer-0.8.2/src/gallium/auxiliary/util/u_bitmask.h
Examining data/virglrenderer-0.8.2/src/gallium/auxiliary/util/u_box.h
Examining data/virglrenderer-0.8.2/src/gallium/auxiliary/util/u_cpu_detect.c
Examining data/virglrenderer-0.8.2/src/gallium/auxiliary/util/u_cpu_detect.h
Examining data/virglrenderer-0.8.2/src/gallium/auxiliary/util/u_debug.c
Examining data/virglrenderer-0.8.2/src/gallium/auxiliary/util/u_debug.h
Examining data/virglrenderer-0.8.2/src/gallium/auxiliary/util/u_debug_describe.c
Examining data/virglrenderer-0.8.2/src/gallium/auxiliary/util/u_debug_describe.h
Examining data/virglrenderer-0.8.2/src/gallium/auxiliary/util/u_debug_refcnt.h
Examining data/virglrenderer-0.8.2/src/gallium/auxiliary/util/u_double_list.h
Examining data/virglrenderer-0.8.2/src/gallium/auxiliary/util/u_dual_blend.h
Examining data/virglrenderer-0.8.2/src/gallium/auxiliary/util/u_format.c
Examining data/virglrenderer-0.8.2/src/gallium/auxiliary/util/u_format.h
Examining data/virglrenderer-0.8.2/src/gallium/auxiliary/util/u_format_s3tc.h
Examining data/virglrenderer-0.8.2/src/gallium/auxiliary/util/u_half.h
Examining data/virglrenderer-0.8.2/src/gallium/auxiliary/util/u_hash_table.c
Examining data/virglrenderer-0.8.2/src/gallium/auxiliary/util/u_hash_table.h
Examining data/virglrenderer-0.8.2/src/gallium/auxiliary/util/u_inlines.h
Examining data/virglrenderer-0.8.2/src/gallium/auxiliary/util/u_math.c
Examining data/virglrenderer-0.8.2/src/gallium/auxiliary/util/u_math.h
Examining data/virglrenderer-0.8.2/src/gallium/auxiliary/util/u_memory.h
Examining data/virglrenderer-0.8.2/src/gallium/auxiliary/util/u_pack_color.h
Examining data/virglrenderer-0.8.2/src/gallium/auxiliary/util/u_pointer.h
Examining data/virglrenderer-0.8.2/src/gallium/auxiliary/util/u_prim.h
Examining data/virglrenderer-0.8.2/src/gallium/auxiliary/util/u_rect.h
Examining data/virglrenderer-0.8.2/src/gallium/auxiliary/util/u_string.h
Examining data/virglrenderer-0.8.2/src/gallium/auxiliary/util/u_surface.c
Examining data/virglrenderer-0.8.2/src/gallium/auxiliary/util/u_surface.h
Examining data/virglrenderer-0.8.2/src/gallium/auxiliary/util/u_texture.c
Examining data/virglrenderer-0.8.2/src/gallium/auxiliary/util/u_texture.h
Examining data/virglrenderer-0.8.2/src/gallium/include/c11/threads.h
Examining data/virglrenderer-0.8.2/src/gallium/include/c11/threads_posix.h
Examining data/virglrenderer-0.8.2/src/gallium/include/c11/threads_win32.h
Examining data/virglrenderer-0.8.2/src/gallium/include/c99_compat.h
Examining data/virglrenderer-0.8.2/src/gallium/include/no_extern_c.h
Examining data/virglrenderer-0.8.2/src/gallium/include/pipe/p_compiler.h
Examining data/virglrenderer-0.8.2/src/gallium/include/pipe/p_config.h
Examining data/virglrenderer-0.8.2/src/gallium/include/pipe/p_context.h
Examining data/virglrenderer-0.8.2/src/gallium/include/pipe/p_defines.h
Examining data/virglrenderer-0.8.2/src/gallium/include/pipe/p_format.h
Examining data/virglrenderer-0.8.2/src/gallium/include/pipe/p_screen.h
Examining data/virglrenderer-0.8.2/src/gallium/include/pipe/p_shader_tokens.h
Examining data/virglrenderer-0.8.2/src/gallium/include/pipe/p_state.h
Examining data/virglrenderer-0.8.2/src/gallium/include/pipe/p_video_enums.h
Examining data/virglrenderer-0.8.2/src/iov.c
Examining data/virglrenderer-0.8.2/src/virgl_egl.h
Examining data/virglrenderer-0.8.2/src/virgl_egl_context.c
Examining data/virglrenderer-0.8.2/src/virgl_gbm.c
Examining data/virglrenderer-0.8.2/src/virgl_gbm.h
Examining data/virglrenderer-0.8.2/src/virgl_glx.h
Examining data/virglrenderer-0.8.2/src/virgl_glx_context.c
Examining data/virglrenderer-0.8.2/src/virgl_hw.h
Examining data/virglrenderer-0.8.2/src/virgl_protocol.h
Examining data/virglrenderer-0.8.2/src/virglrenderer.c
Examining data/virglrenderer-0.8.2/src/virglrenderer.h
Examining data/virglrenderer-0.8.2/src/vrend_blitter.c
Examining data/virglrenderer-0.8.2/src/vrend_blitter.h
Examining data/virglrenderer-0.8.2/src/vrend_debug.c
Examining data/virglrenderer-0.8.2/src/vrend_debug.h
Examining data/virglrenderer-0.8.2/src/vrend_decode.c
Examining data/virglrenderer-0.8.2/src/vrend_formats.c
Examining data/virglrenderer-0.8.2/src/vrend_iov.h
Examining data/virglrenderer-0.8.2/src/vrend_object.c
Examining data/virglrenderer-0.8.2/src/vrend_object.h
Examining data/virglrenderer-0.8.2/src/vrend_renderer.c
Examining data/virglrenderer-0.8.2/src/vrend_renderer.h
Examining data/virglrenderer-0.8.2/src/vrend_shader.c
Examining data/virglrenderer-0.8.2/src/vrend_shader.h
Examining data/virglrenderer-0.8.2/src/vrend_strbuf.h
Examining data/virglrenderer-0.8.2/src/vrend_tweaks.c
Examining data/virglrenderer-0.8.2/src/vrend_tweaks.h
Examining data/virglrenderer-0.8.2/src/vrend_util.h
Examining data/virglrenderer-0.8.2/tests/fuzzer/virgl_fuzzer.c
Examining data/virglrenderer-0.8.2/tests/large_shader.h
Examining data/virglrenderer-0.8.2/tests/test_fuzzer_formats.c
Examining data/virglrenderer-0.8.2/tests/test_virgl_cmd.c
Examining data/virglrenderer-0.8.2/tests/test_virgl_init.c
Examining data/virglrenderer-0.8.2/tests/test_virgl_resource.c
Examining data/virglrenderer-0.8.2/tests/test_virgl_strbuf.c
Examining data/virglrenderer-0.8.2/tests/test_virgl_transfer.c
Examining data/virglrenderer-0.8.2/tests/testvirgl.c
Examining data/virglrenderer-0.8.2/tests/testvirgl.h
Examining data/virglrenderer-0.8.2/tests/testvirgl_encode.c
Examining data/virglrenderer-0.8.2/tests/testvirgl_encode.h
Examining data/virglrenderer-0.8.2/vtest/util.c
Examining data/virglrenderer-0.8.2/vtest/util.h
Examining data/virglrenderer-0.8.2/vtest/vtest.h
Examining data/virglrenderer-0.8.2/vtest/vtest_fuzzer.c
Examining data/virglrenderer-0.8.2/vtest/vtest_protocol.h
Examining data/virglrenderer-0.8.2/vtest/vtest_renderer.c
Examining data/virglrenderer-0.8.2/vtest/vtest_server.c
Examining data/virglrenderer-0.8.2/vtest/vtest_shm.c
Examining data/virglrenderer-0.8.2/vtest/vtest_shm.h

FINAL RESULTS:

data/virglrenderer-0.8.2/src/gallium/auxiliary/tgsi/tgsi_dump.c:66:7:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
      vfprintf(ctx->file, format, ap);
data/virglrenderer-0.8.2/src/gallium/auxiliary/util/u_debug.h:53:64:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
#define _util_printf_format(fmt, list) __attribute__ ((format (printf, fmt, list)))
data/virglrenderer-0.8.2/src/gallium/auxiliary/util/u_inlines.h:269:18:  [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.
		      unsigned access,
data/virglrenderer-0.8.2/src/gallium/auxiliary/util/u_inlines.h:281:46:  [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.
   map = pipe->transfer_map(pipe, buffer, 0, access, &box, transfer);
data/virglrenderer-0.8.2/src/gallium/auxiliary/util/u_inlines.h:298:26:  [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.
                unsigned access,
data/virglrenderer-0.8.2/src/gallium/auxiliary/util/u_inlines.h:301:66:  [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 pipe_buffer_map_range(pipe, buffer, 0, buffer->width0, access, transfer);
data/virglrenderer-0.8.2/src/gallium/auxiliary/util/u_inlines.h:347:7:  [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.
      access |= PIPE_TRANSFER_DISCARD_WHOLE_RESOURCE;
data/virglrenderer-0.8.2/src/gallium/auxiliary/util/u_inlines.h:349:7:  [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.
      access |= PIPE_TRANSFER_DISCARD_RANGE;
data/virglrenderer-0.8.2/src/gallium/auxiliary/util/u_inlines.h:357:33:  [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.
                                access,
data/virglrenderer-0.8.2/src/gallium/auxiliary/util/u_inlines.h:440:28:  [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.
                  unsigned access,
data/virglrenderer-0.8.2/src/gallium/auxiliary/util/u_inlines.h:450:33:  [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.
                                access,
data/virglrenderer-0.8.2/src/gallium/auxiliary/util/u_inlines.h:463:31:  [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.
                     unsigned access,
data/virglrenderer-0.8.2/src/gallium/auxiliary/util/u_inlines.h:473:33:  [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.
                                access,
data/virglrenderer-0.8.2/src/gallium/auxiliary/util/u_string.h:177:24:  [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 util_vsnprintf vsnprintf
data/virglrenderer-0.8.2/src/gallium/auxiliary/util/u_string.h:178:23:  [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 util_snprintf snprintf
data/virglrenderer-0.8.2/src/gallium/auxiliary/util/u_string.h:179:23:  [4] (buffer) vsprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
#define util_vsprintf vsprintf
data/virglrenderer-0.8.2/src/gallium/auxiliary/util/u_string.h:180:22:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
#define util_sprintf sprintf
data/virglrenderer-0.8.2/src/vrend_blitter.c:138:16:  [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.
         res = snprintf(&snippet[si], DEST_SWIZZLE_SNIPPET_SIZE - si,
data/virglrenderer-0.8.2/src/vrend_blitter.c:214:4:  [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(shader_buf, 4096,
data/virglrenderer-0.8.2/src/vrend_blitter.c:265:4:  [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(shader_buf, 4096,
data/virglrenderer-0.8.2/src/vrend_blitter.c:328:4:  [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(shader_buf, 4096, blit_ctx->use_gles ? FS_TEXFETCH_DS_GLES
data/virglrenderer-0.8.2/src/vrend_blitter.c:364:4:  [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(shader_buf, 4096, blit_ctx->use_gles ?
data/virglrenderer-0.8.2/src/vrend_debug.c:204:4:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
   vfprintf(fp, fmt, va);
data/virglrenderer-0.8.2/src/vrend_decode.c:1236:84:  [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.
      vrend_set_single_image_view(ctx->grctx, shader_type, start_slot + i, format, access,
data/virglrenderer-0.8.2/src/vrend_renderer.c:437:11:  [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.
   GLenum access;
data/virglrenderer-0.8.2/src/vrend_renderer.c:2944:60:  [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.
                                 uint32_t format, uint32_t access,
data/virglrenderer-0.8.2/src/vrend_renderer.c:2962:23:  [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.
      iview->access = access;
data/virglrenderer-0.8.2/src/vrend_renderer.c:4133:11:  [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.
   GLenum access;
data/virglrenderer-0.8.2/src/vrend_renderer.c:4182:22:  [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.
      switch (iview->access) {
data/virglrenderer-0.8.2/src/vrend_renderer.c:4197:66:  [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.
      glBindImageTexture(i, tex_id, level, layered, first_layer, access, iview->format);
data/virglrenderer-0.8.2/src/vrend_renderer.c:9298:11:  [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.
      c = sscanf((const char *)version_str, "%s %s %s %s %i.%i",
data/virglrenderer-0.8.2/src/vrend_renderer.h:268:60:  [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.
                                 uint32_t format, uint32_t access,
data/virglrenderer-0.8.2/src/vrend_shader.c:599:23:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
__attribute__((format(printf, 2, 3)))
data/virglrenderer-0.8.2/src/vrend_shader.c:619:23:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
__attribute__((format(printf, 2, 3)))
data/virglrenderer-0.8.2/src/vrend_shader.c:633:23:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
__attribute__((format(printf, 2, 3)))
data/virglrenderer-0.8.2/src/vrend_shader.c:2584:10:  [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(tmp, offbuf);
data/virglrenderer-0.8.2/src/vrend_shader.c:2585:10:  [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(offbuf, bias);
data/virglrenderer-0.8.2/src/vrend_shader.c:2586:10:  [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(bias, tmp);
data/virglrenderer-0.8.2/src/vrend_shader.c:3071:7:  [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(mydst, dst);
data/virglrenderer-0.8.2/src/vrend_shader.c:3571:10:  [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(fp64_dsts[i], dsts[i]);
data/virglrenderer-0.8.2/src/vrend_shader.c:4163:10:  [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(fp64_src, src_buf->buf);
data/virglrenderer-0.8.2/src/vrend_shader.c:5633: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.
               access, volatile_str, precision, ptc, stc, sname, i, range);
data/virglrenderer-0.8.2/src/vrend_shader.c:5636: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.
               access, volatile_str, precision, ptc, stc, sname, i);
data/virglrenderer-0.8.2/src/vrend_strbuf.h:121:14:  [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 len = vsnprintf(sb->buf + sb->size, sb->alloc_size - sb->size, fmt, ap);
data/virglrenderer-0.8.2/src/vrend_strbuf.h:125:7:  [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(sb->buf + sb->size, sb->alloc_size - sb->size, fmt, cp);
data/virglrenderer-0.8.2/src/vrend_strbuf.h:130:23:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
__attribute__((format(printf, 2, 3)))
data/virglrenderer-0.8.2/src/vrend_strbuf.h:144:14:  [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 len = vsnprintf(sb->buf, sb->alloc_size, fmt, ap);
data/virglrenderer-0.8.2/src/vrend_strbuf.h:148:7:  [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(sb->buf, sb->alloc_size, fmt, cp);
data/virglrenderer-0.8.2/src/vrend_strbuf.h:153:23:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
__attribute__((format(printf, 2, 3)))
data/virglrenderer-0.8.2/src/gallium/auxiliary/os/os_misc.c:89:11:  [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.
   return getenv(name);
data/virglrenderer-0.8.2/src/gallium/include/c11/threads_win32.h:175:5:  [3] (misc) EnterCriticalSection:
  On some versions of Windows, exceptions can be thrown in low-memory
  situations. Use InitializeCriticalSectionAndSpinCount instead.
    EnterCriticalSection(&cond->monitor);
data/virglrenderer-0.8.2/src/gallium/include/c11/threads_win32.h:225:5:  [3] (misc) EnterCriticalSection:
  On some versions of Windows, exceptions can be thrown in low-memory
  situations. Use InitializeCriticalSectionAndSpinCount instead.
    EnterCriticalSection(&cond->monitor);
data/virglrenderer-0.8.2/src/gallium/include/c11/threads_win32.h:361:5:  [3] (misc) InitializeCriticalSection:
  Exceptions can be thrown in low-memory situations. Use
  InitializeCriticalSectionAndSpinCount instead.
    InitializeCriticalSection(&cond->monitor);
data/virglrenderer-0.8.2/src/gallium/include/c11/threads_win32.h:426:5:  [3] (misc) InitializeCriticalSection:
  Exceptions can be thrown in low-memory situations. Use
  InitializeCriticalSectionAndSpinCount instead.
    InitializeCriticalSection(mtx);
data/virglrenderer-0.8.2/src/gallium/include/c11/threads_win32.h:435:5:  [3] (misc) EnterCriticalSection:
  On some versions of Windows, exceptions can be thrown in low-memory
  situations. Use InitializeCriticalSectionAndSpinCount instead.
    EnterCriticalSection(mtx);
data/virglrenderer-0.8.2/src/vrend_debug.c:180:25:  [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* log = getenv("VIRGL_LOG_FILE");
data/virglrenderer-0.8.2/src/vrend_renderer.c:5702:8:  [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.
   if (getenv("VIRGL_DISABLE_MT"))
data/virglrenderer-0.8.2/src/vrend_tweaks.c:128:19:  [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.
   char *tweaks = getenv("VREND_TWEAK");
data/virglrenderer-0.8.2/tests/test_virgl_cmd.c:1049:7:  [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.
  if (getenv("VRENDTEST_USE_EGL_SURFACELESS"))
data/virglrenderer-0.8.2/tests/test_virgl_init.c:499:7:  [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.
  if (getenv("VRENDTEST_USE_EGL_SURFACELESS"))
data/virglrenderer-0.8.2/tests/test_virgl_resource.c:330:7:  [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.
  if (getenv("VRENDTEST_USE_EGL_SURFACELESS"))
data/virglrenderer-0.8.2/tests/test_virgl_transfer.c:1024:7:  [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.
  if (getenv("VRENDTEST_USE_EGL_SURFACELESS"))
data/virglrenderer-0.8.2/vtest/vtest_fuzzer.c:158:31:  [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.
                             (getenv("VTEST_FUZZER_USE_GL") != NULL ?
data/virglrenderer-0.8.2/vtest/vtest_fuzzer.c:160:30:  [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.
                             getenv("VTEST_FUZZER_FENCES") != NULL);
data/virglrenderer-0.8.2/vtest/vtest_renderer.c:158:8:  [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.
   if (getenv("VTEST_SAVE")) {
data/virglrenderer-0.8.2/vtest/vtest_renderer.c:160:24:  [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.
         savefd = open(getenv("VTEST_SAVE"),
data/virglrenderer-0.8.2/vtest/vtest_server.c:182:13:  [3] (buffer) getopt_long:
  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.
      ret = getopt_long(argc, argv, "", long_options, &option_index);
data/virglrenderer-0.8.2/vtest/vtest_server.c:225:19:  [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.
   prog.use_glx = getenv("VTEST_USE_GLX") != NULL;
data/virglrenderer-0.8.2/vtest/vtest_server.c:226:31:  [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.
   prog.use_egl_surfaceless = getenv("VTEST_USE_EGL_SURFACELESS") != NULL;
data/virglrenderer-0.8.2/vtest/vtest_server.c:227:20:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
   prog.use_gles = getenv("VTEST_USE_GLES") != NULL;
data/virglrenderer-0.8.2/vtest/vtest_server.c:228:25:  [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.
   prog.render_device = getenv("VTEST_RENDERNODE");
data/virglrenderer-0.8.2/src/gallium/auxiliary/os/os_misc.c:62:17:  [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).
         fout = fopen(filename, "w");
data/virglrenderer-0.8.2/src/gallium/auxiliary/tgsi/tgsi_dump.c:97:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
const char *
data/virglrenderer-0.8.2/src/gallium/auxiliary/tgsi/tgsi_parse.c:79:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
   memcpy(dst, src, 4);
data/virglrenderer-0.8.2/src/gallium/auxiliary/tgsi/tgsi_parse.c:283:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(new_tokens, tokens, bytes);
data/virglrenderer-0.8.2/src/gallium/auxiliary/tgsi/tgsi_sanity.c:248:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static const char *file_names[TGSI_FILE_COUNT] =
data/virglrenderer-0.8.2/src/gallium/auxiliary/tgsi/tgsi_strings.c:35:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
const char *tgsi_processor_type_names[6] =
data/virglrenderer-0.8.2/src/gallium/auxiliary/tgsi/tgsi_strings.c:64:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
const char *tgsi_semantic_names[TGSI_SEMANTIC_COUNT] =
data/virglrenderer-0.8.2/src/gallium/auxiliary/tgsi/tgsi_strings.c:104:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
const char *tgsi_texture_names[TGSI_TEXTURE_COUNT] =
data/virglrenderer-0.8.2/src/gallium/auxiliary/tgsi/tgsi_strings.c:127:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
const char *tgsi_property_names[TGSI_PROPERTY_COUNT] =
data/virglrenderer-0.8.2/src/gallium/auxiliary/tgsi/tgsi_strings.c:155:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
const char *tgsi_return_type_names[TGSI_RETURN_TYPE_COUNT] =
data/virglrenderer-0.8.2/src/gallium/auxiliary/tgsi/tgsi_strings.c:164:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
const char *tgsi_interpolate_names[TGSI_INTERPOLATE_COUNT] =
data/virglrenderer-0.8.2/src/gallium/auxiliary/tgsi/tgsi_strings.c:172:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
const char *tgsi_interpolate_locations[TGSI_INTERPOLATE_LOC_COUNT] =
data/virglrenderer-0.8.2/src/gallium/auxiliary/tgsi/tgsi_strings.c:181:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
const char *tgsi_primitive_names[PIPE_PRIM_MAX] =
data/virglrenderer-0.8.2/src/gallium/auxiliary/tgsi/tgsi_strings.c:200:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
const char *tgsi_fs_coord_origin_names[2] =
data/virglrenderer-0.8.2/src/gallium/auxiliary/tgsi/tgsi_strings.c:206:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
const char *tgsi_fs_coord_pixel_center_names[2] =
data/virglrenderer-0.8.2/src/gallium/auxiliary/tgsi/tgsi_strings.c:212:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
const char *tgsi_immediate_type_names[4] =
data/virglrenderer-0.8.2/src/gallium/auxiliary/tgsi/tgsi_strings.c:220:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
const char *tgsi_memory_names[3] =
data/virglrenderer-0.8.2/src/gallium/auxiliary/tgsi/tgsi_strings.h:41:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
extern const char *tgsi_processor_type_names[6];
data/virglrenderer-0.8.2/src/gallium/auxiliary/tgsi/tgsi_strings.h:43:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
extern const char *tgsi_semantic_names[TGSI_SEMANTIC_COUNT];
data/virglrenderer-0.8.2/src/gallium/auxiliary/tgsi/tgsi_strings.h:45:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
extern const char *tgsi_texture_names[TGSI_TEXTURE_COUNT];
data/virglrenderer-0.8.2/src/gallium/auxiliary/tgsi/tgsi_strings.h:47:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
extern const char *tgsi_property_names[TGSI_PROPERTY_COUNT];
data/virglrenderer-0.8.2/src/gallium/auxiliary/tgsi/tgsi_strings.h:49:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
extern const char *tgsi_return_type_names[TGSI_RETURN_TYPE_COUNT];
data/virglrenderer-0.8.2/src/gallium/auxiliary/tgsi/tgsi_strings.h:51:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
extern const char *tgsi_interpolate_names[TGSI_INTERPOLATE_COUNT];
data/virglrenderer-0.8.2/src/gallium/auxiliary/tgsi/tgsi_strings.h:53:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
extern const char *tgsi_interpolate_locations[TGSI_INTERPOLATE_LOC_COUNT];
data/virglrenderer-0.8.2/src/gallium/auxiliary/tgsi/tgsi_strings.h:57:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
extern const char *tgsi_primitive_names[PIPE_PRIM_MAX];
data/virglrenderer-0.8.2/src/gallium/auxiliary/tgsi/tgsi_strings.h:59:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
extern const char *tgsi_fs_coord_origin_names[2];
data/virglrenderer-0.8.2/src/gallium/auxiliary/tgsi/tgsi_strings.h:61:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
extern const char *tgsi_fs_coord_pixel_center_names[2];
data/virglrenderer-0.8.2/src/gallium/auxiliary/tgsi/tgsi_strings.h:63:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
extern const char *tgsi_immediate_type_names[4];
data/virglrenderer-0.8.2/src/gallium/auxiliary/tgsi/tgsi_strings.h:65:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
extern const char *tgsi_memory_names[3];
data/virglrenderer-0.8.2/src/gallium/auxiliary/tgsi/tgsi_text.c:1747:4:  [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 id[64];
data/virglrenderer-0.8.2/src/gallium/auxiliary/tgsi/tgsi_ureg.c:829:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(ureg->immediate[i].value.u,
data/virglrenderer-0.8.2/src/gallium/auxiliary/tgsi/tgsi_ureg.c:1562:4:  [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(out, 
data/virglrenderer-0.8.2/src/gallium/auxiliary/util/rgtc.h:34:54:  [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.
void util_format_unsigned_encode_rgtc_ubyte(unsigned char *blkaddr, unsigned char srccolors[4][4],
data/virglrenderer-0.8.2/src/gallium/auxiliary/util/rgtc.h:34:78:  [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.
void util_format_unsigned_encode_rgtc_ubyte(unsigned char *blkaddr, unsigned char srccolors[4][4],
data/virglrenderer-0.8.2/src/gallium/auxiliary/util/rgtc.h:37:50:  [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.
void util_format_signed_encode_rgtc_ubyte(signed char *blkaddr, signed char srccolors[4][4],
data/virglrenderer-0.8.2/src/gallium/auxiliary/util/rgtc.h:37:72:  [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.
void util_format_signed_encode_rgtc_ubyte(signed char *blkaddr, signed char srccolors[4][4],
data/virglrenderer-0.8.2/src/gallium/auxiliary/util/u_debug.c:56: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.
   static char buf[4096] = {'\0'};
data/virglrenderer-0.8.2/src/gallium/auxiliary/util/u_debug.c:316: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.
   static char rest[64];
data/virglrenderer-0.8.2/src/gallium/auxiliary/util/u_debug.c:334: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.
   static char rest[64];
data/virglrenderer-0.8.2/src/gallium/auxiliary/util/u_debug.c:359: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.
   static char output[4096];
data/virglrenderer-0.8.2/src/gallium/auxiliary/util/u_debug.c:360: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.
   static char rest[256];
data/virglrenderer-0.8.2/src/gallium/auxiliary/util/u_debug_describe.c:35:4:  [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(buf, "pipe_object");
data/virglrenderer-0.8.2/src/gallium/auxiliary/util/u_debug_describe.c:70:4:  [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 res[128];
data/virglrenderer-0.8.2/src/gallium/auxiliary/util/u_debug_describe.c:78:4:  [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 res[128];
data/virglrenderer-0.8.2/src/gallium/auxiliary/util/u_debug_describe.c:87:4:  [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 res[128];
data/virglrenderer-0.8.2/src/gallium/auxiliary/util/u_format.c:397:50:  [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.
void util_format_compose_swizzles(const unsigned char swz1[4],
data/virglrenderer-0.8.2/src/gallium/auxiliary/util/u_format.c:398:50:  [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 unsigned char swz2[4],
data/virglrenderer-0.8.2/src/gallium/auxiliary/util/u_format.c:399:44:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
                                  unsigned char dst[4])
data/virglrenderer-0.8.2/src/gallium/auxiliary/util/u_format.c:411:53:  [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 unsigned char swz[4],
data/virglrenderer-0.8.2/src/gallium/auxiliary/util/u_format.c:444:44:  [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 unsigned char swz[4])
data/virglrenderer-0.8.2/src/gallium/auxiliary/util/u_format.c:459:46:  [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 unsigned char swz[4])
data/virglrenderer-0.8.2/src/gallium/auxiliary/util/u_format.h:225: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.
   unsigned char swizzle[4];
data/virglrenderer-0.8.2/src/gallium/auxiliary/util/u_format.h:986:50:  [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.
void util_format_compose_swizzles(const unsigned char swz1[4],
data/virglrenderer-0.8.2/src/gallium/auxiliary/util/u_format.h:987:50:  [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 unsigned char swz2[4],
data/virglrenderer-0.8.2/src/gallium/auxiliary/util/u_format.h:988:44:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
                                  unsigned char dst[4]);
data/virglrenderer-0.8.2/src/gallium/auxiliary/util/u_format.h:996:53:  [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 unsigned char swz[4],
data/virglrenderer-0.8.2/src/gallium/auxiliary/util/u_format.h:1000:44:  [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 unsigned char swz[4]);
data/virglrenderer-0.8.2/src/gallium/auxiliary/util/u_format.h:1003:46:  [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 unsigned char swz[4]);
data/virglrenderer-0.8.2/src/gallium/auxiliary/util/u_inlines.h:427:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
   memcpy(data, map, size);
data/virglrenderer-0.8.2/src/gallium/auxiliary/util/u_memory.h:75:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(dup, src, size);
data/virglrenderer-0.8.2/src/gallium/auxiliary/util/u_surface.c:102:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(dst, src, height * width);
data/virglrenderer-0.8.2/src/gallium/auxiliary/util/u_surface.c:105:10:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
         memcpy(dst, src, width);
data/virglrenderer-0.8.2/src/gallium/auxiliary/util/u_surface.c:207: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(row, uc, blocksize);
data/virglrenderer-0.8.2/src/gallium/auxiliary/util/u_surface.c:305:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(dst_map, src_map, src_box->width);
data/virglrenderer-0.8.2/src/gallium/include/c11/threads_win32.h:142: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(&pack, p, sizeof(struct impl_thrd_param));
data/virglrenderer-0.8.2/src/iov.c:71:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(buf, (char*)iov->iov_base + offset, len);
data/virglrenderer-0.8.2/src/iov.c:100:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy((char*)iov->iov_base + offset, buf, len);
data/virglrenderer-0.8.2/src/virgl_gbm.c:113:10:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
   const char *undesired[3] = { "vgem", "pvr", NULL };
data/virglrenderer-0.8.2/src/virgl_gbm.c:131:12:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
      fd = open(rendernode_name, O_RDWR | O_CLOEXEC | O_NOCTTY | O_NONBLOCK);
data/virglrenderer-0.8.2/src/virgl_gbm.c:227: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(host_start, guest_start, copy_iovec_size);
data/virglrenderer-0.8.2/src/virgl_gbm.c:229: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(guest_start, host_start, copy_iovec_size);
data/virglrenderer-0.8.2/src/vrend_blitter.c:97:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      char infolog[65536];
data/virglrenderer-0.8.2/src/vrend_blitter.c:121:41:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
                                        char snippet[DEST_SWIZZLE_SNIPPET_SIZE])
data/virglrenderer-0.8.2/src/vrend_blitter.c:173:4:  [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 shader_buf[4096];
data/virglrenderer-0.8.2/src/vrend_blitter.c:176:4:  [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 dest_swizzle_snippet[DEST_SWIZZLE_SNIPPET_SIZE] = "texel";
data/virglrenderer-0.8.2/src/vrend_blitter.c:240:4:  [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 shader_buf[4096];
data/virglrenderer-0.8.2/src/vrend_blitter.c:243:4:  [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 dest_swizzle_snippet[DEST_SWIZZLE_SNIPPET_SIZE] = "texel";
data/virglrenderer-0.8.2/src/vrend_blitter.c:290:4:  [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 shader_buf[4096];
data/virglrenderer-0.8.2/src/vrend_blitter.c:345:4:  [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 shader_buf[4096];
data/virglrenderer-0.8.2/src/vrend_blitter.c:793:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      char infolog[65536];
data/virglrenderer-0.8.2/src/vrend_debug.c:31:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static const char *command_names[VIRGL_MAX_COMMANDS] = {
data/virglrenderer-0.8.2/src/vrend_debug.c:81:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static const char *object_type_names[VIRGL_MAX_OBJECTS] = {
data/virglrenderer-0.8.2/src/vrend_debug.c:136:4:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
   char buf[1024] = "";
data/virglrenderer-0.8.2/src/vrend_debug.c:190:18:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
            fp = fopen(name, "a");
data/virglrenderer-0.8.2/src/vrend_debug.c:193:18:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
            fp = fopen(log, "a");
data/virglrenderer-0.8.2/src/vrend_decode.c:205:4:  [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(&depth, depth_ptr, sizeof(double));
data/virglrenderer-0.8.2/src/vrend_decode.c:1317:4:  [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(flagstring, buf, slen);
data/virglrenderer-0.8.2/src/vrend_renderer.c:189:10:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
   const char *gl_ext[FEAT_MAX_EXTS];
data/virglrenderer-0.8.2/src/vrend_renderer.c:628:4:  [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 debug_name[64];
data/virglrenderer-0.8.2/src/vrend_renderer.c:1003:10:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
   const char *shader_parts[SHADER_MAX_STRINGS];
data/virglrenderer-0.8.2/src/vrend_renderer.c:1011:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      char infolog[65536];
data/virglrenderer-0.8.2/src/vrend_renderer.c:1208:4:  [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 *varyings[PIPE_MAX_SHADER_OUTPUTS*2];
data/virglrenderer-0.8.2/src/vrend_renderer.c:1281:10:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
         char name[64];
data/virglrenderer-0.8.2/src/vrend_renderer.c:1312:6:  [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[32];
data/virglrenderer-0.8.2/src/vrend_renderer.c:1330:10:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
         char name[32];
data/virglrenderer-0.8.2/src/vrend_renderer.c:1350:4:  [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[32];
data/virglrenderer-0.8.2/src/vrend_renderer.c:1372:4:  [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[32];
data/virglrenderer-0.8.2/src/vrend_renderer.c:1427:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      char infolog[65536];
data/virglrenderer-0.8.2/src/vrend_renderer.c:1462:4:  [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[64];
data/virglrenderer-0.8.2/src/vrend_renderer.c:1558:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      char infolog[65536];
data/virglrenderer-0.8.2/src/vrend_renderer.c:2578:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(&v->elements[i].base, &elements[i], sizeof(struct pipe_vertex_element));
data/virglrenderer-0.8.2/src/vrend_renderer.c:2704:4:  [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(consts->consts, data, num_constant * sizeof(unsigned int));
data/virglrenderer-0.8.2/src/vrend_renderer.c:3207:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(key->prev_stage_generic_and_patch_outputs_layout,
data/virglrenderer-0.8.2/src/vrend_renderer.c:3437: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(sel->tmp_buf, shd_text, pkt_length * 4);
data/virglrenderer-0.8.2/src/vrend_renderer.c:3473:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(sel->tmp_buf + sel->buf_offset, shd_text, pkt_length * 4);
data/virglrenderer-0.8.2/src/vrend_renderer.c:6105:33:  [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 errmsg[256])
data/virglrenderer-0.8.2/src/vrend_renderer.c:6623:4:  [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 error_string[256];
data/virglrenderer-0.8.2/src/vrend_renderer.c:7895:10:  [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(vrend_state.tess_factors, tess_factors, 6 * sizeof (float));
data/virglrenderer-0.8.2/src/vrend_renderer.c:9094:14:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    if (buf) memcpy(buf, &value, size); \
data/virglrenderer-0.8.2/src/vrend_renderer.c:9297:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      char tmp[20];
data/virglrenderer-0.8.2/src/vrend_renderer.c:9981:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(data2 + doff, data + soff, res->base.width0 * blsize);
data/virglrenderer-0.8.2/src/vrend_shader.c:103:4:  [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 glsl_name[128];
data/virglrenderer-0.8.2/src/vrend_shader.c:567:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      char buf[16];
data/virglrenderer-0.8.2/src/vrend_shader.c:1693:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static const char *atests[PIPE_FUNC_ALWAYS + 1] = {
data/virglrenderer-0.8.2/src/vrend_shader.c:1706:4:  [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 comp_buf[128];
data/virglrenderer-0.8.2/src/vrend_shader.c:1795:15:  [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.
get_blockname(char outvar[64], const char *stage_prefix, const struct vrend_shader_io *io)
data/virglrenderer-0.8.2/src/vrend_shader.c:1801:18:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
get_blockvarname(char outvar[64], const char *stage_prefix, const struct vrend_shader_io *io, const char *postfix)
data/virglrenderer-0.8.2/src/vrend_shader.c:1806:113:  [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 void get_so_name(struct dump_ctx *ctx, bool from_block, const struct vrend_shader_io *output, int index, char out_var[255], char *wm)
data/virglrenderer-0.8.2/src/vrend_shader.c:1812:10:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
         char blockname[64];
data/virglrenderer-0.8.2/src/vrend_shader.c:1828:4:  [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 outtype[15] = "";
data/virglrenderer-0.8.2/src/vrend_shader.c:1829:4:  [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 writemask[6];
data/virglrenderer-0.8.2/src/vrend_shader.c:1864: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 out_var[255];
data/virglrenderer-0.8.2/src/vrend_shader.c:1869:10:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
         char ntemp[8];
data/virglrenderer-0.8.2/src/vrend_shader.c:1894: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 out_var[255];
data/virglrenderer-0.8.2/src/vrend_shader.c:1967:4:  [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 src[PIPE_MAX_COLOR_BUFS][64];
data/virglrenderer-0.8.2/src/vrend_shader.c:1968:4:  [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 src_fb[PIPE_MAX_COLOR_BUFS][64];
data/virglrenderer-0.8.2/src/vrend_shader.c:1971:4:  [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 full_op[PIPE_MAX_COLOR_BUFS][128];
data/virglrenderer-0.8.2/src/vrend_shader.c:2095:28:  [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 *srcs[4],
data/virglrenderer-0.8.2/src/vrend_shader.c:2100:4:  [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 bias[128] = "";
data/virglrenderer-0.8.2/src/vrend_shader.c:2191:29:  [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 *srcs[4],
data/virglrenderer-0.8.2/src/vrend_shader.c:2368:33:  [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 *srcs[4],
data/virglrenderer-0.8.2/src/vrend_shader.c:2376:4:  [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 offbuf[256] = "";
data/virglrenderer-0.8.2/src/vrend_shader.c:2377:4:  [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 bias[256] = "";
data/virglrenderer-0.8.2/src/vrend_shader.c:2583:10:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
         char tmp[256];
data/virglrenderer-0.8.2/src/vrend_shader.c:2596:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      char buf[255];
data/virglrenderer-0.8.2/src/vrend_shader.c:2597: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.
      const char *new_srcs[4] = { buf, srcs[1], srcs[2], srcs[3] };
data/virglrenderer-0.8.2/src/vrend_shader.c:2748:4:  [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 clipdistvec[4][64] = { 0, };
data/virglrenderer-0.8.2/src/vrend_shader.c:2750:4:  [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 clip_indirect[32] = "";
data/virglrenderer-0.8.2/src/vrend_shader.c:2806:4:  [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 clip_indirect[32] = "";
data/virglrenderer-0.8.2/src/vrend_shader.c:2881:56:  [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 void emit_store_mem(struct dump_ctx *ctx, const char *dst, int writemask,
data/virglrenderer-0.8.2/src/vrend_shader.c:2882:34:  [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 *srcs[4], const char *conversion)
data/virglrenderer-0.8.2/src/vrend_shader.c:2897:23:  [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 *srcs[4],
data/virglrenderer-0.8.2/src/vrend_shader.c:2906:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      char ms_str[32] = "";
data/virglrenderer-0.8.2/src/vrend_shader.c:2969: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 dst_tmp[128];
data/virglrenderer-0.8.2/src/vrend_shader.c:3000:22:  [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 *srcs[4],
data/virglrenderer-0.8.2/src/vrend_shader.c:3012:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      char ms_str[32] = "";
data/virglrenderer-0.8.2/src/vrend_shader.c:3046:10:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
         char src[32] = "";
data/virglrenderer-0.8.2/src/vrend_shader.c:3066:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      char mydst[255], atomic_op[9], atomic_src[10];
data/virglrenderer-0.8.2/src/vrend_shader.c:3081:10:  [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(atomic_op, "atomicOr");
data/virglrenderer-0.8.2/src/vrend_shader.c:3082:10:  [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(atomic_src, ", uint(0)");
data/virglrenderer-0.8.2/src/vrend_shader.c:3090:10:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
         char src[128] = "";
data/virglrenderer-0.8.2/src/vrend_shader.c:3158:22:  [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 *srcs[4], const char *dst, const char *writemask)
data/virglrenderer-0.8.2/src/vrend_shader.c:3189:24:  [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 *srcs[4],
data/virglrenderer-0.8.2/src/vrend_shader.c:3198:4:  [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 cas_str[128] = "";
data/virglrenderer-0.8.2/src/vrend_shader.c:3242:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      char ms_str[32] = "";
data/virglrenderer-0.8.2/src/vrend_shader.c:3254:10:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
         char src[32] = "";
data/virglrenderer-0.8.2/src/vrend_shader.c:3328:48:  [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 *writemask, char dsts[255])
data/virglrenderer-0.8.2/src/vrend_shader.c:3328:65:  [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 *writemask, char dsts[255])
data/virglrenderer-0.8.2/src/vrend_shader.c:3333:4:  [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 reswizzled[6] = "";
data/virglrenderer-0.8.2/src/vrend_shader.c:3341:10:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
         char outvarname[64];
data/virglrenderer-0.8.2/src/vrend_shader.c:3365:22:  [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 dsts[3][255],
data/virglrenderer-0.8.2/src/vrend_shader.c:3366:22:  [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 fp64_dsts[3][255],
data/virglrenderer-0.8.2/src/vrend_shader.c:3396:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      char fp64_writemask[6] = "";
data/virglrenderer-0.8.2/src/vrend_shader.c:3455:19:  [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 clip_indirect[32] = "";
data/virglrenderer-0.8.2/src/vrend_shader.c:3493:22:  [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 reswizzled[6] = "";
data/virglrenderer-0.8.2/src/vrend_shader.c:3618:4:  [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 swizzle_shifted[6] = "";
data/virglrenderer-0.8.2/src/vrend_shader.c:3633:10:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
         char outvarname[64];
data/virglrenderer-0.8.2/src/vrend_shader.c:3674:4:  [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 swizzle_shifted[7] = "";
data/virglrenderer-0.8.2/src/vrend_shader.c:3702:46:  [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.
                struct vrend_strbuf srcs[4], char src_swizzle0[10])
data/virglrenderer-0.8.2/src/vrend_shader.c:3737:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      char swizzle[8] = "";
data/virglrenderer-0.8.2/src/vrend_shader.c:3740:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      char prefix[6] = "";
data/virglrenderer-0.8.2/src/vrend_shader.c:3741:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      char arrayname[16] = "";
data/virglrenderer-0.8.2/src/vrend_shader.c:3742:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      char fp64_src[255];
data/virglrenderer-0.8.2/src/vrend_shader.c:3754:10:  [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(&prefix[pre_idx++], "abs(");
data/virglrenderer-0.8.2/src/vrend_shader.c:3759:13:  [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(arrayname, "[addr%d]", src->DimIndirect.Index);
data/virglrenderer-0.8.2/src/vrend_shader.c:3761:13:  [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(arrayname, "[%d]", src->Dimension.Index);
data/virglrenderer-0.8.2/src/vrend_shader.c:3857:22:  [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 clip_indirect[32] = "";
data/virglrenderer-0.8.2/src/vrend_shader.c:3984:10:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
         char temp[48];
data/virglrenderer-0.8.2/src/vrend_shader.c:4094: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.
                  const char *components[4] = {
data/virglrenderer-0.8.2/src/vrend_shader.c:4628:10:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
   const char *srcs[4];
data/virglrenderer-0.8.2/src/vrend_shader.c:4629:4:  [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 dsts[3][255];
data/virglrenderer-0.8.2/src/vrend_shader.c:4630:4:  [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 fp64_dsts[3][255];
data/virglrenderer-0.8.2/src/vrend_shader.c:4632:4:  [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 writemask[6] = "";
data/virglrenderer-0.8.2/src/vrend_shader.c:4633:4:  [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 src_swizzle0[10];
data/virglrenderer-0.8.2/src/vrend_shader.c:4937:10:  [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(writemask, ".x");
data/virglrenderer-0.8.2/src/vrend_shader.c:4948:10:  [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(writemask, ".x");
data/virglrenderer-0.8.2/src/vrend_shader.c:4958:10:  [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(writemask, ".x");
data/virglrenderer-0.8.2/src/vrend_shader.c:4969:11:  [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(writemask, ".x");
data/virglrenderer-0.8.2/src/vrend_shader.c:5754:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      char outtype[6] = "";
data/virglrenderer-0.8.2/src/vrend_shader.c:5791:10:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
         char blockname[64];
data/virglrenderer-0.8.2/src/vrend_shader.c:5795:10:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
         char blockvarame[64];
data/virglrenderer-0.8.2/src/vrend_shader.c:5821:10:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
         char blockname[64];
data/virglrenderer-0.8.2/src/vrend_shader.c:5822:10:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
         char blockvarame[64];
data/virglrenderer-0.8.2/src/vrend_shader.c:5845:10:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
   const char type[4][6] = {"float", " vec2", " vec3", " vec4"};
data/virglrenderer-0.8.2/src/vrend_shader.c:5848:4:  [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 layout[128] = "";
data/virglrenderer-0.8.2/src/vrend_shader.c:5886:10:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
         char blockname[64];
data/virglrenderer-0.8.2/src/vrend_shader.c:5889:10:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
         char blockvarame[64];
data/virglrenderer-0.8.2/src/vrend_shader.c:5975:10:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
   const char type[4][6] = {"float", " vec2", " vec3", " vec4"};
data/virglrenderer-0.8.2/src/vrend_shader.c:6008:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      char postfix[32] = "";
data/virglrenderer-0.8.2/src/vrend_shader.c:6055:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      char cull_buf[64] = "";
data/virglrenderer-0.8.2/src/vrend_shader.c:6056:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      char clip_buf[64] = "";
data/virglrenderer-0.8.2/src/vrend_shader.c:6081:10:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
   const char *dl[4]  = {
data/virglrenderer-0.8.2/src/vrend_shader.c:6128:10:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
         char prefixes[64];
data/virglrenderer-0.8.2/src/vrend_shader.c:6207:4:  [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 invocbuf[25];
data/virglrenderer-0.8.2/src/vrend_shader.c:6219:10:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
         char postfix[64];
data/virglrenderer-0.8.2/src/vrend_shader.c:6252:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      char clip_var[64] = "";
data/virglrenderer-0.8.2/src/vrend_shader.c:6253:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      char cull_var[64] = "";
data/virglrenderer-0.8.2/src/vrend_shader.c:6269:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      char cull_buf[64] = "";
data/virglrenderer-0.8.2/src/vrend_shader.c:6270:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      char clip_buf[64] = "";
data/virglrenderer-0.8.2/src/vrend_shader.c:6326:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      char clip_var[64] = "", cull_var[64] = "";
data/virglrenderer-0.8.2/src/vrend_shader.c:6377:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      char clip_var[64] = "", cull_var[64] = "";
data/virglrenderer-0.8.2/src/vrend_shader.c:6768:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(ptr, pstring, strlen(pstring));
data/virglrenderer-0.8.2/src/vrend_shader.c:6769:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(ptr + strlen(pstring), auxstring, strlen(auxstring));
data/virglrenderer-0.8.2/src/vrend_shader.c:6800:4:  [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 glsl_name[64];
data/virglrenderer-0.8.2/src/vrend_shader.c:6940:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(&ctx->outputs[i], &ctx->inputs[i], sizeof(struct vrend_shader_io));
data/virglrenderer-0.8.2/src/vrend_strbuf.h:106:4:  [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(sb->buf + sb->size, data, len);
data/virglrenderer-0.8.2/src/vrend_tweaks.c:90:48:  [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).
      ctx->tf3_samples_passed_factor = value ? atoi(value) : 2048;
data/virglrenderer-0.8.2/tests/test_fuzzer_formats.c:617:4:  [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[16];
data/virglrenderer-0.8.2/tests/test_fuzzer_formats.c:634:4:  [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(&cmd[i], data, 16);
data/virglrenderer-0.8.2/tests/test_fuzzer_formats.c:657:4:  [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[16];
data/virglrenderer-0.8.2/tests/test_fuzzer_formats.c:674:4:  [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(&cmd[i], data, 16);
data/virglrenderer-0.8.2/tests/test_virgl_strbuf.c:45:4:  [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[27];
data/virglrenderer-0.8.2/tests/test_virgl_strbuf.c:63:4:  [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[27];
data/virglrenderer-0.8.2/tests/test_virgl_strbuf.c:82:4:  [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/virglrenderer-0.8.2/tests/test_virgl_strbuf.c:102:4:  [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[2048];
data/virglrenderer-0.8.2/tests/test_virgl_strbuf.c:123:4:  [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[128];
data/virglrenderer-0.8.2/tests/test_virgl_strbuf.c:143:4:  [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[513];
data/virglrenderer-0.8.2/tests/test_virgl_transfer.c:286:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char data[50*4];
data/virglrenderer-0.8.2/tests/test_virgl_transfer.c:353:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char data[50*4];
data/virglrenderer-0.8.2/tests/test_virgl_transfer.c:380:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char data[50*4];
data/virglrenderer-0.8.2/tests/test_virgl_transfer.c:412:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char data[50*4];
data/virglrenderer-0.8.2/tests/test_virgl_transfer.c:442:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char data[50*4];
data/virglrenderer-0.8.2/tests/test_virgl_transfer.c:503:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char data[50*4];
data/virglrenderer-0.8.2/tests/testvirgl_encode.h:45:4:  [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(state->buf + state->cdw, &qword, sizeof(uint64_t));
data/virglrenderer-0.8.2/tests/testvirgl_encode.h:52:4:  [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(state->buf + state->cdw, &qword, sizeof(double));
data/virglrenderer-0.8.2/tests/testvirgl_encode.h:60:4:  [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(state->buf + state->cdw, ptr, len);
data/virglrenderer-0.8.2/vtest/vtest_fuzzer.c:146:17:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
   int out_fd = open("/dev/null", O_WRONLY);
data/virglrenderer-0.8.2/vtest/vtest_renderer.c:76:9:  [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(renderer->rendernode_name, O_RDWR | O_CLOEXEC | O_NOCTTY | O_NONBLOCK);
data/virglrenderer-0.8.2/vtest/vtest_renderer.c:160:19:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
         savefd = open(getenv("VTEST_SAVE"),
data/virglrenderer-0.8.2/vtest/vtest_renderer.c:179:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buf[CMSG_SPACE(sizeof(int))], c;
data/virglrenderer-0.8.2/vtest/vtest_renderer.c:216:4:  [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, inbuf->buffer, size);
data/virglrenderer-0.8.2/vtest/vtest_server.c:277: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).
   ret = open(prog.read_file, O_RDONLY);
data/virglrenderer-0.8.2/vtest/vtest_server.c:286: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).
   ret = open("/dev/null", O_WRONLY);
data/virglrenderer-0.8.2/src/gallium/auxiliary/util/u_debug.c:59: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).
   size_t len = strlen(buf);
data/virglrenderer-0.8.2/src/gallium/auxiliary/util/u_debug.c:230: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).
      unsigned name_len = strlen(name);
data/virglrenderer-0.8.2/src/gallium/auxiliary/util/u_debug.c:275: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).
         namealign = MAX2(namealign, strlen(flags->name));
data/virglrenderer-0.8.2/src/gallium/auxiliary/util/u_debug.c:368:49:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	    util_strncat(output, "|", sizeof(output) - strlen(output) - 1);
data/virglrenderer-0.8.2/src/gallium/auxiliary/util/u_debug.c:371: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).
	 util_strncat(output, names->name, sizeof(output) - strlen(output) - 1);
data/virglrenderer-0.8.2/src/gallium/auxiliary/util/u_debug.c:380: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).
	 util_strncat(output, "|", sizeof(output) - strlen(output) - 1);
data/virglrenderer-0.8.2/src/gallium/auxiliary/util/u_debug.c:385:51:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      util_strncat(output, rest, sizeof(output) - strlen(output) - 1);
data/virglrenderer-0.8.2/src/gallium/auxiliary/util/u_string.h:98: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).
   char *p = dst + strlen(dst);
data/virglrenderer-0.8.2/src/gallium/auxiliary/util/u_string.h:145: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).
   size_t len = strlen(needle);
data/virglrenderer-0.8.2/src/gallium/auxiliary/util/u_string.h:184:22:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings.
#define util_strncat strncat
data/virglrenderer-0.8.2/src/iov.c:85:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  return read;
data/virglrenderer-0.8.2/src/iov.c:129:23:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      (*iocb)(cookie, read, (char*)iov->iov_base + offset, len);
data/virglrenderer-0.8.2/src/iov.c:141:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  return read;
data/virglrenderer-0.8.2/src/virgl_egl_context.c:83: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).
   const unsigned needle_len = strlen(needle);
data/virglrenderer-0.8.2/src/vrend_debug.c:187: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).
            int len = strlen(log) + 32;
data/virglrenderer-0.8.2/src/vrend_renderer.c:5862: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).
   vrend_renderer_context_create_internal(0, strlen("HOST"), "HOST");
data/virglrenderer-0.8.2/src/vrend_renderer.c:6024:7:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
      strncpy(grctx->debug_name, debug_name,
data/virglrenderer-0.8.2/src/vrend_renderer.c:8741:14:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
       len = read(fd, &value, sizeof(value));
data/virglrenderer-0.8.2/src/vrend_renderer.c:10294: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).
   vrend_renderer_context_create_internal(0, strlen("HOST"), "HOST");
data/virglrenderer-0.8.2/src/vrend_shader.c:4183:7:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
      strncpy(buf, src->buf, len);
data/virglrenderer-0.8.2/src/vrend_shader.c:6757:16:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
   int mylen = strlen(INTERP_PREFIX) + strlen("out float ");
data/virglrenderer-0.8.2/src/vrend_shader.c:6757: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).
   int mylen = strlen(INTERP_PREFIX) + strlen("out float ");
data/virglrenderer-0.8.2/src/vrend_shader.c:6767: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).
      memset(ptr, ' ', strlen(INTERP_PREFIX));
data/virglrenderer-0.8.2/src/vrend_shader.c:6768: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).
      memcpy(ptr, pstring, strlen(pstring));
data/virglrenderer-0.8.2/src/vrend_shader.c:6769: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).
      memcpy(ptr + strlen(pstring), auxstring, strlen(auxstring));
data/virglrenderer-0.8.2/src/vrend_shader.c:6769: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).
      memcpy(ptr + strlen(pstring), auxstring, strlen(auxstring));
data/virglrenderer-0.8.2/src/vrend_shader.c:6771: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).
      ptr = p + strlen(var_name);
data/virglrenderer-0.8.2/src/vrend_strbuf.h:113: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).
   strbuf_append_buffer(sb, addstr, strlen(addstr));
data/virglrenderer-0.8.2/tests/fuzzer/virgl_fuzzer.c:179: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).
   assert(!virgl_renderer_context_create(ctx_id, strlen(name), name));
data/virglrenderer-0.8.2/tests/test_fuzzer_formats.c:99: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).
   virgl_renderer_context_create(ctx_id, (unsigned)strlen(name), name);
data/virglrenderer-0.8.2/tests/test_virgl_init.c:90: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).
  ret = virgl_renderer_context_create(1, strlen("test1"), "test1");
data/virglrenderer-0.8.2/tests/test_virgl_init.c:105: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).
  ret = virgl_renderer_context_create(0, strlen("test1"), "test1");
data/virglrenderer-0.8.2/tests/test_virgl_init.c:250: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).
  ret = virgl_renderer_context_create(1, strlen("test1"), "test1");
data/virglrenderer-0.8.2/tests/test_virgl_strbuf.c:54:30:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
   ck_assert_int_eq(sb.size, strlen(sb.buf));
data/virglrenderer-0.8.2/tests/test_virgl_strbuf.c:73: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).
   ck_assert_int_eq(strbuf_get_len(&sb), strlen(sb.buf));
data/virglrenderer-0.8.2/tests/test_virgl_strbuf.c:92: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).
   ck_assert_int_eq(strbuf_get_len(&sb), strlen(sb.buf));
data/virglrenderer-0.8.2/tests/test_virgl_strbuf.c:112: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).
   ck_assert_int_eq(strbuf_get_len(&sb), strlen(sb.buf));
data/virglrenderer-0.8.2/tests/test_virgl_strbuf.c:132: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).
   ck_assert_int_eq(strbuf_get_len(&sb), strlen(sb.buf));
data/virglrenderer-0.8.2/tests/test_virgl_strbuf.c:153: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).
   ck_assert_int_eq(strbuf_get_len(&sb), strlen(sb.buf));
data/virglrenderer-0.8.2/tests/testvirgl.c:125: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).
    ret = virgl_renderer_context_create(1, strlen("test1"), "test1");
data/virglrenderer-0.8.2/tests/testvirgl_encode.c:263: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).
   shader_len = strlen(str) + 1;
data/virglrenderer-0.8.2/vtest/vtest.h:40:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
   int (*read)(struct vtest_input *input, void *buf, int size);
data/virglrenderer-0.8.2/vtest/vtest_fuzzer.c:97:20:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      ret = input->read(input, &header, sizeof(header));
data/virglrenderer-0.8.2/vtest/vtest_renderer.c:149:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      ret = read(fd, ptr, left);
data/virglrenderer-0.8.2/vtest/vtest_renderer.c:253:26:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
   ret = renderer.input->read(renderer.input, vtestname, length);
data/virglrenderer-0.8.2/vtest/vtest_renderer.c:259: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).
   ret = virgl_renderer_context_create(ctx_id, strlen(vtestname), vtestname);
data/virglrenderer-0.8.2/vtest/vtest_renderer.c:287:26:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
   ret = renderer.input->read(renderer.input, &version_buf, sizeof(version_buf));
data/virglrenderer-0.8.2/vtest/vtest_renderer.c:414:26:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
   ret = renderer.input->read(renderer.input, &res_create_buf,
data/virglrenderer-0.8.2/vtest/vtest_renderer.c:446:26:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
   ret = renderer.input->read(renderer.input, &res_create_buf,
data/virglrenderer-0.8.2/vtest/vtest_renderer.c:526:26:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
   ret = renderer.input->read(renderer.input, &res_unref_buf,
data/virglrenderer-0.8.2/vtest/vtest_renderer.c:556:26:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
   ret = renderer.input->read(renderer.input, cbuf, length_dw * 4);
data/virglrenderer-0.8.2/vtest/vtest_renderer.c:595:26:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
   ret = renderer.input->read(renderer.input, thdr_buf,
data/virglrenderer-0.8.2/vtest/vtest_renderer.c:642:26:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
   ret = renderer.input->read(renderer.input, thdr_buf,
data/virglrenderer-0.8.2/vtest/vtest_renderer.c:678:26:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
   ret = renderer.input->read(renderer.input, thdr_buf,
data/virglrenderer-0.8.2/vtest/vtest_renderer.c:695:26:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
   ret = renderer.input->read(renderer.input, ptr, data_size);
data/virglrenderer-0.8.2/vtest/vtest_renderer.c:728:26:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
   ret = renderer.input->read(renderer.input, thdr_buf,
data/virglrenderer-0.8.2/vtest/vtest_renderer.c:745:26:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
   ret = renderer.input->read(renderer.input, ptr, data_size);
data/virglrenderer-0.8.2/vtest/vtest_renderer.c:779:26:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
   ret = renderer.input->read(renderer.input, thdr_buf, sizeof(thdr_buf));
data/virglrenderer-0.8.2/vtest/vtest_renderer.c:820:26:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
   ret = renderer.input->read(renderer.input, thdr_buf, sizeof(thdr_buf));
data/virglrenderer-0.8.2/vtest/vtest_renderer.c:850:26:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
   ret = renderer.input->read(renderer.input, thdr_buf, sizeof(thdr_buf));
data/virglrenderer-0.8.2/vtest/vtest_renderer.c:888:26:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
   ret = renderer.input->read(renderer.input, thdr_buf, sizeof(thdr_buf));
data/virglrenderer-0.8.2/vtest/vtest_renderer.c:912:26:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
   ret = renderer.input->read(renderer.input, &bw_buf, sizeof(bw_buf));
data/virglrenderer-0.8.2/vtest/vtest_server.c:391:20:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      ret = input->read(input, &header, sizeof(header));

ANALYSIS SUMMARY:

Hits = 377
Lines analyzed = 62471 in approximately 1.41 seconds (44455 lines/second)
Physical Source Lines of Code (SLOC) = 46856
Hits@level = [0] 231 [1]  63 [2] 243 [3]  22 [4]  49 [5]   0
Hits@level+ = [0+] 608 [1+] 377 [2+] 314 [3+]  71 [4+]  49 [5+]   0
Hits/KSLOC@level+ = [0+] 12.9759 [1+] 8.04593 [2+] 6.70138 [3+] 1.51528 [4+] 1.04576 [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.