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/libbluray-1.2.1/player_wrappers/xine/input_bluray.c
Examining data/libbluray-1.2.1/jni/jni.h
Examining data/libbluray-1.2.1/jni/win32/jni_md.h
Examining data/libbluray-1.2.1/jni/linux/jni_md.h
Examining data/libbluray-1.2.1/jni/netbsd/jni_md.h
Examining data/libbluray-1.2.1/jni/darwin/jni_md.h
Examining data/libbluray-1.2.1/contrib/libudfread/src/ecma167.c
Examining data/libbluray-1.2.1/contrib/libudfread/src/blockinput.h
Examining data/libbluray-1.2.1/contrib/libudfread/src/default_blockinput.c
Examining data/libbluray-1.2.1/contrib/libudfread/src/default_blockinput.h
Examining data/libbluray-1.2.1/contrib/libudfread/src/udfread.c
Examining data/libbluray-1.2.1/contrib/libudfread/src/udfread.h
Examining data/libbluray-1.2.1/contrib/libudfread/src/ecma167.h
Examining data/libbluray-1.2.1/src/examples/list_titles.c
Examining data/libbluray-1.2.1/src/examples/sound_dump.c
Examining data/libbluray-1.2.1/src/examples/index_dump.c
Examining data/libbluray-1.2.1/src/examples/bdsplice.c
Examining data/libbluray-1.2.1/src/examples/libbluray_test.c
Examining data/libbluray-1.2.1/src/examples/bd_info.c
Examining data/libbluray-1.2.1/src/libbluray/hdmv/hdmv_insn.h
Examining data/libbluray-1.2.1/src/libbluray/hdmv/hdmv_vm.c
Examining data/libbluray-1.2.1/src/libbluray/hdmv/mobj_parse.c
Examining data/libbluray-1.2.1/src/libbluray/hdmv/mobj_print.h
Examining data/libbluray-1.2.1/src/libbluray/hdmv/mobj_data.h
Examining data/libbluray-1.2.1/src/libbluray/hdmv/hdmv_vm.h
Examining data/libbluray-1.2.1/src/libbluray/hdmv/mobj_parse.h
Examining data/libbluray-1.2.1/src/libbluray/hdmv/mobj_print.c
Examining data/libbluray-1.2.1/src/libbluray/disc/properties.c
Examining data/libbluray-1.2.1/src/libbluray/disc/bdplus.c
Examining data/libbluray-1.2.1/src/libbluray/disc/dec.c
Examining data/libbluray-1.2.1/src/libbluray/disc/properties.h
Examining data/libbluray-1.2.1/src/libbluray/disc/disc.h
Examining data/libbluray-1.2.1/src/libbluray/disc/udf_fs.h
Examining data/libbluray-1.2.1/src/libbluray/disc/bdplus.h
Examining data/libbluray-1.2.1/src/libbluray/disc/aacs.h
Examining data/libbluray-1.2.1/src/libbluray/disc/dec.h
Examining data/libbluray-1.2.1/src/libbluray/disc/enc_info.h
Examining data/libbluray-1.2.1/src/libbluray/disc/disc.c
Examining data/libbluray-1.2.1/src/libbluray/disc/udf_fs.c
Examining data/libbluray-1.2.1/src/libbluray/disc/aacs.c
Examining data/libbluray-1.2.1/src/libbluray/bluray.h
Examining data/libbluray-1.2.1/src/libbluray/player_settings.h
Examining data/libbluray-1.2.1/src/libbluray/bdj/native/util.h
Examining data/libbluray-1.2.1/src/libbluray/bdj/native/bdjo.c
Examining data/libbluray-1.2.1/src/libbluray/bdj/native/bdjo.h
Examining data/libbluray-1.2.1/src/libbluray/bdj/native/org_videolan_Libbluray.c
Examining data/libbluray-1.2.1/src/libbluray/bdj/native/org_videolan_Logger.h
Examining data/libbluray-1.2.1/src/libbluray/bdj/native/org_videolan_Logger.c
Examining data/libbluray-1.2.1/src/libbluray/bdj/native/java_awt_BDGraphics.c
Examining data/libbluray-1.2.1/src/libbluray/bdj/native/util.c
Examining data/libbluray-1.2.1/src/libbluray/bdj/native/java_awt_BDFontMetrics.h
Examining data/libbluray-1.2.1/src/libbluray/bdj/native/register_native.h
Examining data/libbluray-1.2.1/src/libbluray/bdj/native/org_videolan_Libbluray.h
Examining data/libbluray-1.2.1/src/libbluray/bdj/native/java_awt_BDFontMetrics.c
Examining data/libbluray-1.2.1/src/libbluray/bdj/native/register_native.c
Examining data/libbluray-1.2.1/src/libbluray/bdj/native/java_awt_BDGraphics.h
Examining data/libbluray-1.2.1/src/libbluray/bdj/bdj.h
Examining data/libbluray-1.2.1/src/libbluray/bdj/bdj.c
Examining data/libbluray-1.2.1/src/libbluray/bdj/bdjo_data.h
Examining data/libbluray-1.2.1/src/libbluray/bdj/bdjo_parse.c
Examining data/libbluray-1.2.1/src/libbluray/bdj/bdjo_parse.h
Examining data/libbluray-1.2.1/src/libbluray/bluray.c
Examining data/libbluray-1.2.1/src/libbluray/bdnav/bdmv_parse.h
Examining data/libbluray-1.2.1/src/libbluray/bdnav/mpls_parse.h
Examining data/libbluray-1.2.1/src/libbluray/bdnav/clpi_data.h
Examining data/libbluray-1.2.1/src/libbluray/bdnav/clpi_parse.c
Examining data/libbluray-1.2.1/src/libbluray/bdnav/mpls_parse.c
Examining data/libbluray-1.2.1/src/libbluray/bdnav/meta_data.h
Examining data/libbluray-1.2.1/src/libbluray/bdnav/bdparse.h
Examining data/libbluray-1.2.1/src/libbluray/bdnav/meta_parse.c
Examining data/libbluray-1.2.1/src/libbluray/bdnav/mpls_data.h
Examining data/libbluray-1.2.1/src/libbluray/bdnav/bdid_parse.c
Examining data/libbluray-1.2.1/src/libbluray/bdnav/navigation.h
Examining data/libbluray-1.2.1/src/libbluray/bdnav/extdata_parse.h
Examining data/libbluray-1.2.1/src/libbluray/bdnav/uo_mask.h
Examining data/libbluray-1.2.1/src/libbluray/bdnav/index_parse.c
Examining data/libbluray-1.2.1/src/libbluray/bdnav/uo_mask.c
Examining data/libbluray-1.2.1/src/libbluray/bdnav/index_parse.h
Examining data/libbluray-1.2.1/src/libbluray/bdnav/navigation.c
Examining data/libbluray-1.2.1/src/libbluray/bdnav/extdata_parse.c
Examining data/libbluray-1.2.1/src/libbluray/bdnav/sound_parse.h
Examining data/libbluray-1.2.1/src/libbluray/bdnav/uo_mask_table.h
Examining data/libbluray-1.2.1/src/libbluray/bdnav/clpi_parse.h
Examining data/libbluray-1.2.1/src/libbluray/bdnav/meta_parse.h
Examining data/libbluray-1.2.1/src/libbluray/bdnav/bdid_parse.h
Examining data/libbluray-1.2.1/src/libbluray/bdnav/bdmv_parse.c
Examining data/libbluray-1.2.1/src/libbluray/bdnav/sound_parse.c
Examining data/libbluray-1.2.1/src/libbluray/register.h
Examining data/libbluray-1.2.1/src/libbluray/register.c
Examining data/libbluray-1.2.1/src/libbluray/bluray_internal.h
Examining data/libbluray-1.2.1/src/libbluray/keys.h
Examining data/libbluray-1.2.1/src/libbluray/decoders/ig.h
Examining data/libbluray-1.2.1/src/libbluray/decoders/pes_buffer.c
Examining data/libbluray-1.2.1/src/libbluray/decoders/pg_decode.h
Examining data/libbluray-1.2.1/src/libbluray/decoders/overlay.h
Examining data/libbluray-1.2.1/src/libbluray/decoders/m2ts_demux.h
Examining data/libbluray-1.2.1/src/libbluray/decoders/textst_decode.h
Examining data/libbluray-1.2.1/src/libbluray/decoders/ig_decode.h
Examining data/libbluray-1.2.1/src/libbluray/decoders/m2ts_demux.c
Examining data/libbluray-1.2.1/src/libbluray/decoders/ig_decode.c
Examining data/libbluray-1.2.1/src/libbluray/decoders/pg_decode.c
Examining data/libbluray-1.2.1/src/libbluray/decoders/pg.h
Examining data/libbluray-1.2.1/src/libbluray/decoders/textst_render.c
Examining data/libbluray-1.2.1/src/libbluray/decoders/graphics_controller.h
Examining data/libbluray-1.2.1/src/libbluray/decoders/textst_render.h
Examining data/libbluray-1.2.1/src/libbluray/decoders/hdmv_pids.h
Examining data/libbluray-1.2.1/src/libbluray/decoders/graphics_processor.h
Examining data/libbluray-1.2.1/src/libbluray/decoders/rle.c
Examining data/libbluray-1.2.1/src/libbluray/decoders/rle.h
Examining data/libbluray-1.2.1/src/libbluray/decoders/pes_buffer.h
Examining data/libbluray-1.2.1/src/libbluray/decoders/textst_decode.c
Examining data/libbluray-1.2.1/src/libbluray/decoders/m2ts_filter.h
Examining data/libbluray-1.2.1/src/libbluray/decoders/textst.h
Examining data/libbluray-1.2.1/src/libbluray/decoders/graphics_controller.c
Examining data/libbluray-1.2.1/src/libbluray/decoders/graphics_processor.c
Examining data/libbluray-1.2.1/src/libbluray/decoders/m2ts_filter.c
Examining data/libbluray-1.2.1/src/libbluray/bluray-version.h
Examining data/libbluray-1.2.1/src/devtools/util.h
Examining data/libbluray-1.2.1/src/devtools/hdmv_test.c
Examining data/libbluray-1.2.1/src/devtools/strings.h
Examining data/libbluray-1.2.1/src/devtools/util.c
Examining data/libbluray-1.2.1/src/devtools/mobj_dump.c
Examining data/libbluray-1.2.1/src/devtools/bdjo_dump.c
Examining data/libbluray-1.2.1/src/devtools/bdj_test.c
Examining data/libbluray-1.2.1/src/devtools/clpi_dump.c
Examining data/libbluray-1.2.1/src/devtools/mpls_dump.c
Examining data/libbluray-1.2.1/src/file/dl_posix.c
Examining data/libbluray-1.2.1/src/file/file_posix.c
Examining data/libbluray-1.2.1/src/file/mount.h
Examining data/libbluray-1.2.1/src/file/file.h
Examining data/libbluray-1.2.1/src/file/dirs_darwin.c
Examining data/libbluray-1.2.1/src/file/file_win32.c
Examining data/libbluray-1.2.1/src/file/dirs_win32.c
Examining data/libbluray-1.2.1/src/file/dir_posix.c
Examining data/libbluray-1.2.1/src/file/filesystem.h
Examining data/libbluray-1.2.1/src/file/filesystem.c
Examining data/libbluray-1.2.1/src/file/file.c
Examining data/libbluray-1.2.1/src/file/mount.c
Examining data/libbluray-1.2.1/src/file/dl_win32.c
Examining data/libbluray-1.2.1/src/file/dl.h
Examining data/libbluray-1.2.1/src/file/dir_win32.c
Examining data/libbluray-1.2.1/src/file/dirs.h
Examining data/libbluray-1.2.1/src/file/dirs_xdg.c
Examining data/libbluray-1.2.1/src/file/mount_darwin.c
Examining data/libbluray-1.2.1/src/util/mutex.c
Examining data/libbluray-1.2.1/src/util/logging.h
Examining data/libbluray-1.2.1/src/util/refcnt.h
Examining data/libbluray-1.2.1/src/util/array.h
Examining data/libbluray-1.2.1/src/util/array.c
Examining data/libbluray-1.2.1/src/util/strutl.c
Examining data/libbluray-1.2.1/src/util/attributes.h
Examining data/libbluray-1.2.1/src/util/log_control.h
Examining data/libbluray-1.2.1/src/util/time.c
Examining data/libbluray-1.2.1/src/util/refcnt.c
Examining data/libbluray-1.2.1/src/util/bits.h
Examining data/libbluray-1.2.1/src/util/strutl.h
Examining data/libbluray-1.2.1/src/util/event_queue.h
Examining data/libbluray-1.2.1/src/util/bits.c
Examining data/libbluray-1.2.1/src/util/time.h
Examining data/libbluray-1.2.1/src/util/logging.c
Examining data/libbluray-1.2.1/src/util/mutex.h
Examining data/libbluray-1.2.1/src/util/event_queue.c
Examining data/libbluray-1.2.1/src/util/macro.h

