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/libva-2.9.0/va/android/va_android.cpp Examining data/libva-2.9.0/va/drm/va_drm.c Examining data/libva-2.9.0/va/drm/va_drm.h Examining data/libva-2.9.0/va/drm/va_drm_auth.c Examining data/libva-2.9.0/va/drm/va_drm_auth.h Examining data/libva-2.9.0/va/drm/va_drm_auth_x11.c Examining data/libva-2.9.0/va/drm/va_drm_auth_x11.h Examining data/libva-2.9.0/va/drm/va_drm_utils.c Examining data/libva-2.9.0/va/drm/va_drm_utils.h Examining data/libva-2.9.0/va/glx/va_backend_glx.h Examining data/libva-2.9.0/va/glx/va_glx.c Examining data/libva-2.9.0/va/glx/va_glx.h Examining data/libva-2.9.0/va/glx/va_glx_impl.c Examining data/libva-2.9.0/va/glx/va_glx_impl.h Examining data/libva-2.9.0/va/glx/va_glx_private.h Examining data/libva-2.9.0/va/sysdeps.h Examining data/libva-2.9.0/va/va.c Examining data/libva-2.9.0/va/va.h Examining data/libva-2.9.0/va/va_android.h Examining data/libva-2.9.0/va/va_backend.h Examining data/libva-2.9.0/va/va_backend_vpp.h Examining data/libva-2.9.0/va/va_compat.c Examining data/libva-2.9.0/va/va_compat.h Examining data/libva-2.9.0/va/va_dec_av1.h Examining data/libva-2.9.0/va/va_dec_hevc.h Examining data/libva-2.9.0/va/va_dec_jpeg.h Examining data/libva-2.9.0/va/va_dec_vp8.h Examining data/libva-2.9.0/va/va_dec_vp9.h Examining data/libva-2.9.0/va/va_drmcommon.h Examining data/libva-2.9.0/va/va_egl.h Examining data/libva-2.9.0/va/va_enc_h264.h Examining data/libva-2.9.0/va/va_enc_hevc.h Examining data/libva-2.9.0/va/va_enc_jpeg.h Examining data/libva-2.9.0/va/va_enc_mpeg2.h Examining data/libva-2.9.0/va/va_enc_vp8.h Examining data/libva-2.9.0/va/va_enc_vp9.h Examining data/libva-2.9.0/va/va_fei.h Examining data/libva-2.9.0/va/va_fei_h264.h Examining data/libva-2.9.0/va/va_fei_hevc.h Examining data/libva-2.9.0/va/va_fool.c Examining data/libva-2.9.0/va/va_fool.h Examining data/libva-2.9.0/va/va_internal.h Examining data/libva-2.9.0/va/va_str.c Examining data/libva-2.9.0/va/va_str.h Examining data/libva-2.9.0/va/va_tpi.h Examining data/libva-2.9.0/va/va_trace.c Examining data/libva-2.9.0/va/va_trace.h Examining data/libva-2.9.0/va/va_vpp.h Examining data/libva-2.9.0/va/va_x11.h Examining data/libva-2.9.0/va/wayland/va_backend_wayland.h Examining data/libva-2.9.0/va/wayland/va_wayland.c Examining data/libva-2.9.0/va/wayland/va_wayland.h Examining data/libva-2.9.0/va/wayland/va_wayland_drm.c Examining data/libva-2.9.0/va/wayland/va_wayland_drm.h Examining data/libva-2.9.0/va/wayland/va_wayland_emgd.c Examining data/libva-2.9.0/va/wayland/va_wayland_emgd.h Examining data/libva-2.9.0/va/wayland/va_wayland_private.h Examining data/libva-2.9.0/va/x11/dri2_util.c Examining data/libva-2.9.0/va/x11/va_dri2.c Examining data/libva-2.9.0/va/x11/va_dri2.h Examining data/libva-2.9.0/va/x11/va_dri2str.h Examining data/libva-2.9.0/va/x11/va_dri2tokens.h Examining data/libva-2.9.0/va/x11/va_dricommon.c Examining data/libva-2.9.0/va/x11/va_dricommon.h Examining data/libva-2.9.0/va/x11/va_fglrx.c Examining data/libva-2.9.0/va/x11/va_fglrx.h Examining data/libva-2.9.0/va/x11/va_nvctrl.c Examining data/libva-2.9.0/va/x11/va_nvctrl.h Examining data/libva-2.9.0/va/x11/va_x11.c FINAL RESULTS: data/libva-2.9.0/va/glx/va_glx_impl.c:41:5: [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(stderr, format, args); data/libva-2.9.0/va/va.c:214:11: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. len = vsnprintf(buf, sizeof(buf), msg, args); data/libva-2.9.0/va/va.c:222:13: [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. n = vsnprintf(dynbuf, len + 1, msg, args); data/libva-2.9.0/va/va.c:245:11: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. len = vsnprintf(buf, sizeof(buf), msg, args); data/libva-2.9.0/va/va.c:253:13: [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. n = vsnprintf(dynbuf, len + 1, msg, args); data/libva-2.9.0/va/va.c:461: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. if (0 == access( driver_path, F_OK)) data/libva-2.9.0/va/va_trace.c:525:9: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(env_value + tmp, data/libva-2.9.0/va/va_trace.c:900:9: [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, msg, args); data/libva-2.9.0/va/wayland/va_wayland.c:52:5: [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(stderr, format, args); data/libva-2.9.0/va/va.c:99:13: [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. value = getenv(env); data/libva-2.9.0/va/va.c:356:23: [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. driver_name_env = getenv("LIBVA_DRIVER_NAME"); data/libva-2.9.0/va/va.c:382:23: [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. driver_name_env = getenv("LIBVA_DRIVER_NAME"); data/libva-2.9.0/va/va.c:432:23: [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. search_path = getenv("LIBVA_DRIVERS_PATH"); data/libva-2.9.0/va/android/va_android.cpp:65:10: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open (dev_name, O_RDWR); data/libva-2.9.0/va/drm/va_drm_auth_x11.c:83: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 libva_x11_name[16]; data/libva-2.9.0/va/va.c:68: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 oneline[1024]; data/libva-2.9.0/va/va.c:74:10: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fp = fopen("/etc/libva.conf", "r"); data/libva-2.9.0/va/va.c:191: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 env_value[1024]; data/libva-2.9.0/va/va.c:206: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[512], *dynbuf; data/libva-2.9.0/va/va.c:237: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[512], *dynbuf; data/libva-2.9.0/va/va.c:465: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 init_func_s[256]; data/libva-2.9.0/va/va_fool.c:87: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 *fool_buf[VABufferTypeMax]; /* memory of fool buffers */ data/libva-2.9.0/va/va_fool.c:109: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 env_value[1024]; data/libva-2.9.0/va/va_fool.c:267: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 file_name[1024]; data/libva-2.9.0/va/va_fool.c:279:19: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((fd = open(file_name, O_RDONLY)) != -1) { data/libva-2.9.0/va/va_fool.c:319:15: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((fd = open(fool_ctx->fn_jpg, O_RDONLY)) != -1) { data/libva-2.9.0/va/va_trace.c:514:9: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(env_value + tmp, data/libva-2.9.0/va/va_trace.c:533:9: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(env_value + tmp, data/libva-2.9.0/va/va_trace.c:546: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 env_value[1024]; data/libva-2.9.0/va/va_trace.c:558:10: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fp = fopen(fn_env, "w"); data/libva-2.9.0/va/va_trace.c:596:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char env_value[1024]; data/libva-2.9.0/va/va_trace.c:615:19: [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). pfp = fopen(plog_file->fn_log, "w"); data/libva-2.9.0/va/va_trace.c:617:19: [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). pfp = fopen(plog_file->fn_log, "a"); data/libva-2.9.0/va/va_trace.c:737: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 env_value[1024]; data/libva-2.9.0/va/va_trace.c:1588: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 header[32]; data/libva-2.9.0/va/va_trace.c:1853:12: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char tmp[1024]; data/libva-2.9.0/va/va_trace.c:1865: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(tmp + strlen(tmp), "%u ", p->quantiser_table[i][j]); data/libva-2.9.0/va/va_trace.c:1909:12: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char tmp[1024]; data/libva-2.9.0/va/va_trace.c:1919: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(tmp + strlen(tmp), "%u ", p->huffman_table[i].num_dc_codes[j]); data/libva-2.9.0/va/va_trace.c:1924: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(tmp + strlen(tmp), "%u ", p->huffman_table[i].dc_values[j]); data/libva-2.9.0/va/va_trace.c:1929: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(tmp + strlen(tmp), "%u ", p->huffman_table[i].num_ac_codes[j]); data/libva-2.9.0/va/va_trace.c:1934: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(tmp + strlen(tmp), "%u ", p->huffman_table[i].ac_values[j]); data/libva-2.9.0/va/va_trace.c:1939: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(tmp + strlen(tmp), "%u ", p->huffman_table[i].pad[j]); data/libva-2.9.0/va/va_trace.c:3704:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char tmp[1024]; data/libva-2.9.0/va/va_trace.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(tmp + strlen(tmp), "%2x ", p->mv_probs[i][j]); data/libva-2.9.0/va/va_trace.c:3809:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char tmp[1024]; data/libva-2.9.0/va/va_trace.c:3820: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(tmp + strlen(tmp), "%4x, ", p->quantization_index[i][j]); data/libva-2.9.0/va/va_trace.c:3837:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char tmp[1024]; data/libva-2.9.0/va/va_trace.c:3849:21: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(tmp + strlen(tmp), "%2x, ", p->dct_coeff_probs[i][j][k][l]); data/libva-2.9.0/va/wayland/va_wayland_drm.c:60:10: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open(device, O_RDWR); data/libva-2.9.0/va/x11/dri2_util.c:200:26: [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). dri_state->base.fd = open(device_name, O_RDWR); data/libva-2.9.0/va/x11/va_fglrx.c:42: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 strUDID[ADL_MAX_PATH]; data/libva-2.9.0/va/x11/va_fglrx.c:47: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 strAdapterName[ADL_MAX_PATH]; data/libva-2.9.0/va/x11/va_fglrx.c:48: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 strDisplayName[ADL_MAX_PATH]; data/libva-2.9.0/va/x11/va_fglrx.c:52: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 strXScreenConfigName[ADL_MAX_PATH]; data/libva-2.9.0/va/x11/va_fglrx.c:57: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 strXScreenConfigName[ADL_MAX_PATH]; data/libva-2.9.0/va/glx/va_glx_impl.c:183: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). end = ext + strlen(ext); data/libva-2.9.0/va/glx/va_glx_impl.c:184: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). name_len = strlen(name); data/libva-2.9.0/va/va.c:76:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(oneline) == 1) data/libva-2.9.0/va/va.c:86:17: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(env_value,value, 1024); data/libva-2.9.0/va/va.c:102:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(env_value, value, 1024); data/libva-2.9.0/va/va.c:684:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(driver_name) == 0 || strlen(driver_name) >=256) { data/libva-2.9.0/va/va.c:684:37: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(driver_name) == 0 || strlen(driver_name) >=256) { data/libva-2.9.0/va/va_fool.c:294:15: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ret = read(fd, fool_ctx->segbuf_enc, file_stat.st_size); data/libva-2.9.0/va/va_fool.c:322:19: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ret = read(fd, fool_ctx->segbuf_jpg, file_stat.st_size); data/libva-2.9.0/va/va_trace.c:508:16: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size = strlen(suffix_str); data/libva-2.9.0/va/va_trace.c:549:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(env_value, fn_env, 1024); data/libva-2.9.0/va/va_trace.c:598:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(env_value, pva_trace->fn_log_env, 1024); data/libva-2.9.0/va/va_trace.c:1865: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). sprintf(tmp + strlen(tmp), "%u ", p->quantiser_table[i][j]); data/libva-2.9.0/va/va_trace.c:1919: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). sprintf(tmp + strlen(tmp), "%u ", p->huffman_table[i].num_dc_codes[j]); data/libva-2.9.0/va/va_trace.c:1924: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). sprintf(tmp + strlen(tmp), "%u ", p->huffman_table[i].dc_values[j]); data/libva-2.9.0/va/va_trace.c:1929: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). sprintf(tmp + strlen(tmp), "%u ", p->huffman_table[i].num_ac_codes[j]); data/libva-2.9.0/va/va_trace.c:1934: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). sprintf(tmp + strlen(tmp), "%u ", p->huffman_table[i].ac_values[j]); data/libva-2.9.0/va/va_trace.c:1939: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). sprintf(tmp + strlen(tmp), "%u ", p->huffman_table[i].pad[j]); data/libva-2.9.0/va/va_trace.c:3759: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). sprintf(tmp + strlen(tmp), "%2x ", p->mv_probs[i][j]); data/libva-2.9.0/va/va_trace.c:3820: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). sprintf(tmp + strlen(tmp), "%4x, ", p->quantization_index[i][j]); data/libva-2.9.0/va/va_trace.c:3849:35: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). sprintf(tmp + strlen(tmp), "%2x, ", p->dct_coeff_probs[i][j][k][l]); data/libva-2.9.0/va/x11/va_fglrx.c:96:12: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). return strlen(name); data/libva-2.9.0/va/x11/va_x11.c:105:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(driver_name) >= m->key_len && data/libva-2.9.0/va/x11/va_x11.c:139:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(*driver_name_ptr) >= m->key_len && ANALYSIS SUMMARY: Hits = 80 Lines analyzed = 28400 in approximately 0.84 seconds (33889 lines/second) Physical Source Lines of Code (SLOC) = 15720 Hits@level = [0] 36 [1] 24 [2] 43 [3] 4 [4] 9 [5] 0 Hits@level+ = [0+] 116 [1+] 80 [2+] 56 [3+] 13 [4+] 9 [5+] 0 Hits/KSLOC@level+ = [0+] 7.37913 [1+] 5.08906 [2+] 3.56234 [3+] 0.826972 [4+] 0.572519 [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.