FINAL RESULTS:

data/libbluray-1.2.1/contrib/libudfread/src/ecma167.c:33:27:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
#define ecma_error(...)   fprintf(stderr, "ecma: " __VA_ARGS__)
data/libbluray-1.2.1/contrib/libudfread/src/udfread.c:54:49:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
#define udf_error(...)   do {                   fprintf(stderr, "udfread ERROR: " __VA_ARGS__); } while (0)
data/libbluray-1.2.1/contrib/libudfread/src/udfread.c:55:49:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
#define udf_log(...)     do { if (enable_log)   fprintf(stderr, "udfread LOG  : " __VA_ARGS__); } while (0)
data/libbluray-1.2.1/contrib/libudfread/src/udfread.c:56:49:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
#define udf_trace(...)   do { if (enable_trace) fprintf(stderr, "udfread TRACE: " __VA_ARGS__); } while (0)
data/libbluray-1.2.1/jni/jni.h:1882:20:  [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.
    jint (JNICALL *vfprintf)(FILE *fp, const char *format, va_list args);
data/libbluray-1.2.1/src/devtools/hdmv_test.c:32:7:  [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.
      printf(#e "\n");                              \
data/libbluray-1.2.1/src/devtools/mpls_dump.c:85:9:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
        strcpy(result, base);
data/libbluray-1.2.1/src/devtools/mpls_dump.c:86: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(result, DIR_SEP);
data/libbluray-1.2.1/src/devtools/mpls_dump.c:87: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(result, sub);
data/libbluray-1.2.1/src/devtools/mpls_dump.c:749:37:  [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).
                    dirlist[jj++] = strcpy(s, ent->d_name);
data/libbluray-1.2.1/src/devtools/util.c:36:5:  [4] (format) vprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    vprintf(fmt, ap);
data/libbluray-1.2.1/src/examples/index_dump.c:28:5:  [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.
    printf(title->bdj ?
data/libbluray-1.2.1/src/file/dirs_win32.c:58:9:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
        strcpy(path + len, font_file);
data/libbluray-1.2.1/src/file/dirs_xdg.c:104:13:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
            strcpy(dirs, xdg_sys);
data/libbluray-1.2.1/src/libbluray/bdj/bdj.c:150:5:  [4] (buffer) wcscat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120).
    wcscat(buf_loc, buf_vers);
data/libbluray-1.2.1/src/libbluray/bdj/bdj.c:168:9:  [4] (buffer) wcscat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120).
        wcscat(java_path, buf_loc);
data/libbluray-1.2.1/src/libbluray/bdj/bdj.c:269:13:  [4] (shell) execl:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
            execl(MACOS_JAVA_HOME, MACOS_JAVA_HOME);
data/libbluray-1.2.1/src/libbluray/bdnav/mpls_parse.c:512:5:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
    strcpy(pi->clip[0].clip_id, clip_id);
data/libbluray-1.2.1/src/libbluray/bdnav/mpls_parse.c:513:5:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
    strcpy(pi->clip[0].codec_id, codec_id);
data/libbluray-1.2.1/src/libbluray/bdnav/mpls_parse.c:605:5:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
    strcpy(spi->clip[0].clip_id, clip_id);
data/libbluray-1.2.1/src/libbluray/bdnav/mpls_parse.c:606:5:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
    strcpy(spi->clip[0].codec_id, codec_id);
data/libbluray-1.2.1/src/libbluray/disc/disc.c:128:17:  [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(name, map[i][1]);
data/libbluray-1.2.1/src/libbluray/disc/disc.c:201:9:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
        strcpy(entry->d_name, priv->entry[priv->pos++].d_name);
data/libbluray-1.2.1/src/libbluray/disc/disc.c:228:5:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
    strcpy(priv->entry[priv->count].d_name, entry->d_name);
data/libbluray-1.2.1/src/libbluray/hdmv/mobj_print.c:295:16:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        buf += sprintf(buf, " %s", psr_info[psr1]);
data/libbluray-1.2.1/src/libbluray/hdmv/mobj_print.c:297:16:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        buf += sprintf(buf, " %s", psr_info[psr2]);
data/libbluray-1.2.1/src/libbluray/hdmv/mobj_print.c:339:32:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
                        buf += sprintf(buf, "%-10s ", insn_opt_goto[insn->branch_opt]);
data/libbluray-1.2.1/src/libbluray/hdmv/mobj_print.c:347:28:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
                    buf += sprintf(buf, "%-10s ", insn_opt_jump[insn->branch_opt]);
data/libbluray-1.2.1/src/libbluray/hdmv/mobj_print.c:355:28:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
                    buf += sprintf(buf, "%-10s ", insn_opt_play[insn->branch_opt]);
data/libbluray-1.2.1/src/libbluray/hdmv/mobj_print.c:369:24:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
                buf += sprintf(buf, "%-10s ", insn_opt_cmp[insn->cmp_opt]);
data/libbluray-1.2.1/src/libbluray/hdmv/mobj_print.c:380:32:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
                        buf += sprintf(buf, "%-10s ", insn_opt_set[insn->set_opt]);
data/libbluray-1.2.1/src/libbluray/hdmv/mobj_print.c:389:28:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
                    buf += sprintf(buf, "%-10s ", insn_opt_setsys[insn->set_opt]);
data/libbluray-1.2.1/src/util/logging.c:90:15:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        len = sprintf(buffer, "%s:%d: ", f ? f + 1 : file, line);
data/libbluray-1.2.1/src/util/logging.c:96:16:  [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.
        len2 = vsnprintf(buffer + len, sizeof(buffer) - len - 1, format, args);
data/libbluray-1.2.1/src/util/strutl.c:68:15:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
        len = vsnprintf(str, size, fmt, ap);
data/libbluray-1.2.1/contrib/libudfread/src/udfread.c:78:9:  [3] (misc) InitializeCriticalSection:
  Exceptions can be thrown in low-memory situations. Use
  InitializeCriticalSectionAndSpinCount instead.
        InitializeCriticalSection(&cs);
data/libbluray-1.2.1/contrib/libudfread/src/udfread.c:81:5:  [3] (misc) EnterCriticalSection:
  On some versions of Windows, exceptions can be thrown in low-memory
  situations. Use InitializeCriticalSectionAndSpinCount instead.
    EnterCriticalSection(&cs);
data/libbluray-1.2.1/contrib/libudfread/src/udfread.c:729:9:  [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("UDFREAD_LOG")) {
data/libbluray-1.2.1/contrib/libudfread/src/udfread.c:732:9:  [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("UDFREAD_TRACE")) {
data/libbluray-1.2.1/src/devtools/clpi_dump.c:325:15:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
        opt = getopt(argc, argv, OPTS);
data/libbluray-1.2.1/src/devtools/mpls_dump.c:650:15:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
        opt = getopt(argc, argv, OPTS);
data/libbluray-1.2.1/src/examples/bdsplice.c:80:15:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
        opt = getopt(argc, argv, OPTS);
data/libbluray-1.2.1/src/examples/list_titles.c:73:15:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
        opt = getopt(argc, argv, OPTS);
data/libbluray-1.2.1/src/file/dirs_darwin.c:43:29:  [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 *user_home = getenv("HOME");
data/libbluray-1.2.1/src/file/dirs_darwin.c:54:29:  [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 *user_home = getenv("HOME");
data/libbluray-1.2.1/src/file/dirs_darwin.c:65:29:  [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 *user_home = getenv("HOME");
data/libbluray-1.2.1/src/file/dirs_xdg.c:45:28:  [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 *xdg_home = getenv("XDG_CONFIG_HOME");
data/libbluray-1.2.1/src/file/dirs_xdg.c:50:29:  [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 *user_home = getenv("HOME");
data/libbluray-1.2.1/src/file/dirs_xdg.c:61:28:  [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 *xdg_home = getenv("XDG_DATA_HOME");
data/libbluray-1.2.1/src/file/dirs_xdg.c:66:29:  [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 *user_home = getenv("HOME");
data/libbluray-1.2.1/src/file/dirs_xdg.c:77:29:  [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 *xdg_cache = getenv("XDG_CACHE_HOME");
data/libbluray-1.2.1/src/file/dirs_xdg.c:82:29:  [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 *user_home = getenv("HOME");
data/libbluray-1.2.1/src/file/dirs_xdg.c:96: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.
        const char *xdg_sys = getenv("XDG_CONFIG_DIRS");
data/libbluray-1.2.1/src/libbluray/bdj/bdj.c:355:17:  [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.
    java_home = getenv("JAVA_HOME");
data/libbluray-1.2.1/src/libbluray/bdj/bdj.c:427:17:  [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.
    java_home = getenv("JAVA_HOME");
data/libbluray-1.2.1/src/libbluray/bdj/bdj.c:515:29:  [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 *classpath = getenv("LIBBLURAY_CP");
data/libbluray-1.2.1/src/libbluray/bdj/bdj.c:625:16:  [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.
        root = getenv("LIBBLURAY_PERSISTENT_ROOT");
data/libbluray-1.2.1/src/libbluray/bdj/bdj.c:656:16:  [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.
        root = getenv("LIBBLURAY_CACHE_ROOT");
data/libbluray-1.2.1/src/libbluray/bdj/bdj.c:918:9:  [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("BDJ_JVM_DISABLE_JIT")) {
data/libbluray-1.2.1/src/libbluray/bdj/bdj.c:922:9:  [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("BDJ_JVM_DEBUG")) {
data/libbluray-1.2.1/src/libbluray/bdj/bdj.c:937:9:  [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("BDJ_JVM_TRACE")) {
data/libbluray-1.2.1/src/libbluray/bdj/bdj.c:938:61:  [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.
        option[n++].optionString = str_printf("-Xtrace:%s", getenv("BDJ_JVM_TRACE"));
data/libbluray-1.2.1/src/libbluray/bluray.c:725:21:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
                if (random() % 1000)
data/libbluray-1.2.1/src/libbluray/bluray.c:1439: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.
    env = getenv("LIBBLURAY_PERSISTENT_STORAGE");
data/libbluray-1.2.1/src/libbluray/disc/aacs.c:94: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.
      getenv("LIBAACS_PATH"),
data/libbluray-1.2.1/src/libbluray/disc/bdplus.c:98: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.
      getenv("LIBBDPLUS_PATH"),
data/libbluray-1.2.1/src/util/logging.c:67: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.
        if ((env = getenv("BD_DEBUG_MASK")))
data/libbluray-1.2.1/src/util/logging.c:71: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.
        if ((env = getenv("BD_DEBUG_FILE"))) {
data/libbluray-1.2.1/src/util/mutex.c:46:5:  [3] (misc) EnterCriticalSection:
  On some versions of Windows, exceptions can be thrown in low-memory
  situations. Use InitializeCriticalSectionAndSpinCount instead.
    EnterCriticalSection(&p->cs);
data/libbluray-1.2.1/src/util/mutex.c:58:5:  [3] (misc) InitializeCriticalSection:
  Exceptions can be thrown in low-memory situations. Use
  InitializeCriticalSectionAndSpinCount instead.
    InitializeCriticalSection(&p->cs);
data/libbluray-1.2.1/contrib/libudfread/src/default_blockinput.c:175:13:  [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).
    p->fd = open(path, O_RDONLY | O_BINARY);
data/libbluray-1.2.1/contrib/libudfread/src/default_blockinput.c:177:13:  [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).
    p->fd = open(path, O_RDONLY);
data/libbluray-1.2.1/contrib/libudfread/src/ecma167.c:53: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(str, p, length);
data/libbluray-1.2.1/contrib/libudfread/src/ecma167.c:67: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(eid->identifier,        p + 1,  23);
data/libbluray-1.2.1/contrib/libudfread/src/ecma167.c:68: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(eid->identifier_suffix, p + 24, 8);
data/libbluray-1.2.1/contrib/libudfread/src/ecma167.c:106: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(pvd->volume_set_identifier, p + 72, 128);
data/libbluray-1.2.1/contrib/libudfread/src/ecma167.c: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(lvd->contents_use, p + 248, 16);
data/libbluray-1.2.1/contrib/libudfread/src/ecma167.c:158: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(lvd->partition_map_table, p + 440, map_size);
data/libbluray-1.2.1/contrib/libudfread/src/ecma167.c:193: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(fi->filename, p + 38 + l_iu, fi->filename_len);
data/libbluray-1.2.1/contrib/libudfread/src/ecma167.c:331: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(fe->u.data.content, p + p_ad, l_ad);
data/libbluray-1.2.1/contrib/libudfread/src/udfread.c:121: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(p, s, len + 1);
data/libbluray-1.2.1/contrib/libudfread/src/udfread.c:722: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 volume_set_identifier[128];
data/libbluray-1.2.1/contrib/libudfread/src/udfread.c:1227: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(udf->volume_set_identifier, vds.pvd.volume_set_identifier, 128);
data/libbluray-1.2.1/contrib/libudfread/src/udfread.c:1299:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(buffer, udf->volume_set_identifier, size);
data/libbluray-1.2.1/contrib/libudfread/src/udfread.c:1589: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(buf, p->block + pos_off, chunk_size);
data/libbluray-1.2.1/contrib/libudfread/src/udfread.c:1610:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(buf, p->block, bytes);
data/libbluray-1.2.1/contrib/libudfread/src/udfread.c:1631: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(buf, &p->fe->u.data.content[p->pos], bytes - pad_size);
data/libbluray-1.2.1/player_wrappers/xine/input_bluray.c:410:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char           title_name[64] = "";
data/libbluray-1.2.1/player_wrappers/xine/input_bluray.c:432:5:  [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(title_name, "Top Menu");
data/libbluray-1.2.1/player_wrappers/xine/input_bluray.c:434:5:  [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(title_name, "First Play");
data/libbluray-1.2.1/player_wrappers/xine/input_bluray.c:1173:11:  [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, clip->audio_streams[channel].lang, 4);
data/libbluray-1.2.1/player_wrappers/xine/input_bluray.c:1183: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(data, clip->audio_streams[i].lang, 4);
data/libbluray-1.2.1/player_wrappers/xine/input_bluray.c:1203:11:  [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, clip->pg_streams[channel].lang, 4);
data/libbluray-1.2.1/player_wrappers/xine/input_bluray.c:1213: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(data, clip->pg_streams[i].lang, 4);
data/libbluray-1.2.1/src/devtools/bdjo_dump.c:152: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(&v, p, sizeof(unsigned int));
data/libbluray-1.2.1/src/devtools/hdmv_test.c:186:17:  [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).
        title = atoi(argv[1+args]);
data/libbluray-1.2.1/src/devtools/mobj_dump.c:49:21:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
                    char buf[256];
data/libbluray-1.2.1/src/devtools/mpls_dump.c:688:27:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
                repeats = atoi(optarg);
data/libbluray-1.2.1/src/devtools/mpls_dump.c:698:27:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
                seconds = atoi(optarg);
data/libbluray-1.2.1/src/examples/bd_info.c:41:16:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (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 str[32];
data/libbluray-1.2.1/src/examples/bd_info.c:42:9:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
        sprintf(str, "%d", i);
data/libbluray-1.2.1/src/examples/bd_info.c:60:9:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
        sprintf(str+2*i, "%02X", data[i]);
data/libbluray-1.2.1/src/examples/bd_info.c:82:16:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (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 str[64];
data/libbluray-1.2.1/src/examples/bd_info.c:83:9:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
        sprintf(str, "%dx%d", x, y);
data/libbluray-1.2.1/src/examples/bd_info.c:123:18:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    static const char video_format_str[16][8] = {
data/libbluray-1.2.1/src/examples/bd_info.c:127:18:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    static const char frame_rate_str[16][16] = {
data/libbluray-1.2.1/src/examples/bd_info.c:138:18:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    static const char initial_dynamic_range_type_str[16][16] = {
data/libbluray-1.2.1/src/examples/bdsplice.c:110:25:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
                angle = atoi(optarg);
data/libbluray-1.2.1/src/examples/bdsplice.c:118:28:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
                title_no = atoi(optarg);
data/libbluray-1.2.1/src/examples/bdsplice.c:126:28:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
                playlist = atoi(optarg);
data/libbluray-1.2.1/src/examples/bdsplice.c:174:15:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        out = fopen(dest, "wb");
data/libbluray-1.2.1/src/examples/libbluray_test.c:70:29:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
    if (bd_select_title(bd, atoi(argv[2])) <= 0) {
data/libbluray-1.2.1/src/examples/libbluray_test.c:77:16:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    FILE *fd = fopen("streamdump.m2ts", "wb");
data/libbluray-1.2.1/src/examples/libbluray_test.c:82: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.
            unsigned char buf[6144];
data/libbluray-1.2.1/src/examples/sound_dump.c:67:21:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
      sound_index = atoi(argv[1]);
data/libbluray-1.2.1/src/file/dir_posix.c:55: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[128];
data/libbluray-1.2.1/src/file/dir_win32.c:79:5:  [2] (buffer) wchar_t:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    wchar_t wfilespec[MAX_PATH];
data/libbluray-1.2.1/src/file/dir_win32.c:87:14:  [2] (buffer) MultiByteToWideChar:
  Requires maximum length in CHARACTERS, not bytes (CWE-120).
    result = MultiByteToWideChar(CP_UTF8, MB_ERR_INVALID_CHARS, filespec, -1, wfilespec, MAX_PATH);
data/libbluray-1.2.1/src/file/dirs_win32.c:39:5:  [2] (buffer) wchar_t:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    wchar_t wdir[MAX_PATH];
data/libbluray-1.2.1/src/file/dirs_win32.c:46:14:  [2] (buffer) wcscat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Risk is low because the source is a constant string.
        if (!wcscat(wdir, L"\\fonts")) {
data/libbluray-1.2.1/src/file/dirs_win32.c:70:5:  [2] (buffer) wchar_t:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    wchar_t wdir[MAX_PATH];
data/libbluray-1.2.1/src/file/dirs_win32.c:95:5:  [2] (buffer) wchar_t:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    wchar_t wdir[MAX_PATH];
data/libbluray-1.2.1/src/file/dl_win32.c:38:5:  [2] (buffer) wchar_t:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    wchar_t wbuf[256];
data/libbluray-1.2.1/src/file/dl_win32.c:60:5:  [2] (buffer) wchar_t:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    wchar_t wname[MAX_PATH];
data/libbluray-1.2.1/src/file/dl_win32.c:72:15:  [2] (buffer) MultiByteToWideChar:
  Requires maximum length in CHARACTERS, not bytes (CWE-120).
    iresult = MultiByteToWideChar(CP_UTF8, 0, name, -1, wname, MAX_PATH);
data/libbluray-1.2.1/src/file/dl_win32.c:90:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char buf[128];
data/libbluray-1.2.1/src/file/dl_win32.c:104:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char buf[128];
data/libbluray-1.2.1/src/file/dl_win32.c:128:16:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (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 path[MAX_PATH];
data/libbluray-1.2.1/src/file/dl_win32.c:130:9:  [2] (buffer) wchar_t:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        wchar_t wpath[MAX_PATH];
data/libbluray-1.2.1/src/file/file_posix.c:158:15:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if ((fd = open(filename, flags, mode)) < 0) {
data/libbluray-1.2.1/src/file/file_win32.c:110:5:  [2] (buffer) wchar_t:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    wchar_t wfilename[MAX_PATH], wmode[8];
data/libbluray-1.2.1/src/file/file_win32.c:112:10:  [2] (buffer) MultiByteToWideChar:
  Requires maximum length in CHARACTERS, not bytes (CWE-120).
    if (!MultiByteToWideChar(CP_UTF8, MB_ERR_INVALID_CHARS, filename, -1, wfilename, MAX_PATH) ||
data/libbluray-1.2.1/src/file/file_win32.c:113:10:  [2] (buffer) MultiByteToWideChar:
  Requires maximum length in CHARACTERS, not bytes (CWE-120).
        !MultiByteToWideChar(CP_UTF8, MB_ERR_INVALID_CHARS, mode, -1, wmode, 8)) {
data/libbluray-1.2.1/src/file/file_win32.c:153:5:  [2] (buffer) wchar_t:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    wchar_t wfile[MAX_PATH];
data/libbluray-1.2.1/src/file/file_win32.c:155:10:  [2] (buffer) MultiByteToWideChar:
  Requires maximum length in CHARACTERS, not bytes (CWE-120).
    if (!MultiByteToWideChar(CP_UTF8, 0, file, -1, wfile, MAX_PATH)) {
data/libbluray-1.2.1/src/file/file_win32.c:164:5:  [2] (buffer) wchar_t:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    wchar_t wpath[MAX_PATH];
data/libbluray-1.2.1/src/file/file_win32.c:166:10:  [2] (buffer) MultiByteToWideChar:
  Requires maximum length in CHARACTERS, not bytes (CWE-120).
    if (!MultiByteToWideChar(CP_UTF8, 0, path, -1, wpath, MAX_PATH)) {
data/libbluray-1.2.1/src/file/file_win32.c:179:5:  [2] (buffer) wchar_t:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    wchar_t wdir[MAX_PATH];
data/libbluray-1.2.1/src/file/file_win32.c:181:10:  [2] (buffer) MultiByteToWideChar:
  Requires maximum length in CHARACTERS, not bytes (CWE-120).
    if (!MultiByteToWideChar(CP_UTF8, 0, dir, -1, wdir, MAX_PATH)) {
data/libbluray-1.2.1/src/file/filesystem.h:53:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char    d_name[256];
data/libbluray-1.2.1/src/file/mount.c:53:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char buf [8192];
data/libbluray-1.2.1/src/file/mount_darwin.c:49:21:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (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_path[PATH_MAX];
data/libbluray-1.2.1/src/libbluray/bdj/bdj.c:112: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 java_home[256] = "";
data/libbluray-1.2.1/src/libbluray/bdj/bdj.c:114:5:  [2] (buffer) wchar_t:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    wchar_t buf_loc[4096] = L"SOFTWARE\\JavaSoft\\Java Runtime Environment\\";
data/libbluray-1.2.1/src/libbluray/bdj/bdj.c:115:5:  [2] (buffer) wchar_t:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    wchar_t buf_vers[128];
data/libbluray-1.2.1/src/libbluray/bdj/bdj.c:116:5:  [2] (buffer) wchar_t:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    wchar_t java_path[4096] = L"";
data/libbluray-1.2.1/src/libbluray/bdj/bdj.c:117: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 strbuf[256];
data/libbluray-1.2.1/src/libbluray/bdj/bdj.c:128:9:  [2] (buffer) wcscpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using a function version that stops copying at the end
  of the buffer. Risk is low because the source is a constant string.
        wcscpy(buf_loc, L"SOFTWARE\\JavaSoft\\JRE\\");
data/libbluray-1.2.1/src/libbluray/bdj/bdj.c:169:9:  [2] (buffer) wcscat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Risk is low because the source is a constant string.
        wcscat(java_path, L"\\bin");
data/libbluray-1.2.1/src/libbluray/bdj/bdj.c:200:16:  [2] (buffer) MultiByteToWideChar:
  Requires maximum length in CHARACTERS, not bytes (CWE-120).
    int wlen = MultiByteToWideChar(CP_UTF8, 0, utf8, -1, NULL, 0);
data/libbluray-1.2.1/src/libbluray/bdj/bdj.c:209:10:  [2] (buffer) MultiByteToWideChar:
  Requires maximum length in CHARACTERS, not bytes (CWE-120).
    if (!MultiByteToWideChar(CP_UTF8, 0, utf8, -1, wide, wlen)) {
data/libbluray-1.2.1/src/libbluray/bdj/bdj.c:242: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 result[PATH_MAX] = "";
data/libbluray-1.2.1/src/libbluray/bdj/bdj.c:255:29:  [2] (race) vfork:
  On some old systems, vfork() permits race conditions, and it's very
  difficult to use correctly (CWE-362). Use fork() instead.
    switch (java_home_pid = vfork())
data/libbluray-1.2.1/src/libbluray/bdj/bdj.c:845:45:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (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 int _create_jvm(void *jvm_lib, const char *java_home, const char *jar_file[2],
data/libbluray-1.2.1/src/libbluray/bdj/bdj.c:845:68:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (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 int _create_jvm(void *jvm_lib, const char *java_home, const char *jar_file[2],
data/libbluray-1.2.1/src/libbluray/bdj/bdj.c:1013:11:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    const char *jar[2] = { cfg->classpath[0], cfg->classpath[1] };
data/libbluray-1.2.1/src/libbluray/bdj/bdj.h:70: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 *classpath[2];      /* BD-J implementation class path (location of libbluray.jar) */
data/libbluray-1.2.1/src/libbluray/bdj/bdjo_data.h:27: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    default_font[6];         // default AWT font. AUXDATA/?????.otf. "*****" = none.
data/libbluray-1.2.1/src/libbluray/bdj/bdjo_data.h:35: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    ref_to_name[6];   // JAR/xxxxx.jar or JAR/xxxxx/
data/libbluray-1.2.1/src/libbluray/bdj/bdjo_data.h:36: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    lang_code[4];     // ref. to PSR18. "*.*" = cache always. "%%%" = fallback when no language matches PSR18.
data/libbluray-1.2.1/src/libbluray/bdj/bdjo_data.h:45:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char     name[6];
data/libbluray-1.2.1/src/libbluray/bdj/bdjo_data.h:64:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char  lang[4];
data/libbluray-1.2.1/src/libbluray/bdj/native/java_awt_BDFontMetrics.c:83:5:  [2] (buffer) wchar_t:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    wchar_t        wvalue[MAX_PATH];
data/libbluray-1.2.1/src/libbluray/bdj/native/java_awt_BDFontMetrics.c:84:5:  [2] (buffer) wchar_t:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    wchar_t        wdata[256];
data/libbluray-1.2.1/src/libbluray/bdj/native/java_awt_BDFontMetrics.c:142:18:  [2] (buffer) MultiByteToWideChar:
  Requires maximum length in CHARACTERS, not bytes (CWE-120).
    int length = MultiByteToWideChar(CP_UTF8, 0, family, -1, lf.lfFaceName, LF_FACESIZE);
data/libbluray-1.2.1/src/libbluray/bdnav/bdid_parse.h:28:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char org_id[9];
data/libbluray-1.2.1/src/libbluray/bdnav/bdid_parse.h:29: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 disc_id[33];
data/libbluray-1.2.1/src/libbluray/bdnav/clpi_data.h:51: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              format_id[5];
data/libbluray-1.2.1/src/libbluray/bdnav/clpi_data.h: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              file_id[6];
data/libbluray-1.2.1/src/libbluray/bdnav/clpi_data.h:58: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_code[5];
data/libbluray-1.2.1/src/libbluray/bdnav/clpi_data.h:62: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_id[6];
data/libbluray-1.2.1/src/libbluray/bdnav/clpi_data.h:92: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              lang[4];
data/libbluray-1.2.1/src/libbluray/bdnav/clpi_parse.c:860: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(dest_cl->clip.ts_type_info.format_id, src_cl->clip.ts_type_info.format_id, 5);
data/libbluray-1.2.1/src/libbluray/bdnav/clpi_parse.c:867: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(dest_cl->clip.atc_delta[ii].file_id, src_cl->clip.atc_delta[ii].file_id, 6);
data/libbluray-1.2.1/src/libbluray/bdnav/clpi_parse.c:868: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(dest_cl->clip.atc_delta[ii].file_code, src_cl->clip.atc_delta[ii].file_code, 5);
data/libbluray-1.2.1/src/libbluray/bdnav/clpi_parse.c:918:17:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                memcpy(dest_cl->program.progs[ii].streams[jj].lang,src_cl->program.progs[ii].streams[jj].lang,4);
data/libbluray-1.2.1/src/libbluray/bdnav/clpi_parse.c:919:17:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                memcpy(dest_cl->program.progs[ii].streams[jj].isrc,src_cl->program.progs[ii].streams[jj].isrc,12);
data/libbluray-1.2.1/src/libbluray/bdnav/clpi_parse.c:961: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(dest_cl->clip.font_info.font, src_cl->clip.font_info.font, dest_cl->clip.font_info.font_count * sizeof(CLPI_FONT));
data/libbluray-1.2.1/src/libbluray/bdnav/index_parse.h:84:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char               name[6];
data/libbluray-1.2.1/src/libbluray/bdnav/meta_data.h:37: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                 language_code[4];
data/libbluray-1.2.1/src/libbluray/bdnav/meta_parse.c:81:44:  [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).
                    disclib->di_num_sets = atoi((char*)(tmp = xmlNodeGetContent(cur_node)));
data/libbluray-1.2.1/src/libbluray/bdnav/meta_parse.c:85:46:  [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).
                    disclib->di_set_number = atoi((char*)(tmp = xmlNodeGetContent(cur_node)));
data/libbluray-1.2.1/src/libbluray/bdnav/meta_parse.c:96:64:  [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).
                        disclib->toc_entries[i].title_number = atoi((const char*)tmp);
data/libbluray-1.2.1/src/libbluray/bdnav/meta_parse.c:197:52:  [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).
                    meta->tn_entries[i].playlist = atoi(ent.d_name + 9);
data/libbluray-1.2.1/src/libbluray/bdnav/meta_parse.h:33: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                 language_code[4];
data/libbluray-1.2.1/src/libbluray/bdnav/mpls_data.h:45: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            lang[4];
data/libbluray-1.2.1/src/libbluray/bdnav/mpls_data.h:77: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            clip_id[6];
data/libbluray-1.2.1/src/libbluray/bdnav/mpls_data.h:78: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            codec_id[5];
data/libbluray-1.2.1/src/libbluray/bdnav/mpls_parse.c:442:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char clip_id[6], codec_id[5];
data/libbluray-1.2.1/src/libbluray/bdnav/mpls_parse.c:548: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 clip_id[6], codec_id[5];
data/libbluray-1.2.1/src/libbluray/bdnav/navigation.c:483: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(title_list->title_info[ii].name, ent.d_name, 10);
data/libbluray-1.2.1/src/libbluray/bdnav/navigation.c:486:51:  [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).
            title_list->title_info[ii].mpls_id  = atoi(ent.d_name);
data/libbluray-1.2.1/src/libbluray/bdnav/navigation.c:644: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(clip->name, mpls_clip[clip->angle].clip_id, 5);
data/libbluray-1.2.1/src/libbluray/bdnav/navigation.c:646: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(&clip->name[5], ".fmts", 6);
data/libbluray-1.2.1/src/libbluray/bdnav/navigation.c:648: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(&clip->name[5], ".m2ts", 6);
data/libbluray-1.2.1/src/libbluray/bdnav/navigation.c:649:21:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
    clip->clip_id = atoi(mpls_clip[clip->angle].clip_id);
data/libbluray-1.2.1/src/libbluray/bdnav/navigation.h:67:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char     name[11];
data/libbluray-1.2.1/src/libbluray/bdnav/navigation.h:110:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char          name[11];
data/libbluray-1.2.1/src/libbluray/bdnav/navigation.h:129:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char            name[11];
data/libbluray-1.2.1/src/libbluray/bluray.c:279:52:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        if (preferred_lang == str_to_uint32((const char *)streams[ii].lang, 3)) {
data/libbluray-1.2.1/src/libbluray/bluray.c:294:40:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    stream_lang = str_to_uint32((const char *)streams[stream_idx].lang, 3);
data/libbluray-1.2.1/src/libbluray/bluray.c:364:42:  [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).
    bd_psr_write(bd->regs, PSR_PLAYLIST, atoi(bd->title->name));
data/libbluray-1.2.1/src/libbluray/bluray.c:941: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(bd->disc_info.disc_id, enc_info->disc_id, 20);
data/libbluray-1.2.1/src/libbluray/bluray.c:1022:42:  [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).
                titles[ii + 1]->id_ref = atoi(index->titles[ii].bdj.name);
data/libbluray-1.2.1/src/libbluray/bluray.c:1034:53:  [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).
            titles[index->num_titles + 1]->id_ref = atoi(pi->bdj.name);
data/libbluray-1.2.1/src/libbluray/bluray.c:1046:33:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
            titles[0]->id_ref = atoi(pi->bdj.name);
data/libbluray-1.2.1/src/libbluray/bluray.c:1160: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(&mask.mask, &bd->uo_mask, sizeof(BD_UO_MASK));
data/libbluray-1.2.1/src/libbluray/bluray.c:1441:72:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
        int v = (!strcmp(env, "yes")) ? 1 : (!strcmp(env, "no")) ? 0 : atoi(env);
data/libbluray-1.2.1/src/libbluray/bluray.c:2047: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(buf, bd->int_buf + st->int_buf_off, size);
data/libbluray-1.2.1/src/libbluray/bluray.c:2647: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(streams[ii].lang, si[ii].lang, 4);
data/libbluray-1.2.1/src/libbluray/bluray.c:2953:30:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
    unsigned int title_num = atoi(start_object);
data/libbluray-1.2.1/src/libbluray/bluray.h:97: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 bdj_org_id[9];        /* (BD-J) disc organization ID */
data/libbluray-1.2.1/src/libbluray/bluray.h:98: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 bdj_disc_id[33];      /* (BD-J) disc ID */
data/libbluray-1.2.1/src/libbluray/bluray.h:255: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               clip_id[6];
data/libbluray-1.2.1/src/libbluray/decoders/graphics_processor.c:128: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(p1->buf + p1->len, p2->buf + data_pos, p2->len - data_pos);
data/libbluray-1.2.1/src/libbluray/decoders/m2ts_demux.c:121: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(p->buf + p->len, buf, len);
data/libbluray-1.2.1/src/libbluray/decoders/m2ts_demux.c:191: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(p->buf, buf + hdr_len, p->len);
data/libbluray-1.2.1/src/libbluray/decoders/overlay.h:98: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(ov, src, sizeof(*ov));
data/libbluray-1.2.1/src/libbluray/decoders/overlay.h:101: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((void*)ov->palette, src->palette, 256 * sizeof(BD_PG_PALETTE_ENTRY));
data/libbluray-1.2.1/src/libbluray/decoders/textst_render.c:345:17:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                memcpy(style, base_style, sizeof(*style));
data/libbluray-1.2.1/src/libbluray/decoders/textst_render.c:422: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(&style_tmp, &s, sizeof(s)); /* use copy in first pass */
data/libbluray-1.2.1/src/libbluray/disc/aacs.c:172: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).
    fptr_p_void open;
data/libbluray-1.2.1/src/libbluray/disc/aacs.c:181: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).
    *(void **)(&open)  = dl_dlsym(p->h_libaacs, "aacs_open");
data/libbluray-1.2.1/src/libbluray/disc/aacs.c:204:16:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    } else if (open) {
data/libbluray-1.2.1/src/libbluray/disc/aacs.c:206: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).
        p->aacs = open(device, keyfile_path);
data/libbluray-1.2.1/src/libbluray/disc/dec.c:193: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(i->disc_id, disc_id, 20);
data/libbluray-1.2.1/src/libbluray/disc/disc.c:610: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     id_type, id_str[41];
data/libbluray-1.2.1/src/libbluray/disc/disc.c:696:56:  [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).
        BD_FILE_H *st = dec_open_stream(disc->dec, fp, atoi(file));
data/libbluray-1.2.1/src/libbluray/disc/disc.c:770: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(&k1, in + i,     sizeof(uint64_t));
data/libbluray-1.2.1/src/libbluray/disc/disc.c:771: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(&k2, in + i + 8, sizeof(uint64_t));
data/libbluray-1.2.1/src/libbluray/disc/disc.c:794: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(out, h, 2*sizeof(uint64_t));
data/libbluray-1.2.1/src/libbluray/hdmv/hdmv_vm.c:972:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char buf[384], *dst = buf;
data/libbluray-1.2.1/src/libbluray/hdmv/hdmv_vm.c:974:16:  [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.
        dst += sprintf(dst, "%04d:  ", pc);
data/libbluray-1.2.1/src/libbluray/hdmv/hdmv_vm.c:987:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            char buf[384], *dst = buf;
data/libbluray-1.2.1/src/libbluray/hdmv/hdmv_vm.c:989:20:  [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.
            dst += sprintf(dst, "    :  [");
data/libbluray-1.2.1/src/libbluray/hdmv/hdmv_vm.c:991:24:  [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.
                dst += sprintf(dst, " dst 0x%x <== 0x%x ", orig_dst, new_dst);
data/libbluray-1.2.1/src/libbluray/hdmv/hdmv_vm.c:994:24:  [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.
                dst += sprintf(dst, " src 0x%x <== 0x%x ", orig_src, new_src);
data/libbluray-1.2.1/src/libbluray/hdmv/hdmv_vm.c:1246: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(ig_object->cmds, nav_cmds, num_nav_cmds * sizeof(MOBJ_CMD));
data/libbluray-1.2.1/src/libbluray/hdmv/mobj_print.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 * const psr_info[128] = {
data/libbluray-1.2.1/src/libbluray/hdmv/mobj_print.c:163: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 * const insn_groups[4] = {
data/libbluray-1.2.1/src/libbluray/hdmv/mobj_print.c:169: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 * const insn_group_branch[8] = {
data/libbluray-1.2.1/src/libbluray/hdmv/mobj_print.c:175: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 * const insn_group_set[8] = {
data/libbluray-1.2.1/src/libbluray/hdmv/mobj_print.c:181: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 * const insn_opt_set[32] = {
data/libbluray-1.2.1/src/libbluray/hdmv/mobj_print.c:200: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 * const insn_opt_setsys[32] = {
data/libbluray-1.2.1/src/libbluray/hdmv/mobj_print.c:220: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 * const insn_opt_cmp[16] = {
data/libbluray-1.2.1/src/libbluray/hdmv/mobj_print.c:231: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 * const insn_opt_goto[16] = {
data/libbluray-1.2.1/src/libbluray/hdmv/mobj_print.c:237: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 * const insn_opt_jump[16] = {
data/libbluray-1.2.1/src/libbluray/hdmv/mobj_print.c:245: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 * const insn_opt_play[16] = {
data/libbluray-1.2.1/src/libbluray/hdmv/mobj_print.c:260:20:  [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.
            buf += sprintf(buf, "PSR%-3u", op & 0x7f);
data/libbluray-1.2.1/src/libbluray/hdmv/mobj_print.c:263:20:  [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.
            buf += sprintf(buf, "r%-5u", op & 0xfff);
data/libbluray-1.2.1/src/libbluray/hdmv/mobj_print.c:267:20:  [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.
            buf += sprintf(buf, "%-6u", op);
data/libbluray-1.2.1/src/libbluray/hdmv/mobj_print.c:269:20:  [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.
            buf += sprintf(buf, "0x%-4x", op);
data/libbluray-1.2.1/src/libbluray/hdmv/mobj_print.c:285:20:  [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.
            buf += sprintf(buf, ",\t");
data/libbluray-1.2.1/src/libbluray/hdmv/mobj_print.c:288:20:  [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.
            buf += sprintf(buf, " \t      ");
data/libbluray-1.2.1/src/libbluray/hdmv/mobj_print.c:291:16:  [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.
        buf += sprintf(buf, "       \t      ");
data/libbluray-1.2.1/src/libbluray/hdmv/mobj_print.c:308:16:  [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.
        buf += sprintf(buf, "0x%-4x", cmd->dst);
data/libbluray-1.2.1/src/libbluray/hdmv/mobj_print.c:311:16:  [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.
        buf += sprintf(buf,  ",\t0x%-4x", cmd->src);
data/libbluray-1.2.1/src/libbluray/hdmv/mobj_print.c:332:12:  [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.
    buf += sprintf(buf, "%08x %08x,%08x  ", _cmd_to_u32(&cmd->insn), cmd->dst, cmd->src);
data/libbluray-1.2.1/src/libbluray/hdmv/mobj_print.c:342:30:  [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.
                      buf += sprintf(buf, "[unknown BRANCH/GOTO option in opcode 0x%08x] ", *(uint32_t*)insn);
data/libbluray-1.2.1/src/libbluray/hdmv/mobj_print.c:350:28:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
                    buf += sprintf(buf, "[unknown BRANCH/JUMP option in opcode 0x%08x] ", *(uint32_t*)insn);
data/libbluray-1.2.1/src/libbluray/hdmv/mobj_print.c:358:28:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
                    buf += sprintf(buf, "[unknown BRANCH/PLAY option in opcode 0x%08x] ", *(uint32_t*)insn);
data/libbluray-1.2.1/src/libbluray/hdmv/mobj_print.c:362:24:  [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.
                buf += sprintf(buf, "[unknown BRANCH subgroup in opcode 0x%08x] ", *(uint32_t*)insn);
data/libbluray-1.2.1/src/libbluray/hdmv/mobj_print.c:372:24:  [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.
                buf += sprintf(buf, "[unknown COMPARE option in opcode 0x%08x] ", *(uint32_t*)insn);
data/libbluray-1.2.1/src/libbluray/hdmv/mobj_print.c:383:32:  [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.
                        buf += sprintf(buf, "[unknown SET option in opcode 0x%08x] ", *(uint32_t*)insn);
data/libbluray-1.2.1/src/libbluray/hdmv/mobj_print.c:398:28:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
                    buf += sprintf(buf, "[unknown SETSYSTEM option in opcode 0x%08x] ", *(uint32_t*)insn);
data/libbluray-1.2.1/src/libbluray/hdmv/mobj_print.c:402:24:  [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.
                buf += sprintf(buf, "[unknown SET subgroup in opcode 0x%08x] ", *(uint32_t*)insn);
data/libbluray-1.2.1/src/libbluray/hdmv/mobj_print.c:408:20:  [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.
            buf += sprintf(buf, "[unknown group in opcode 0x%08x] ", *(uint32_t*)insn);
data/libbluray-1.2.1/src/libbluray/register.c:128: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 * const bd_psr_name[BD_PSR_COUNT] = {
data/libbluray-1.2.1/src/libbluray/register.c:187: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(p->psr, bd_psr_init, sizeof(bd_psr_init));
data/libbluray-1.2.1/src/libbluray/register.c:282: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(p->psr + 36, p->psr + 4,  sizeof(uint32_t) * 5);
data/libbluray-1.2.1/src/libbluray/register.c:283: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(p->psr + 42, p->psr + 10, sizeof(uint32_t) * 3);
data/libbluray-1.2.1/src/libbluray/register.c:308: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(p->psr + 36, bd_psr_init + 36, sizeof(uint32_t) * 5);
data/libbluray-1.2.1/src/libbluray/register.c:309: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(p->psr + 42, bd_psr_init + 42, sizeof(uint32_t) * 3);
data/libbluray-1.2.1/src/libbluray/register.c:322: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(old_psr, p->psr, sizeof(old_psr[0]) * 13);
data/libbluray-1.2.1/src/libbluray/register.c:326: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(p->psr + 4,  p->psr + 36, sizeof(uint32_t) * 5);
data/libbluray-1.2.1/src/libbluray/register.c:327: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(p->psr + 10, p->psr + 42, sizeof(uint32_t) * 3);
data/libbluray-1.2.1/src/libbluray/register.c:330:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(new_psr, p->psr, sizeof(new_psr[0]) * 13);
data/libbluray-1.2.1/src/libbluray/register.c:334: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(p->psr + 36, bd_psr_init + 36, sizeof(uint32_t) * 5);
data/libbluray-1.2.1/src/libbluray/register.c:335: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(p->psr + 42, bd_psr_init + 42, sizeof(uint32_t) * 3);
data/libbluray-1.2.1/src/libbluray/register.c:490: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(gpr, p->gpr, sizeof(p->gpr));
data/libbluray-1.2.1/src/libbluray/register.c:491: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(psr, p->psr, sizeof(p->psr));
data/libbluray-1.2.1/src/libbluray/register.c:505:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(new_psr, p->psr, sizeof(new_psr[0]) * 13);
data/libbluray-1.2.1/src/util/event_queue.c:40: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 ev[1];
data/libbluray-1.2.1/src/util/event_queue.c:72: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(ev, &eq->ev[eq->out * eq->event_size], eq->event_size);
data/libbluray-1.2.1/src/util/event_queue.c:94: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(&eq->ev[eq->in * eq->event_size], ev, eq->event_size);
data/libbluray-1.2.1/src/util/logging.c:72:24:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
            FILE *fp = fopen(env, "wb");
data/libbluray-1.2.1/src/util/logging.c:85: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 buffer[4096];
data/libbluray-1.2.1/src/util/strutl.c:43: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(dup, str, size);
data/libbluray-1.2.1/src/util/strutl.c:117: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(out + (zz * 2), "%02x", buf[zz]);
data/libbluray-1.2.1/contrib/libudfread/src/blockinput.h:46:16:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    int      (*read)  (udfread_block_input *, uint32_t lba, void *buf, uint32_t nblocks, int flags);
data/libbluray-1.2.1/contrib/libudfread/src/default_blockinput.c:91:18:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        result = read(fd, buf, count);
data/libbluray-1.2.1/contrib/libudfread/src/udfread.c:118:18:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    size_t len = strlen(s);
data/libbluray-1.2.1/contrib/libudfread/src/udfread.c:223:45:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    return (!memcmp(value, eid->identifier, strlen(value))) ? 0 : -1;
data/libbluray-1.2.1/contrib/libudfread/src/udfread.c:250:21:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    result = input->read(input, lba, buf, nblocks, flags);
data/libbluray-1.2.1/contrib/libudfread/src/udfread.c:1206:35:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    if (!udf || !input || !input->read) {
data/libbluray-1.2.1/player_wrappers/xine/input_bluray.c:425:15:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
          if (strlen(this->meta_dl->toc_entries[i].title_name) > 2)
data/libbluray-1.2.1/player_wrappers/xine/input_bluray.c:426:13:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
            strncpy(title_name, this->meta_dl->toc_entries[i].title_name, sizeof(title_name));
data/libbluray-1.2.1/player_wrappers/xine/input_bluray.c:1292:11:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  if (mrl[strlen(mrl)-1] != '/') {
data/libbluray-1.2.1/player_wrappers/xine/input_bluray.c:1466:50:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  if (this->meta_dl && this->meta_dl->di_name && strlen(this->meta_dl->di_name) > 1) {
data/libbluray-1.2.1/player_wrappers/xine/input_bluray.c:1476: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).
    char *end = this->disc_name + strlen(this->disc_name) - 1;
data/libbluray-1.2.1/src/devtools/mpls_dump.c:81: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 n1 = strlen(base);
data/libbluray-1.2.1/src/devtools/mpls_dump.c:82: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 n2 = strlen(sub);
data/libbluray-1.2.1/src/devtools/mpls_dump.c:83: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).
    char *result = (char*)malloc(n1 + n2 + strlen(DIR_SEP) + 1);
data/libbluray-1.2.1/src/devtools/mpls_dump.c:747:41:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                char *s = (char*)malloc(strlen(ent->d_name) + 1);
data/libbluray-1.2.1/src/devtools/util.h:33:26:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
#   define getc_unlocked getc
data/libbluray-1.2.1/src/file/dir_posix.c:57:9:  [1] (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 character.
        strcpy(buf, "?");
data/libbluray-1.2.1/src/file/dir_posix.c:87:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(entry->d_name, p_e->d_name, sizeof(entry->d_name));
data/libbluray-1.2.1/src/file/dirs_win32.c:54:31:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    char *path = malloc(len + strlen(font_file) + 2);
data/libbluray-1.2.1/src/file/dirs_xdg.c:100: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).
            dirs = calloc(1, strlen(xdg_sys) + 2);
data/libbluray-1.2.1/src/file/dirs_xdg.c:121: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).
        dir += strlen(dir) + 1;
data/libbluray-1.2.1/src/file/file.h:63:24:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    return (size_t)fp->read(fp, buf, (int64_t)size);
data/libbluray-1.2.1/src/file/file.h:78:26:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
#define dir_read(X,Y) X->read(X,Y)
data/libbluray-1.2.1/src/file/file_posix.c:93:18:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        result = read((int)(intptr_t)file->internal, buf + got, size - got);
data/libbluray-1.2.1/src/file/filesystem.h:42:15:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    int64_t (*read)  (BD_FILE_H *file, uint8_t *buf, int64_t size);
data/libbluray-1.2.1/src/file/filesystem.h:61:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    int (*read)(BD_DIR_H *dir, BD_DIRENT *entry);
data/libbluray-1.2.1/src/libbluray/bdj/bdj.c:277:25:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                int n = read(fd[0], result + len, sizeof result - len);
data/libbluray-1.2.1/src/libbluray/bdj/bdj.c:517:25:  [1] (buffer) strlen:
  Does not handle 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 cp_len = strlen(classpath);
data/libbluray-1.2.1/src/libbluray/bdj/bdj.c:578: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).
    cut = (int)strlen(jar0) - (int)strlen(VERSION) - 9;
data/libbluray-1.2.1/src/libbluray/bdj/bdj.c:578:36:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    cut = (int)strlen(jar0) - (int)strlen(VERSION) - 9;
data/libbluray-1.2.1/src/libbluray/bdj/native/org_videolan_Libbluray.c:239:21:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        data_size = strlen((const char*)data);
data/libbluray-1.2.1/src/libbluray/bdnav/meta_parse.c:173:17:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
                strncpy(meta->dl_entries[i].language_code, ent.d_name+5,3);
data/libbluray-1.2.1/src/libbluray/bdnav/meta_parse.c:187:61:  [1] (buffer) strlen:
  Does not handle 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 (strncasecmp(ent.d_name, "tnmt_", 5) == 0 && strlen(ent.d_name) == 18 ) {
data/libbluray-1.2.1/src/libbluray/bdnav/meta_parse.c:196:21:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
                    strncpy(meta->tn_entries[i].language_code, ent.d_name + 5, 3);
data/libbluray-1.2.1/src/libbluray/bdnav/navigation.c:742:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(title->name, playlist, 11);
data/libbluray-1.2.1/src/libbluray/disc/bdplus.c:297:52:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
void libbdplus_psr(BD_BDPLUS *p, void *regs, void *read, void *write)
data/libbluray-1.2.1/src/libbluray/disc/bdplus.c:300:62:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        DL_CALL(p->h_libbdplus, bdplus_psr, p->bdplus, regs, read, write);
data/libbluray-1.2.1/src/libbluray/disc/bdplus.h:42:63:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
BD_PRIVATE void libbdplus_psr(BD_BDPLUS *p, void *regs, void *read, void *write);
data/libbluray-1.2.1/src/libbluray/disc/dec.c:63:22:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    result = st->fp->read(st->fp, buf, size);
data/libbluray-1.2.1/src/libbluray/disc/disc.c:289:54:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        if (!disc_root || (disc_root[0] && disc_root[strlen(disc_root) - 1] == DIR_SEP_CHAR)) {
data/libbluray-1.2.1/src/libbluray/disc/disc.c:541:12:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    size = strlen(rel_path);
data/libbluray-1.2.1/src/libbluray/disc/disc.c:584:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    size_t size = strlen(rel_path);
data/libbluray-1.2.1/src/libbluray/disc/properties.c:107:12:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    size = strlen(data);
data/libbluray-1.2.1/src/libbluray/disc/properties.c:142: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).
    size_t key_size = strlen(key);
data/libbluray-1.2.1/src/libbluray/disc/properties.c:148:53:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            *data_size = lf ? (size_t)(lf - data) : strlen(data);
data/libbluray-1.2.1/src/libbluray/disc/udf_fs.c:118:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(entry->d_name, e.d_name, sizeof(entry->d_name));
data/libbluray-1.2.1/src/libbluray/hdmv/hdmv_vm.c:996:24:  [1] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source is a constant character.
            /*dst +=*/ sprintf(dst, "]");
data/libbluray-1.2.1/src/util/strutl.c:40: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).
        size_t size = strlen(str) + 1;

ANALYSIS SUMMARY:

Hits = 337
Lines analyzed = 41997 in approximately 1.49 seconds (28136 lines/second)
Physical Source Lines of Code (SLOC) = 28510
Hits@level = [0] 202 [1]  48 [2] 219 [3]  35 [4]  35 [5]   0
Hits@level+ = [0+] 539 [1+] 337 [2+] 289 [3+]  70 [4+]  35 [5+]   0
Hits/KSLOC@level+ = [0+] 18.9056 [1+] 11.8204 [2+] 10.1368 [3+] 2.45528 [4+] 1.22764 [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.