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/x265-3.4/source/abrEncApp.cpp
Examining data/x265-3.4/source/abrEncApp.h
Examining data/x265-3.4/source/common/aarch64/asm-primitives.cpp
Examining data/x265-3.4/source/common/aarch64/ipfilter8.h
Examining data/x265-3.4/source/common/aarch64/pixel-util.h
Examining data/x265-3.4/source/common/aarch64/pixel.h
Examining data/x265-3.4/source/common/arm/asm-primitives.cpp
Examining data/x265-3.4/source/common/arm/blockcopy8.h
Examining data/x265-3.4/source/common/arm/dct8.h
Examining data/x265-3.4/source/common/arm/intrapred.h
Examining data/x265-3.4/source/common/arm/ipfilter8.h
Examining data/x265-3.4/source/common/arm/loopfilter.h
Examining data/x265-3.4/source/common/arm/mc.h
Examining data/x265-3.4/source/common/arm/pixel-util.h
Examining data/x265-3.4/source/common/arm/pixel.h
Examining data/x265-3.4/source/common/bitstream.cpp
Examining data/x265-3.4/source/common/bitstream.h
Examining data/x265-3.4/source/common/common.cpp
Examining data/x265-3.4/source/common/common.h
Examining data/x265-3.4/source/common/constants.cpp
Examining data/x265-3.4/source/common/constants.h
Examining data/x265-3.4/source/common/contexts.h
Examining data/x265-3.4/source/common/cpu.cpp
Examining data/x265-3.4/source/common/cpu.h
Examining data/x265-3.4/source/common/cudata.cpp
Examining data/x265-3.4/source/common/cudata.h
Examining data/x265-3.4/source/common/dct.cpp
Examining data/x265-3.4/source/common/deblock.cpp
Examining data/x265-3.4/source/common/deblock.h
Examining data/x265-3.4/source/common/frame.cpp
Examining data/x265-3.4/source/common/frame.h
Examining data/x265-3.4/source/common/framedata.cpp
Examining data/x265-3.4/source/common/framedata.h
Examining data/x265-3.4/source/common/intrapred.cpp
Examining data/x265-3.4/source/common/ipfilter.cpp
Examining data/x265-3.4/source/common/loopfilter.cpp
Examining data/x265-3.4/source/common/lowpassdct.cpp
Examining data/x265-3.4/source/common/lowres.cpp
Examining data/x265-3.4/source/common/lowres.h
Examining data/x265-3.4/source/common/md5.cpp
Examining data/x265-3.4/source/common/md5.h
Examining data/x265-3.4/source/common/mv.h
Examining data/x265-3.4/source/common/param.cpp
Examining data/x265-3.4/source/common/param.h
Examining data/x265-3.4/source/common/piclist.cpp
Examining data/x265-3.4/source/common/piclist.h
Examining data/x265-3.4/source/common/picyuv.cpp
Examining data/x265-3.4/source/common/picyuv.h
Examining data/x265-3.4/source/common/pixel.cpp
Examining data/x265-3.4/source/common/ppc/dct_altivec.cpp
Examining data/x265-3.4/source/common/ppc/intrapred_altivec.cpp
Examining data/x265-3.4/source/common/ppc/ipfilter_altivec.cpp
Examining data/x265-3.4/source/common/ppc/pixel_altivec.cpp
Examining data/x265-3.4/source/common/ppc/ppccommon.h
Examining data/x265-3.4/source/common/predict.cpp
Examining data/x265-3.4/source/common/predict.h
Examining data/x265-3.4/source/common/primitives.cpp
Examining data/x265-3.4/source/common/primitives.h
Examining data/x265-3.4/source/common/quant.cpp
Examining data/x265-3.4/source/common/quant.h
Examining data/x265-3.4/source/common/scaler.cpp
Examining data/x265-3.4/source/common/scaler.h
Examining data/x265-3.4/source/common/scalinglist.cpp
Examining data/x265-3.4/source/common/scalinglist.h
Examining data/x265-3.4/source/common/shortyuv.cpp
Examining data/x265-3.4/source/common/shortyuv.h
Examining data/x265-3.4/source/common/slice.cpp
Examining data/x265-3.4/source/common/slice.h
Examining data/x265-3.4/source/common/threading.cpp
Examining data/x265-3.4/source/common/threading.h
Examining data/x265-3.4/source/common/threadpool.cpp
Examining data/x265-3.4/source/common/threadpool.h
Examining data/x265-3.4/source/common/vec/dct-sse3.cpp
Examining data/x265-3.4/source/common/vec/dct-sse41.cpp
Examining data/x265-3.4/source/common/vec/dct-ssse3.cpp
Examining data/x265-3.4/source/common/vec/vec-primitives.cpp
Examining data/x265-3.4/source/common/version.cpp
Examining data/x265-3.4/source/common/wavefront.cpp
Examining data/x265-3.4/source/common/wavefront.h
Examining data/x265-3.4/source/common/winxp.cpp
Examining data/x265-3.4/source/common/winxp.h
Examining data/x265-3.4/source/common/x86/asm-primitives.cpp
Examining data/x265-3.4/source/common/x86/blockcopy8.h
Examining data/x265-3.4/source/common/x86/dct8.h
Examining data/x265-3.4/source/common/x86/intrapred.h
Examining data/x265-3.4/source/common/x86/ipfilter8.h
Examining data/x265-3.4/source/common/x86/loopfilter.h
Examining data/x265-3.4/source/common/x86/mc.h
Examining data/x265-3.4/source/common/x86/pixel-util.h
Examining data/x265-3.4/source/common/x86/pixel.h
Examining data/x265-3.4/source/common/x86/seaintegral.h
Examining data/x265-3.4/source/common/yuv.cpp
Examining data/x265-3.4/source/common/yuv.h
Examining data/x265-3.4/source/compat/getopt/getopt.c
Examining data/x265-3.4/source/compat/getopt/getopt.h
Examining data/x265-3.4/source/compat/msvc/stdint.h
Examining data/x265-3.4/source/dynamicHDR10/BasicStructures.h
Examining data/x265-3.4/source/dynamicHDR10/JsonHelper.cpp
Examining data/x265-3.4/source/dynamicHDR10/JsonHelper.h
Examining data/x265-3.4/source/dynamicHDR10/SeiMetadataDictionary.cpp
Examining data/x265-3.4/source/dynamicHDR10/SeiMetadataDictionary.h
Examining data/x265-3.4/source/dynamicHDR10/api.cpp
Examining data/x265-3.4/source/dynamicHDR10/hdr10plus.h
Examining data/x265-3.4/source/dynamicHDR10/json11/json11.cpp
Examining data/x265-3.4/source/dynamicHDR10/json11/json11.h
Examining data/x265-3.4/source/dynamicHDR10/metadataFromJson.cpp
Examining data/x265-3.4/source/dynamicHDR10/metadataFromJson.h
Examining data/x265-3.4/source/encoder/analysis.cpp
Examining data/x265-3.4/source/encoder/analysis.h
Examining data/x265-3.4/source/encoder/api.cpp
Examining data/x265-3.4/source/encoder/bitcost.cpp
Examining data/x265-3.4/source/encoder/bitcost.h
Examining data/x265-3.4/source/encoder/dpb.cpp
Examining data/x265-3.4/source/encoder/dpb.h
Examining data/x265-3.4/source/encoder/encoder.cpp
Examining data/x265-3.4/source/encoder/encoder.h
Examining data/x265-3.4/source/encoder/entropy.cpp
Examining data/x265-3.4/source/encoder/entropy.h
Examining data/x265-3.4/source/encoder/frameencoder.cpp
Examining data/x265-3.4/source/encoder/frameencoder.h
Examining data/x265-3.4/source/encoder/framefilter.cpp
Examining data/x265-3.4/source/encoder/framefilter.h
Examining data/x265-3.4/source/encoder/level.cpp
Examining data/x265-3.4/source/encoder/level.h
Examining data/x265-3.4/source/encoder/motion.cpp
Examining data/x265-3.4/source/encoder/motion.h
Examining data/x265-3.4/source/encoder/nal.cpp
Examining data/x265-3.4/source/encoder/nal.h
Examining data/x265-3.4/source/encoder/ratecontrol.cpp
Examining data/x265-3.4/source/encoder/ratecontrol.h
Examining data/x265-3.4/source/encoder/rdcost.h
Examining data/x265-3.4/source/encoder/reference.cpp
Examining data/x265-3.4/source/encoder/reference.h
Examining data/x265-3.4/source/encoder/sao.cpp
Examining data/x265-3.4/source/encoder/sao.h
Examining data/x265-3.4/source/encoder/search.cpp
Examining data/x265-3.4/source/encoder/search.h
Examining data/x265-3.4/source/encoder/sei.cpp
Examining data/x265-3.4/source/encoder/sei.h
Examining data/x265-3.4/source/encoder/slicetype.cpp
Examining data/x265-3.4/source/encoder/slicetype.h
Examining data/x265-3.4/source/encoder/svt.h
Examining data/x265-3.4/source/encoder/weightPrediction.cpp
Examining data/x265-3.4/source/input/input.cpp
Examining data/x265-3.4/source/input/input.h
Examining data/x265-3.4/source/input/y4m.cpp
Examining data/x265-3.4/source/input/y4m.h
Examining data/x265-3.4/source/input/yuv.cpp
Examining data/x265-3.4/source/input/yuv.h
Examining data/x265-3.4/source/output/output.cpp
Examining data/x265-3.4/source/output/output.h
Examining data/x265-3.4/source/output/raw.cpp
Examining data/x265-3.4/source/output/raw.h
Examining data/x265-3.4/source/output/reconplay.cpp
Examining data/x265-3.4/source/output/reconplay.h
Examining data/x265-3.4/source/output/y4m.cpp
Examining data/x265-3.4/source/output/y4m.h
Examining data/x265-3.4/source/output/yuv.cpp
Examining data/x265-3.4/source/output/yuv.h
Examining data/x265-3.4/source/profile/PPA/ppa.cpp
Examining data/x265-3.4/source/profile/PPA/ppa.h
Examining data/x265-3.4/source/profile/PPA/ppaApi.h
Examining data/x265-3.4/source/profile/cpuEvents.h
Examining data/x265-3.4/source/profile/vtune/vtune.cpp
Examining data/x265-3.4/source/profile/vtune/vtune.h
Examining data/x265-3.4/source/test/intrapredharness.cpp
Examining data/x265-3.4/source/test/intrapredharness.h
Examining data/x265-3.4/source/test/ipfilterharness.cpp
Examining data/x265-3.4/source/test/ipfilterharness.h
Examining data/x265-3.4/source/test/mbdstharness.cpp
Examining data/x265-3.4/source/test/mbdstharness.h
Examining data/x265-3.4/source/test/pixelharness.cpp
Examining data/x265-3.4/source/test/pixelharness.h
Examining data/x265-3.4/source/test/testbench.cpp
Examining data/x265-3.4/source/test/testharness.h
Examining data/x265-3.4/source/x265.cpp
Examining data/x265-3.4/source/x265.h
Examining data/x265-3.4/source/x265cli.cpp
Examining data/x265-3.4/source/x265cli.h

FINAL RESULTS:

data/x265-3.4/source/common/common.cpp:136:14:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        p += sprintf(buffer, "%-4s [%s]: ", caller, log_level);
data/x265-3.4/source/common/common.cpp:139:5:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
    vsnprintf(buffer + p, bufferSize - p, fmt, arg);
data/x265-3.4/source/common/common.cpp:178:14:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        p += sprintf(buffer, "%-4s [%s]: ", caller, log_level);
data/x265-3.4/source/common/common.cpp:181:5:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
    vsnprintf(buffer + p, bufferSize - p, fmt, arg);
data/x265-3.4/source/common/common.h:116:59:  [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.
    if (fp) { fprintf(fp, "%s:%d\n", __FILE__, __LINE__); fprintf(fp, __VA_ARGS__); fclose(fp); } \
data/x265-3.4/source/common/param.cpp:678: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(nameBuf, name);
data/x265-3.4/source/common/param.cpp:799: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(nameBuf, name);
data/x265-3.4/source/common/param.cpp:1362:69:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
            else if (sscanf(value, "%d", &p->hmeSearchMethod[0]) || sscanf(value, "%s", search[0]))
data/x265-3.4/source/common/param.cpp:1831:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(buf, " %s", toolstr);
data/x265-3.4/source/common/param.cpp:1836: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(buf, toolstr);
data/x265-3.4/source/common/param.cpp:1911:39:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
#define TOOLVAL(VAL, STR)  if (VAL) { sprintf(tmp, STR, VAL); appendtool(param, buf, sizeof(buf), tmp); }
data/x265-3.4/source/common/param.cpp:1988:10:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    s += sprintf(s, " %s", (param) ? cliopt : "no-" cliopt);
data/x265-3.4/source/common/param.cpp:1993:14:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        s += sprintf(s, " numa-pools=%s", p->numaPools);
data/x265-3.4/source/common/param.cpp:2099:10:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    s += sprintf(s, " rc=%s", p->rc.rateControlMode == X265_RC_ABR ? (
data/x265-3.4/source/common/param.cpp:2176:14:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        s += sprintf(s, " master-display=%s", p->masteringDisplayColorVolume);
data/x265-3.4/source/common/primitives.cpp:239:22:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
                p += sprintf(p, " %s", X265_NS::cpu_names[i].name);
data/x265-3.4/source/common/threadpool.cpp:315:14:  [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(poolString, nextCount);
data/x265-3.4/source/dynamicHDR10/json11/json11.h:65:17:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
        #ifndef snprintf
data/x265-3.4/source/dynamicHDR10/json11/json11.h:66:21:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
            #define snprintf _snprintf_s
data/x265-3.4/source/encoder/encoder.cpp:153: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(output, input);
data/x265-3.4/source/encoder/encoder.cpp:154:5:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
    strcat(output, suffix);
data/x265-3.4/source/encoder/encoder.cpp:299:16:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        len += sprintf(buf + len, "%spmode", len ? "+" : "");
data/x265-3.4/source/encoder/encoder.cpp:301:16:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        len += sprintf(buf + len, "%spme ", len ? "+" : "");
data/x265-3.4/source/encoder/encoder.cpp:3250:17:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
                sprintf(buffer, "x265 (build %d) - %s:%s - H.265/HEVC codec - "
data/x265-3.4/source/encoder/encoder.cpp:5714:59:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
#define TOOLCMP(COND1, COND2, STR)  if (COND1 != COND2) { sprintf(tmp, STR, COND1, COND2); x265_log(newParam, X265_LOG_DEBUG, tmp); }
data/x265-3.4/source/encoder/level.cpp:224: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(profbuf, profiles[vps.ptl.profileIdc]);
data/x265-3.4/source/encoder/ratecontrol.cpp:57:14:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function. If the scanf format is influenceable by an
  attacker, it's exploitable.
    if (p && sscanf(p, opt "=%d" , &i) && param_val != i)\
data/x265-3.4/source/encoder/ratecontrol.cpp:102: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(output, input);
data/x265-3.4/source/encoder/ratecontrol.cpp:103:5:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
    strcat(output, suffix);
data/x265-3.4/source/encoder/ratecontrol.cpp:614:26:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
                    e += sscanf(p, " in:%*d out:%*d type:%c q:%lf q-aq:%lf q-noVbv:%lf q-Rceq:%lf tex:%d mv:%d misc:%d icu:%lf pcu:%lf scu:%lf nump:%d numnegp:%d numposp:%d deltapoc:%s bused:%s",
data/x265-3.4/source/encoder/ratecontrol.cpp:2992:13:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
            sprintf(deltaPOC, "%s%d~", deltaPOC, rpsWriter->deltaPOC[i]);
data/x265-3.4/source/encoder/ratecontrol.cpp:2993:13:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
            sprintf(bUsed, "%s%d~", bUsed, rpsWriter->bUsed[i]);
data/x265-3.4/source/encoder/weightPrediction.cpp:535:17:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
                sprintf(buf + p, "%*s", 80 - p, " ");
data/x265-3.4/source/output/reconplay.cpp:33:9:  [4] (shell) popen:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
#define popen  _popen
data/x265-3.4/source/output/reconplay.cpp:72:18:  [4] (shell) popen:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
    outputPipe = popen(commandLine, pipemode);
data/x265-3.4/source/profile/vtune/vtune.cpp:54:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(threadname, "%s %d", name, id);
data/x265-3.4/source/test/pixelharness.cpp:3176:26:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
#define HEADER(str, ...) sprintf(header, str, __VA_ARGS__); printf("%22s", header);
data/x265-3.4/source/test/pixelharness.cpp:3348:26:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
#define HEADER(str, ...) sprintf(header, str, __VA_ARGS__); printf("%22s", header);
data/x265-3.4/source/x265cli.cpp:49:12:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
#define H0 printf
data/x265-3.4/source/x265cli.cpp:50:41:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
#define H1 if (level >= X265_LOG_DEBUG) printf
data/x265-3.4/source/x265cli.cpp:850:21:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
            int p = sprintf(buf, "%dx%d fps %d/%d %sp%d", param->sourceWidth, param->sourceHeight,
data/x265-3.4/source/common/threading.h:111:9:  [3] (misc) InitializeCriticalSection:
  Exceptions can be thrown in low-memory situations. Use
  InitializeCriticalSectionAndSpinCount instead.
        InitializeCriticalSection(&this->handle);
data/x265-3.4/source/common/threading.h:121:9:  [3] (misc) EnterCriticalSection:
  On some versions of Windows, exceptions can be thrown in low-memory
  situations. Use InitializeCriticalSectionAndSpinCount instead.
        EnterCriticalSection(&this->handle);
data/x265-3.4/source/common/threading.h:181:9:  [3] (misc) InitializeCriticalSection:
  Exceptions can be thrown in low-memory situations. Use
  InitializeCriticalSectionAndSpinCount instead.
        InitializeCriticalSection(&m_cs);
data/x265-3.4/source/common/threading.h:193:9:  [3] (misc) EnterCriticalSection:
  On some versions of Windows, exceptions can be thrown in low-memory
  situations. Use InitializeCriticalSectionAndSpinCount instead.
        EnterCriticalSection(&m_cs);
data/x265-3.4/source/common/threading.h:202:9:  [3] (misc) EnterCriticalSection:
  On some versions of Windows, exceptions can be thrown in low-memory
  situations. Use InitializeCriticalSectionAndSpinCount instead.
        EnterCriticalSection(&m_cs);
data/x265-3.4/source/common/threading.h:210:9:  [3] (misc) EnterCriticalSection:
  On some versions of Windows, exceptions can be thrown in low-memory
  situations. Use InitializeCriticalSectionAndSpinCount instead.
        EnterCriticalSection(&m_cs);
data/x265-3.4/source/common/threading.h:219:9:  [3] (misc) EnterCriticalSection:
  On some versions of Windows, exceptions can be thrown in low-memory
  situations. Use InitializeCriticalSectionAndSpinCount instead.
        EnterCriticalSection(&m_cs);
data/x265-3.4/source/common/threading.h:228:9:  [3] (misc) EnterCriticalSection:
  On some versions of Windows, exceptions can be thrown in low-memory
  situations. Use InitializeCriticalSectionAndSpinCount instead.
        EnterCriticalSection(&m_cs);
data/x265-3.4/source/common/threading.h:235:9:  [3] (misc) EnterCriticalSection:
  On some versions of Windows, exceptions can be thrown in low-memory
  situations. Use InitializeCriticalSectionAndSpinCount instead.
        EnterCriticalSection(&m_cs);
data/x265-3.4/source/common/threading.h:243:9:  [3] (misc) EnterCriticalSection:
  On some versions of Windows, exceptions can be thrown in low-memory
  situations. Use InitializeCriticalSectionAndSpinCount instead.
        EnterCriticalSection(&m_cs);
data/x265-3.4/source/common/winxp.cpp:40:5:  [3] (misc) InitializeCriticalSection:
  Exceptions can be thrown in low-memory situations. Use
  InitializeCriticalSectionAndSpinCount instead.
    InitializeCriticalSection(&cond->waiterCountMutex);
data/x265-3.4/source/common/winxp.cpp:41:5:  [3] (misc) InitializeCriticalSection:
  Exceptions can be thrown in low-memory situations. Use
  InitializeCriticalSectionAndSpinCount instead.
    InitializeCriticalSection(&cond->broadcastMutex);
data/x265-3.4/source/common/winxp.cpp:50:5:  [3] (misc) EnterCriticalSection:
  On some versions of Windows, exceptions can be thrown in low-memory
  situations. Use InitializeCriticalSectionAndSpinCount instead.
    EnterCriticalSection(&cond->broadcastMutex);
data/x265-3.4/source/common/winxp.cpp:51:5:  [3] (misc) EnterCriticalSection:
  On some versions of Windows, exceptions can be thrown in low-memory
  situations. Use InitializeCriticalSectionAndSpinCount instead.
    EnterCriticalSection(&cond->waiterCountMutex);
data/x265-3.4/source/common/winxp.cpp:75:5:  [3] (misc) EnterCriticalSection:
  On some versions of Windows, exceptions can be thrown in low-memory
  situations. Use InitializeCriticalSectionAndSpinCount instead.
    EnterCriticalSection(&cond->broadcastMutex);
data/x265-3.4/source/common/winxp.cpp:76:5:  [3] (misc) EnterCriticalSection:
  On some versions of Windows, exceptions can be thrown in low-memory
  situations. Use InitializeCriticalSectionAndSpinCount instead.
    EnterCriticalSection(&cond->waiterCountMutex);
data/x265-3.4/source/common/winxp.cpp:91:5:  [3] (misc) EnterCriticalSection:
  On some versions of Windows, exceptions can be thrown in low-memory
  situations. Use InitializeCriticalSectionAndSpinCount instead.
    EnterCriticalSection(&cond->broadcastMutex);
data/x265-3.4/source/common/winxp.cpp:92:5:  [3] (misc) EnterCriticalSection:
  On some versions of Windows, exceptions can be thrown in low-memory
  situations. Use InitializeCriticalSectionAndSpinCount instead.
    EnterCriticalSection(&cond->waiterCountMutex);
data/x265-3.4/source/common/winxp.cpp:101:5:  [3] (misc) EnterCriticalSection:
  On some versions of Windows, exceptions can be thrown in low-memory
  situations. Use InitializeCriticalSectionAndSpinCount instead.
    EnterCriticalSection(&cond->waiterCountMutex);
data/x265-3.4/source/common/winxp.cpp:110:5:  [3] (misc) EnterCriticalSection:
  On some versions of Windows, exceptions can be thrown in low-memory
  situations. Use InitializeCriticalSectionAndSpinCount instead.
    EnterCriticalSection(mutex);
data/x265-3.4/source/compat/getopt/getopt.c:211: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.
#ifndef getenv
data/x265-3.4/source/compat/getopt/getopt.c:212:14:  [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.
extern char *getenv ();
data/x265-3.4/source/compat/getopt/getopt.c:397:21:  [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.
  posixly_correct = getenv ("POSIXLY_CORRECT");
data/x265-3.4/source/compat/getopt/getopt.c:972:1:  [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.
getopt (argc, argv, optstring)
data/x265-3.4/source/compat/getopt/getopt.c:984:1:  [3] (buffer) getopt_long:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
getopt_long (argc, argv, options, long_options, opt_index)
data/x265-3.4/source/compat/getopt/getopt.c:1013:11:  [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.
      c = getopt (argc, argv, "abc:d:0123456789");
data/x265-3.4/source/compat/getopt/getopt.h:147:12:  [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.
extern int getopt (int argc, char *const *argv, const char *shortopts);
data/x265-3.4/source/compat/getopt/getopt.h:149:12:  [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.
extern int getopt ();
data/x265-3.4/source/compat/getopt/getopt.h:153:12:  [3] (buffer) getopt_long:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
extern int getopt_long (int argc, char *const *argv, const char *shortopts,
data/x265-3.4/source/compat/getopt/getopt.h:166:12:  [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.
extern int getopt ();
data/x265-3.4/source/compat/getopt/getopt.h:168:12:  [3] (buffer) getopt_long:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
extern int getopt_long ();
data/x265-3.4/source/profile/PPA/ppa.cpp:76:29:  [3] (misc) LoadLibrary:
  Ensure that the full path to the library is specified, or current directory
  may be used (CWE-829, CWE-20). Use registry entry or GetWindowsDirectory to
  find library path, if you aren't already.
    HMODULE _ppaLibHandle = LoadLibrary(PPA_DLL_NAME);
data/x265-3.4/source/test/testbench.cpp:144:5:  [3] (random) srand:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
    srand(seed);
data/x265-3.4/source/x265.cpp:96:17:  [3] (buffer) getopt_long:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
        int c = getopt_long(argc, argv, short_options, long_options, &long_options_index);
data/x265-3.4/source/x265cli.cpp:438:21:  [3] (buffer) getopt_long:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
            int c = getopt_long(argc, argv, short_options, long_options, NULL);
data/x265-3.4/source/x265cli.cpp:485:21:  [3] (buffer) getopt_long:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
            int c = getopt_long(argc, argv, short_options, long_options, &long_options_index);
data/x265-3.4/source/x265cli.cpp:559:21:  [3] (buffer) getopt_long:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
            int c = getopt_long(argc, argv, short_options, long_options, &optionsIndex);
data/x265-3.4/source/x265cli.cpp:627:21:  [3] (buffer) getopt_long:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
            int c = getopt_long(argc, argv, short_options, long_options, &long_options_index);
data/x265-3.4/source/abrEncApp.cpp:318: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(m_analysisInfo, src, sizeof(x265_analysis_data));
data/x265-3.4/source/abrEncApp.cpp:324: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(m_analysisInfo->lookahead.intraSatdForVbv, src->lookahead.intraSatdForVbv, src->numCuInHeight * sizeof(uint32_t));
data/x265-3.4/source/abrEncApp.cpp:325: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(m_analysisInfo->lookahead.satdForVbv, src->lookahead.satdForVbv, src->numCuInHeight * sizeof(uint32_t));
data/x265-3.4/source/abrEncApp.cpp:326: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(m_analysisInfo->lookahead.intraVbvCost, src->lookahead.intraVbvCost, src->numCUsInFrame * sizeof(uint32_t));
data/x265-3.4/source/abrEncApp.cpp:327: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(m_analysisInfo->lookahead.vbvCost, src->lookahead.vbvCost, src->numCUsInFrame * sizeof(uint32_t));
data/x265-3.4/source/abrEncApp.cpp:337: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(intraDst->depth, intraSrc->depth, sizeof(uint8_t) * src->depthBytes);
data/x265-3.4/source/abrEncApp.cpp:338: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(intraDst->modes, intraSrc->modes, sizeof(uint8_t) * src->numCUsInFrame * src->numPartitions);
data/x265-3.4/source/abrEncApp.cpp:339: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(intraDst->partSizes, intraSrc->partSizes, sizeof(char) * src->depthBytes);
data/x265-3.4/source/abrEncApp.cpp:340: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(intraDst->chromaModes, intraSrc->chromaModes, sizeof(uint8_t) * src->depthBytes);
data/x265-3.4/source/abrEncApp.cpp:342: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(intraDst->cuQPOff, intraSrc->cuQPOff, sizeof(int8_t) * src->depthBytes);
data/x265-3.4/source/abrEncApp.cpp:348: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(m_analysisInfo->wt, src->wt, sizeof(WeightParam) * 3 * numDir);
data/x265-3.4/source/abrEncApp.cpp:354: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(interDst->depth, interSrc->depth, sizeof(uint8_t) * src->depthBytes);
data/x265-3.4/source/abrEncApp.cpp:355: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(interDst->modes, interSrc->modes, sizeof(uint8_t) * src->depthBytes);
data/x265-3.4/source/abrEncApp.cpp:357: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(interDst->cuQPOff, interSrc->cuQPOff, sizeof(int8_t) * src->depthBytes);
data/x265-3.4/source/abrEncApp.cpp:360: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(interDst->partSize, interSrc->partSize, sizeof(uint8_t) * src->depthBytes);
data/x265-3.4/source/abrEncApp.cpp:361: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(interDst->mergeFlag, interSrc->mergeFlag, sizeof(uint8_t) * src->depthBytes);
data/x265-3.4/source/abrEncApp.cpp:364:21:  [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(interDst->interDir, interSrc->interDir, sizeof(uint8_t) * src->depthBytes);
data/x265-3.4/source/abrEncApp.cpp:367:25:  [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(interDst->mvpIdx[dir], interSrc->mvpIdx[dir], sizeof(uint8_t) * src->depthBytes);
data/x265-3.4/source/abrEncApp.cpp:368:25:  [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(interDst->refIdx[dir], interSrc->refIdx[dir], sizeof(int8_t) * src->depthBytes);
data/x265-3.4/source/abrEncApp.cpp:369:25:  [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(interDst->mv[dir], interSrc->mv[dir], sizeof(MV) * src->depthBytes);
data/x265-3.4/source/abrEncApp.cpp:375:25:  [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(intraDst->modes, intraSrc->modes, sizeof(uint8_t) * src->numPartitions * src->numCUsInFrame);
data/x265-3.4/source/abrEncApp.cpp:376:25:  [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(intraDst->chromaModes, intraSrc->chromaModes, sizeof(uint8_t) * src->depthBytes);
data/x265-3.4/source/abrEncApp.cpp:381: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(interDst->ref, interSrc->ref, sizeof(int32_t) * src->numCUsInFrame * X265_MAX_PRED_MODE_PER_CTU * numDir);
data/x265-3.4/source/abrEncApp.cpp:679:37:  [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, srcP1, stride);
data/x265-3.4/source/abrEncApp.cpp:680:37:  [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(p2, srcP2, stride);
data/x265-3.4/source/abrEncApp.cpp:1094: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->planes[0], src->planes[0], src->framesize * sizeof(char));
data/x265-3.4/source/common/bitstream.cpp:31: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(temp, m_fifo, m_byteOccupancy);
data/x265-3.4/source/common/common.cpp: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 buffer[bufferSize];
data/x265-3.4/source/common/common.cpp:152:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buffer[bufferSize];
data/x265-3.4/source/common/common.cpp:188: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 buf_utf16[bufferSize];
data/x265-3.4/source/common/common.cpp:189:28:  [2] (buffer) MultiByteToWideChar:
  Requires maximum length in CHARACTERS, not bytes (CWE-120).
        int length_utf16 = MultiByteToWideChar(CP_UTF8, 0, buffer, -1, buf_utf16, sizeof(buf_utf16)/sizeof(wchar_t)) - 1;
data/x265-3.4/source/common/common.cpp:199: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_utf16[MAX_PATH * 2], mode_utf16[16];
data/x265-3.4/source/common/common.cpp:201:9:  [2] (buffer) MultiByteToWideChar:
  Requires maximum length in CHARACTERS, not bytes (CWE-120).
    if (MultiByteToWideChar(CP_UTF8, MB_ERR_INVALID_CHARS, fileName, -1, buf_utf16, sizeof(buf_utf16)/sizeof(wchar_t)) &&
data/x265-3.4/source/common/common.cpp:202:9:  [2] (buffer) MultiByteToWideChar:
  Requires maximum length in CHARACTERS, not bytes (CWE-120).
        MultiByteToWideChar(CP_UTF8, MB_ERR_INVALID_CHARS, mode, -1, mode_utf16, sizeof(mode_utf16)/sizeof(wchar_t)))
data/x265-3.4/source/common/common.cpp:211: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_utf16[MAX_PATH * 2];
data/x265-3.4/source/common/common.cpp:213:9:  [2] (buffer) MultiByteToWideChar:
  Requires maximum length in CHARACTERS, not bytes (CWE-120).
    if (MultiByteToWideChar(CP_UTF8, MB_ERR_INVALID_CHARS, fileName, -1, buf_utf16, sizeof(buf_utf16)/sizeof(wchar_t)))
data/x265-3.4/source/common/common.cpp:221: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 old_utf16[MAX_PATH * 2], new_utf16[MAX_PATH * 2];
data/x265-3.4/source/common/common.cpp:223:9:  [2] (buffer) MultiByteToWideChar:
  Requires maximum length in CHARACTERS, not bytes (CWE-120).
    if (MultiByteToWideChar(CP_UTF8, MB_ERR_INVALID_CHARS, oldName, -1, old_utf16, sizeof(old_utf16)/sizeof(wchar_t)) &&
data/x265-3.4/source/common/common.cpp:224:9:  [2] (buffer) MultiByteToWideChar:
  Requires maximum length in CHARACTERS, not bytes (CWE-120).
        MultiByteToWideChar(CP_UTF8, MB_ERR_INVALID_CHARS, newName, -1, new_utf16, sizeof(new_utf16)/sizeof(wchar_t)))
data/x265-3.4/source/common/common.h:115: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 *fp = fopen("x265_check_failures.txt", "a"); \
data/x265-3.4/source/common/common.h:433:37:  [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).
#define  x265_fopen(fileName, mode) fopen(fileName, mode)
data/x265-3.4/source/common/cpu.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 name[16];
data/x265-3.4/source/common/cudata.cpp:55:51:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
static void copy256(uint8_t* dst, uint8_t* src) { memcpy(dst, src, 256); }
data/x265-3.4/source/common/cudata.cpp:394: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(m_mv[0] + offset, subCU.m_mv[0], childGeom.numPartitions * sizeof(MV));
data/x265-3.4/source/common/cudata.cpp:395: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(m_mv[1] + offset, subCU.m_mv[1], childGeom.numPartitions * sizeof(MV));
data/x265-3.4/source/common/cudata.cpp:396: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(m_mvd[0] + offset, subCU.m_mvd[0], childGeom.numPartitions * sizeof(MV));
data/x265-3.4/source/common/cudata.cpp:397: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(m_mvd[1] + offset, subCU.m_mvd[1], childGeom.numPartitions * sizeof(MV));
data/x265-3.4/source/common/cudata.cpp:399: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(m_distortion + offset, subCU.m_distortion, childGeom.numPartitions * sizeof(sse_t));
data/x265-3.4/source/common/cudata.cpp:403: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(m_trCoeff[0] + tmp2, subCU.m_trCoeff[0], sizeof(coeff_t)* tmp);
data/x265-3.4/source/common/cudata.cpp:415: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(m_trCoeff[1] + tmpC2, subCU.m_trCoeff[1], sizeof(coeff_t) * tmpC);
data/x265-3.4/source/common/cudata.cpp:416: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(m_trCoeff[2] + tmpC2, subCU.m_trCoeff[2], sizeof(coeff_t) * tmpC);
data/x265-3.4/source/common/cudata.cpp:445: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(m_qp, cu.m_qp, BytesPerPartition * m_numPartitions);
data/x265-3.4/source/common/cudata.cpp:446: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(m_mv[0],  cu.m_mv[0],  m_numPartitions * sizeof(MV));
data/x265-3.4/source/common/cudata.cpp:447: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(m_mv[1],  cu.m_mv[1],  m_numPartitions * sizeof(MV));
data/x265-3.4/source/common/cudata.cpp:448: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(m_mvd[0], cu.m_mvd[0], m_numPartitions * sizeof(MV));
data/x265-3.4/source/common/cudata.cpp:449: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(m_mvd[1], cu.m_mvd[1], m_numPartitions * sizeof(MV));
data/x265-3.4/source/common/cudata.cpp:450: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(m_distortion, cu.m_distortion, m_numPartitions * sizeof(sse_t));
data/x265-3.4/source/common/cudata.cpp:494: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(ctu.m_mv[0] + m_absIdxInCTU, m_mv[0], m_numPartitions * sizeof(MV));
data/x265-3.4/source/common/cudata.cpp:495: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(ctu.m_mv[1] + m_absIdxInCTU, m_mv[1], m_numPartitions * sizeof(MV));
data/x265-3.4/source/common/cudata.cpp:496: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(ctu.m_mvd[0] + m_absIdxInCTU, m_mvd[0], m_numPartitions * sizeof(MV));
data/x265-3.4/source/common/cudata.cpp:497: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(ctu.m_mvd[1] + m_absIdxInCTU, m_mvd[1], m_numPartitions * sizeof(MV));
data/x265-3.4/source/common/cudata.cpp:499: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(ctu.m_distortion + m_absIdxInCTU, m_distortion, m_numPartitions * sizeof(sse_t));
data/x265-3.4/source/common/cudata.cpp:503: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(ctu.m_trCoeff[0] + tmpY2, m_trCoeff[0], sizeof(coeff_t)* tmpY);
data/x265-3.4/source/common/cudata.cpp:515: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(ctu.m_trCoeff[1] + tmpC2, m_trCoeff[1], sizeof(coeff_t) * tmpC);
data/x265-3.4/source/common/cudata.cpp:516: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(ctu.m_trCoeff[2] + tmpC2, m_trCoeff[2], sizeof(coeff_t) * tmpC);
data/x265-3.4/source/common/cudata.cpp:552: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(m_mv[0], ctu.m_mv[0] + m_absIdxInCTU, m_numPartitions * sizeof(MV));
data/x265-3.4/source/common/cudata.cpp:553: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(m_mv[1], ctu.m_mv[1] + m_absIdxInCTU, m_numPartitions * sizeof(MV));
data/x265-3.4/source/common/cudata.cpp:554: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(m_mvd[0], ctu.m_mvd[0] + m_absIdxInCTU, m_numPartitions * sizeof(MV));
data/x265-3.4/source/common/cudata.cpp:555: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(m_mvd[1], ctu.m_mvd[1] + m_absIdxInCTU, m_numPartitions * sizeof(MV));
data/x265-3.4/source/common/cudata.cpp:557: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(m_distortion, ctu.m_distortion + m_absIdxInCTU, m_numPartitions * sizeof(sse_t));
data/x265-3.4/source/common/cudata.cpp:587: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(ctu.m_trCoeff[0] + tmpY2, m_trCoeff[0], sizeof(coeff_t)* tmpY);
data/x265-3.4/source/common/cudata.cpp:600: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(ctu.m_trCoeff[1] + tmpY2, m_trCoeff[1], sizeof(coeff_t) * tmpY);
data/x265-3.4/source/common/cudata.cpp:601: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(ctu.m_trCoeff[2] + tmpY2, m_trCoeff[2], sizeof(coeff_t) * tmpY);
data/x265-3.4/source/common/dct.cpp:452: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(&block[i * 4], &src[i * srcStride], 4 * sizeof(int16_t));
data/x265-3.4/source/common/dct.cpp:469: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(&block[i * 4], &src[i * srcStride], 4 * sizeof(int16_t));
data/x265-3.4/source/common/dct.cpp:486: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(&block[i * 8], &src[i * srcStride], 8 * sizeof(int16_t));
data/x265-3.4/source/common/dct.cpp:503: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(&block[i * 16], &src[i * srcStride], 16 * sizeof(int16_t));
data/x265-3.4/source/common/dct.cpp:520: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(&block[i * 32], &src[i * srcStride], 32 * sizeof(int16_t));
data/x265-3.4/source/common/dct.cpp:540: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(&dst[i * dstStride], &block[i * 4], 4 * sizeof(int16_t));
data/x265-3.4/source/common/dct.cpp:557: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(&dst[i * dstStride], &block[i * 4], 4 * sizeof(int16_t));
data/x265-3.4/source/common/dct.cpp:574: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(&dst[i * dstStride], &block[i * 8], 8 * sizeof(int16_t));
data/x265-3.4/source/common/dct.cpp:591: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(&dst[i * dstStride], &block[i * 16], 16 * sizeof(int16_t));
data/x265-3.4/source/common/dct.cpp:608: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(&dst[i * dstStride], &block[i * 32], 32 * sizeof(int16_t));
data/x265-3.4/source/common/lowpassdct.cpp:57: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(&dst[i * 8], &coef[i * 4], 4 * sizeof(int16_t));
data/x265-3.4/source/common/lowpassdct.cpp:84: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(&dst[i * 16], &coef[i * 8], 8 * sizeof(int16_t));
data/x265-3.4/source/common/lowpassdct.cpp:109: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(&dst[i * 32], &coef[i * 16], 16 * sizeof(int16_t));
data/x265-3.4/source/common/md5.cpp:93: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(p, buf, len);
data/x265-3.4/source/common/md5.cpp:96: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, buf, t);
data/x265-3.4/source/common/md5.cpp:106: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(ctx->in, buf, 64);
data/x265-3.4/source/common/md5.cpp:115: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(ctx->in, buf, len);
data/x265-3.4/source/common/md5.cpp:164: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(digest, ctx->buf, 16);
data/x265-3.4/source/common/md5.h:37: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 in[64];
data/x265-3.4/source/common/md5.h:68:28:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    void finalize(unsigned char digest[16])
data/x265-3.4/source/common/param.cpp:656:8:  [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).
#undef atoi
data/x265-3.4/source/common/param.cpp:658:9:  [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).
#define atoi(str) x265_atoi(str, bError)
data/x265-3.4/source/common/param.cpp:665: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 nameBuf[64];
data/x265-3.4/source/common/param.cpp:704:38:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
    OPT("ref") p->maxNumReferences = atoi(value);
data/x265-3.4/source/common/param.cpp:707:41:  [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).
    OPT("rskip") p->recursionSkipMode = atoi(value);
data/x265-3.4/source/common/param.cpp:708:55:  [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).
    OPT("rskip-edge-threshold") p->edgeVarThreshold = atoi(value)/100.0f;
data/x265-3.4/source/common/param.cpp:710:36:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
    OPT("subme") p->subpelRefine = atoi(value);
data/x265-3.4/source/common/param.cpp:711:37:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
    OPT("merange") p->searchRange = atoi(value);
data/x265-3.4/source/common/param.cpp:714: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).
    OPT("max-merge") p->maxNumMergeCand = (uint32_t)atoi(value);
data/x265-3.4/source/common/param.cpp:715: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).
    OPT("rd") p->rdLevel = atoi(value);
data/x265-3.4/source/common/param.cpp:716: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).
    OPT("radl") p->radl = atoi(value);
data/x265-3.4/source/common/param.cpp:723: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).
            p->rdoqLevel = atoi(value);
data/x265-3.4/source/common/param.cpp:737:20:  [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).
        p->rc.qp = atoi(value);
data/x265-3.4/source/common/param.cpp:742: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).
        p->rc.bitrate = atoi(value);
data/x265-3.4/source/common/param.cpp:745:35:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
    OPT("aq-mode") p->rc.aqMode = atoi(value);
data/x265-3.4/source/common/param.cpp:747: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).
    OPT("nr-intra") p->noiseReductionIntra = atoi(value);
data/x265-3.4/source/common/param.cpp:748: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).
    OPT("nr-inter") p->noiseReductionInter = atoi(value);
data/x265-3.4/source/common/param.cpp:753:34:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
    OPT("limit-tu") p->limitTU = atoi(value);
data/x265-3.4/source/common/param.cpp:756:37:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
    OPT("rdpenalty") p->rdPenalty = atoi(value);
data/x265-3.4/source/common/param.cpp:768:8:  [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).
#undef atoi
data/x265-3.4/source/common/param.cpp:772:8:  [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).
#undef atoi
data/x265-3.4/source/common/param.cpp:774:9:  [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).
#define atoi(str) x265_atoi(str, bError)
data/x265-3.4/source/common/param.cpp:784: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 nameBuf[64];
data/x265-3.4/source/common/param.cpp:877: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).
                p->fpsNum = atoi(value);
data/x265-3.4/source/common/param.cpp:882:47:  [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).
    OPT("frame-threads") p->frameNumThreads = atoi(value);
data/x265-3.4/source/common/param.cpp:892:18:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
        else if (atoi(value) < 100)
data/x265-3.4/source/common/param.cpp:893: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).
            p->levelIdc = atoi(value);
data/x265-3.4/source/common/param.cpp:901:23:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
        p->logLevel = atoi(value);
data/x265-3.4/source/common/param.cpp:909: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).
    OPT("total-frames") p->totalFrames = atoi(value);
data/x265-3.4/source/common/param.cpp:913:41:  [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).
    OPT("ctu") p->maxCUSize = (uint32_t)atoi(value);
data/x265-3.4/source/common/param.cpp:914:49:  [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).
    OPT("min-cu-size") p->minCUSize = (uint32_t)atoi(value);
data/x265-3.4/source/common/param.cpp:915:60:  [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).
    OPT("tu-intra-depth") p->tuQTMaxIntraDepth = (uint32_t)atoi(value);
data/x265-3.4/source/common/param.cpp:916:60:  [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).
    OPT("tu-inter-depth") p->tuQTMaxInterDepth = (uint32_t)atoi(value);
data/x265-3.4/source/common/param.cpp:917:49:  [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).
    OPT("max-tu-size") p->maxTUSize = (uint32_t)atoi(value);
data/x265-3.4/source/common/param.cpp:918:36:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
    OPT("subme") p->subpelRefine = atoi(value);
data/x265-3.4/source/common/param.cpp:919:37:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
    OPT("merange") p->searchRange = atoi(value);
data/x265-3.4/source/common/param.cpp:922: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).
    OPT("max-merge") p->maxNumMergeCand = (uint32_t)atoi(value);
data/x265-3.4/source/common/param.cpp:925:41:  [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).
    OPT("rskip") p->recursionSkipMode = atoi(value);
data/x265-3.4/source/common/param.cpp:926:37:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
    OPT("rdpenalty") p->rdPenalty = atoi(value);
data/x265-3.4/source/common/param.cpp:937:50:  [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).
    OPT("lookahead-slices") p->lookaheadSlices = atoi(value);
data/x265-3.4/source/common/param.cpp:944:35:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
           p->scenecutThreshold = atoi(value);
data/x265-3.4/source/common/param.cpp:949:36:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
    OPT("keyint") p->keyframeMax = atoi(value);
data/x265-3.4/source/common/param.cpp:950:40:  [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).
    OPT("min-keyint") p->keyframeMin = atoi(value);
data/x265-3.4/source/common/param.cpp:951:45:  [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).
    OPT("rc-lookahead") p->lookaheadDepth = atoi(value);
data/x265-3.4/source/common/param.cpp:952: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).
    OPT("bframes") p->bframes = atoi(value);
data/x265-3.4/source/common/param.cpp:953:40:  [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).
    OPT("bframe-bias") p->bFrameBias = atoi(value);
data/x265-3.4/source/common/param.cpp:960: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).
            p->bFrameAdaptive = atoi(value);
data/x265-3.4/source/common/param.cpp:972:38:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
    OPT("ref") p->maxNumReferences = atoi(value);
data/x265-3.4/source/common/param.cpp:973: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).
    OPT("limit-refs") p->limitReferences = atoi(value);
data/x265-3.4/source/common/param.cpp:977:37:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
    OPT("cbqpoffs") p->cbQpOffset = atoi(value);
data/x265-3.4/source/common/param.cpp:978:37:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
    OPT("crqpoffs") p->crQpOffset = atoi(value);
data/x265-3.4/source/common/param.cpp:979: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).
    OPT("rd") p->rdLevel = atoi(value);
data/x265-3.4/source/common/param.cpp:986: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).
            p->rdoqLevel = atoi(value);
data/x265-3.4/source/common/param.cpp:1036: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).
    OPT("hash") p->decodedPictureHashSEI = atoi(value);
data/x265-3.4/source/common/param.cpp:1044:34:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
    OPT("qpstep") p->rc.qpStep = atoi(value);
data/x265-3.4/source/common/param.cpp:1047:35:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
    OPT("aq-mode") p->rc.aqMode = atoi(value);
data/x265-3.4/source/common/param.cpp:1049: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).
    OPT("vbv-maxrate") p->rc.vbvMaxBitrate = atoi(value);
data/x265-3.4/source/common/param.cpp:1050: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).
    OPT("vbv-bufsize") p->rc.vbvBufferSize = atoi(value);
data/x265-3.4/source/common/param.cpp:1054:38:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
    OPT("qpmax")       p->rc.qpMax = atoi(value);
data/x265-3.4/source/common/param.cpp:1062: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).
        p->rc.bitrate = atoi(value);
data/x265-3.4/source/common/param.cpp:1067:20:  [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).
        p->rc.qp = atoi(value);
data/x265-3.4/source/common/param.cpp:1161: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).
        p->vui.chromaSampleLocTypeTopField = atoi(value);
data/x265-3.4/source/common/param.cpp:1173: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).
    OPT("nr-intra") p->noiseReductionIntra = atoi(value);
data/x265-3.4/source/common/param.cpp:1174: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).
    OPT("nr-inter") p->noiseReductionInter = atoi(value);
data/x265-3.4/source/common/param.cpp:1177:37:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
        int pass = x265_clip3(0, 3, atoi(value));
data/x265-3.4/source/common/param.cpp:1186:35:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
    OPT("qg-size") p->rc.qgSize = atoi(value);
data/x265-3.4/source/common/param.cpp:1189: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).
    OPT("min-luma") p->minLuma = (uint16_t)atoi(value);
data/x265-3.4/source/common/param.cpp:1190: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).
    OPT("max-luma") p->maxLuma = (uint16_t)atoi(value);
data/x265-3.4/source/common/param.cpp:1200:47:  [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).
        OPT("csv-log-level") p->csvLogLevel = atoi(value);
data/x265-3.4/source/common/param.cpp:1201:36:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
        OPT("qpmin") p->rc.qpMin = atoi(value);
data/x265-3.4/source/common/param.cpp:1203: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).
        OPT("log2-max-poc-lsb") p->log2MaxPocLsb = atoi(value);
data/x265-3.4/source/common/param.cpp:1206:38:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
        OPT("slices") p->maxSlices = atoi(value);
data/x265-3.4/source/common/param.cpp:1207:38:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
        OPT("limit-tu") p->limitTU = atoi(value);
data/x265-3.4/source/common/param.cpp:1227:59:  [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).
        OPT("rskip-edge-threshold") p->edgeVarThreshold = atoi(value)/100.0f;
data/x265-3.4/source/common/param.cpp:1228: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).
        OPT("lookahead-threads") p->lookaheadThreads = atoi(value);
data/x265-3.4/source/common/param.cpp:1236:37:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
            p->analysisReuseLevel = atoi(value);
data/x265-3.4/source/common/param.cpp:1237:41:  [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).
            p->analysisSaveReuseLevel = atoi(value);
data/x265-3.4/source/common/param.cpp:1238:41:  [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).
            p->analysisLoadReuseLevel = atoi(value);
data/x265-3.4/source/common/param.cpp:1240:70:  [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).
        OPT("analysis-save-reuse-level") p->analysisSaveReuseLevel = atoi(value);
data/x265-3.4/source/common/param.cpp:1241:70:  [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).
        OPT("analysis-load-reuse-level") p->analysisLoadReuseLevel = atoi(value);
data/x265-3.4/source/common/param.cpp:1261:39:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
        OPT("ctu-info") p->bCTUInfo = atoi(value);
data/x265-3.4/source/common/param.cpp:1262: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).
        OPT("scale-factor") p->scaleFactor = atoi(value);
data/x265-3.4/source/common/param.cpp:1263:45:  [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).
        OPT("refine-intra")p->intraRefine = atoi(value);
data/x265-3.4/source/common/param.cpp:1264:45:  [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).
        OPT("refine-inter")p->interRefine = atoi(value);
data/x265-3.4/source/common/param.cpp:1265:39:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
        OPT("refine-mv")p->mvRefine = atoi(value);
data/x265-3.4/source/common/param.cpp:1266:43:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
        OPT("force-flush")p->forceFlush = atoi(value);
data/x265-3.4/source/common/param.cpp:1291:48:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
        OPT("gop-lookahead") p->gopLookahead = atoi(value);
data/x265-3.4/source/common/param.cpp:1294:31:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
        OPT("radl") p->radl = atoi(value);
data/x265-3.4/source/common/param.cpp:1298:62:  [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).
        OPT("atc-sei") p->preferredTransferCharacteristics = atoi(value);
data/x265-3.4/source/common/param.cpp:1299:49:  [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).
        OPT("pic-struct") p->pictureStructure = atoi(value);
data/x265-3.4/source/common/param.cpp:1300: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).
        OPT("chunk-start") p->chunkStart = atoi(value);
data/x265-3.4/source/common/param.cpp:1301:40:  [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).
        OPT("chunk-end") p->chunkEnd = atoi(value);
data/x265-3.4/source/common/param.cpp:1307:22:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
            else if (atoi(value) < 100)
data/x265-3.4/source/common/param.cpp:1308:35:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
                p->dolbyProfile = atoi(value);
data/x265-3.4/source/common/param.cpp:1313:63:  [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).
        OPT("refine-ctu-distortion") p->ctuDistortionRefine = atoi(value);
data/x265-3.4/source/common/param.cpp:1340:31:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
            p->selectiveSAO = atoi(value);
data/x265-3.4/source/common/param.cpp:1344: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).
        OPT("scenecut-window") p->scenecutWindow = atoi(value);
data/x265-3.4/source/common/param.cpp:1345:45:  [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).
        OPT("max-qp-delta") p->maxQpDelta = atoi(value);
data/x265-3.4/source/common/param.cpp:1349:48:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
        OPT("dup-threshold") p->dupThreshold = atoi(value);
data/x265-3.4/source/common/param.cpp:1353: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 search[3][5];
data/x265-3.4/source/common/param.cpp:1381:8:  [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).
#undef atoi
data/x265-3.4/source/common/param.cpp:1908: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[80] = { 0 };
data/x265-3.4/source/common/param.cpp:1909:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char tmp[40];
data/x265-3.4/source/common/param.cpp:1955:13:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
            sprintf(tmp, "deblock(tC=%d:B=%d)", param->deblockingFilterTCOffset, param->deblockingFilterBetaOffset);
data/x265-3.4/source/common/param.cpp:1990:10:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    s += sprintf(s, "cpuid=%d", p->cpuid);
data/x265-3.4/source/common/param.cpp:1991:10:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    s += sprintf(s, " frame-threads=%d", p->frameNumThreads);
data/x265-3.4/source/common/param.cpp:1999:10:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    s += sprintf(s, " log-level=%d", p->logLevel);
data/x265-3.4/source/common/param.cpp:2001:14:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
        s += sprintf(s, " csv csv-log-level=%d", p->csvLogLevel);
data/x265-3.4/source/common/param.cpp:2002:10:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    s += sprintf(s, " bitdepth=%d", p->internalBitDepth);
data/x265-3.4/source/common/param.cpp:2003:10:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    s += sprintf(s, " input-csp=%d", p->internalCsp);
data/x265-3.4/source/common/param.cpp:2004:10:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    s += sprintf(s, " fps=%u/%u", p->fpsNum, p->fpsDenom);
data/x265-3.4/source/common/param.cpp:2005:10:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    s += sprintf(s, " input-res=%dx%d", p->sourceWidth - padx, p->sourceHeight - pady);
data/x265-3.4/source/common/param.cpp:2006:10:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    s += sprintf(s, " interlace=%d", p->interlaceMode);
data/x265-3.4/source/common/param.cpp:2007:10:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    s += sprintf(s, " total-frames=%d", p->totalFrames);
data/x265-3.4/source/common/param.cpp:2009:14:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
        s += sprintf(s, " chunk-start=%d", p->chunkStart);
data/x265-3.4/source/common/param.cpp:2011:14:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
        s += sprintf(s, " chunk-end=%d", p->chunkEnd);
data/x265-3.4/source/common/param.cpp:2012:10:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    s += sprintf(s, " level-idc=%d", p->levelIdc);
data/x265-3.4/source/common/param.cpp:2013:10:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    s += sprintf(s, " high-tier=%d", p->bHighTier);
data/x265-3.4/source/common/param.cpp:2014:10:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    s += sprintf(s, " uhd-bd=%d", p->uhdBluray);
data/x265-3.4/source/common/param.cpp:2015:10:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    s += sprintf(s, " ref=%d", p->maxNumReferences);
data/x265-3.4/source/common/param.cpp:2022:10:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    s += sprintf(s, " hash=%d", p->decodedPictureHashSEI);
data/x265-3.4/source/common/param.cpp:2025:10:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    s += sprintf(s, " min-keyint=%d", p->keyframeMin);
data/x265-3.4/source/common/param.cpp:2026:10:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    s += sprintf(s, " keyint=%d", p->keyframeMax);
data/x265-3.4/source/common/param.cpp:2027:10:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    s += sprintf(s, " gop-lookahead=%d", p->gopLookahead);
data/x265-3.4/source/common/param.cpp:2028:10:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    s += sprintf(s, " bframes=%d", p->bframes);
data/x265-3.4/source/common/param.cpp:2029:10:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    s += sprintf(s, " b-adapt=%d", p->bFrameAdaptive);
data/x265-3.4/source/common/param.cpp:2031:10:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    s += sprintf(s, " bframe-bias=%d", p->bFrameBias);
data/x265-3.4/source/common/param.cpp:2032:10:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    s += sprintf(s, " rc-lookahead=%d", p->lookaheadDepth);
data/x265-3.4/source/common/param.cpp:2033:10:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    s += sprintf(s, " lookahead-slices=%d", p->lookaheadSlices);
data/x265-3.4/source/common/param.cpp:2034:10:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    s += sprintf(s, " scenecut=%d", p->scenecutThreshold);
data/x265-3.4/source/common/param.cpp:2035:10:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    s += sprintf(s, " hist-scenecut=%d", p->bHistBasedSceneCut);
data/x265-3.4/source/common/param.cpp:2036:10:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    s += sprintf(s, " radl=%d", p->radl);
data/x265-3.4/source/common/param.cpp:2039:10:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    s += sprintf(s, " ctu=%d", p->maxCUSize);
data/x265-3.4/source/common/param.cpp:2040:10:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    s += sprintf(s, " min-cu-size=%d", p->minCUSize);
data/x265-3.4/source/common/param.cpp:2043:10:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    s += sprintf(s, " max-tu-size=%d", p->maxTUSize);
data/x265-3.4/source/common/param.cpp:2044:10:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    s += sprintf(s, " tu-inter-depth=%d", p->tuQTMaxInterDepth);
data/x265-3.4/source/common/param.cpp:2045:10:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    s += sprintf(s, " tu-intra-depth=%d", p->tuQTMaxIntraDepth);
data/x265-3.4/source/common/param.cpp:2046:10:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    s += sprintf(s, " limit-tu=%d", p->limitTU);
data/x265-3.4/source/common/param.cpp:2047:10:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    s += sprintf(s, " rdoq-level=%d", p->rdoqLevel);
data/x265-3.4/source/common/param.cpp:2048:10:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    s += sprintf(s, " dynamic-rd=%.2f", p->dynamicRd);
data/x265-3.4/source/common/param.cpp:2052:10:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    s += sprintf(s, " nr-intra=%d", p->noiseReductionIntra);
data/x265-3.4/source/common/param.cpp:2053:10:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    s += sprintf(s, " nr-inter=%d", p->noiseReductionInter);
data/x265-3.4/source/common/param.cpp:2056:10:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    s += sprintf(s, " max-merge=%d", p->maxNumMergeCand);
data/x265-3.4/source/common/param.cpp:2057:10:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    s += sprintf(s, " limit-refs=%d", p->limitReferences);
data/x265-3.4/source/common/param.cpp:2059:10:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    s += sprintf(s, " me=%d", p->searchMethod);
data/x265-3.4/source/common/param.cpp:2060:10:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    s += sprintf(s, " subme=%d", p->subpelRefine);
data/x265-3.4/source/common/param.cpp:2061:10:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    s += sprintf(s, " merange=%d", p->searchRange);
data/x265-3.4/source/common/param.cpp:2065:14:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
        s += sprintf(s, " dup-threshold=%d", p->dupThreshold);
data/x265-3.4/source/common/param.cpp:2069:14:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
        s += sprintf(s, " Level 0,1,2=%d,%d,%d", p->hmeSearchMethod[0], p->hmeSearchMethod[1], p->hmeSearchMethod[2]);
data/x265-3.4/source/common/param.cpp:2070:14:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
        s += sprintf(s, " merange L0,L1,L2=%d,%d,%d", p->hmeRange[0], p->hmeRange[1], p->hmeRange[2]);
data/x265-3.4/source/common/param.cpp:2077:14:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
        s += sprintf(s, "=%d:%d", p->deblockingFilterTCOffset, p->deblockingFilterBetaOffset);
data/x265-3.4/source/common/param.cpp:2080:10:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    s += sprintf(s, " rd=%d", p->rdLevel);
data/x265-3.4/source/common/param.cpp:2081:10:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    s += sprintf(s, " selective-sao=%d", p->selectiveSAO);
data/x265-3.4/source/common/param.cpp:2085:14:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
        s += sprintf(s, " rskip-edge-threshold=%f", p->edgeVarThreshold);
data/x265-3.4/source/common/param.cpp:2092:10:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    s += sprintf(s, " rdpenalty=%d", p->rdPenalty);
data/x265-3.4/source/common/param.cpp:2093:10:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    s += sprintf(s, " psy-rd=%.2f", p->psyRd);
data/x265-3.4/source/common/param.cpp:2094:10:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    s += sprintf(s, " psy-rdoq=%.2f", p->psyRdoq);
data/x265-3.4/source/common/param.cpp:2097:10:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    s += sprintf(s, " cbqpoffs=%d", p->cbQpOffset);
data/x265-3.4/source/common/param.cpp:2098:10:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    s += sprintf(s, " crqpoffs=%d", p->crQpOffset);
data/x265-3.4/source/common/param.cpp:2105:18:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
            s += sprintf(s, " crf=%.1f", p->rc.rfConstant);
data/x265-3.4/source/common/param.cpp:2107:18:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
            s += sprintf(s, " bitrate=%d", p->rc.bitrate);
data/x265-3.4/source/common/param.cpp:2108:14:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
        s += sprintf(s, " qcomp=%.2f qpstep=%d", p->rc.qCompress, p->rc.qpStep);
data/x265-3.4/source/common/param.cpp:2109:14:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
        s += sprintf(s, " stats-write=%d", p->rc.bStatWrite);
data/x265-3.4/source/common/param.cpp:2110:14:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
        s += sprintf(s, " stats-read=%d", p->rc.bStatRead);
data/x265-3.4/source/common/param.cpp:2112:18:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
            s += sprintf(s, " cplxblur=%.1f qblur=%.1f",
data/x265-3.4/source/common/param.cpp:2118:18:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
            s += sprintf(s, " vbv-maxrate=%d vbv-bufsize=%d vbv-init=%.1f",
data/x265-3.4/source/common/param.cpp:2121:22:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
                s += sprintf(s, " vbv-end=%.1f vbv-end-fr-adj=%.1f", p->vbvBufferEnd, p->vbvEndFrameAdjust);
data/x265-3.4/source/common/param.cpp:2123:22:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
                s += sprintf(s, " crf-max=%.1f crf-min=%.1f", p->rc.rfConstantMax, p->rc.rfConstantMin);   
data/x265-3.4/source/common/param.cpp:2127:14:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
        s += sprintf(s, " qp=%d", p->rc.qp);
data/x265-3.4/source/common/param.cpp:2130:14:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
        s += sprintf(s, " ipratio=%.2f", p->rc.ipFactor);
data/x265-3.4/source/common/param.cpp:2132:18:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
            s += sprintf(s, " pbratio=%.2f", p->rc.pbFactor);
data/x265-3.4/source/common/param.cpp:2134:10:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    s += sprintf(s, " aq-mode=%d", p->rc.aqMode);
data/x265-3.4/source/common/param.cpp:2135:10:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    s += sprintf(s, " aq-strength=%.2f", p->rc.aqStrength);
data/x265-3.4/source/common/param.cpp:2137:10:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    s += sprintf(s, " zone-count=%d", p->rc.zoneCount);
data/x265-3.4/source/common/param.cpp:2142:18:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
            s += sprintf(s, " zones: start-frame=%d end-frame=%d",
data/x265-3.4/source/common/param.cpp:2145:22:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
                s += sprintf(s, " qp=%d", p->rc.zones[i].qp);
data/x265-3.4/source/common/param.cpp:2147:22:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
                s += sprintf(s, " bitrate-factor=%f", p->rc.zones[i].bitrateFactor);
data/x265-3.4/source/common/param.cpp:2151:10:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    s += sprintf(s, " qg-size=%d", p->rc.qgSize);
data/x265-3.4/source/common/param.cpp:2153:10:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    s += sprintf(s, " qpmax=%d qpmin=%d", p->rc.qpMax, p->rc.qpMin);
data/x265-3.4/source/common/param.cpp:2155:10:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    s += sprintf(s, " sar=%d", p->vui.aspectRatioIdc);
data/x265-3.4/source/common/param.cpp:2157:14:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
        s += sprintf(s, " sar-width : sar-height=%d:%d", p->vui.sarWidth, p->vui.sarHeight);
data/x265-3.4/source/common/param.cpp:2158:10:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    s += sprintf(s, " overscan=%d", p->vui.bEnableOverscanInfoPresentFlag);
data/x265-3.4/source/common/param.cpp:2160:14:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
        s += sprintf(s, " overscan-crop=%d", p->vui.bEnableOverscanAppropriateFlag);
data/x265-3.4/source/common/param.cpp:2161:10:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    s += sprintf(s, " videoformat=%d", p->vui.videoFormat);
data/x265-3.4/source/common/param.cpp:2162:10:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    s += sprintf(s, " range=%d", p->vui.bEnableVideoFullRangeFlag);
data/x265-3.4/source/common/param.cpp:2163:10:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    s += sprintf(s, " colorprim=%d", p->vui.colorPrimaries);
data/x265-3.4/source/common/param.cpp:2164:10:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    s += sprintf(s, " transfer=%d", p->vui.transferCharacteristics);
data/x265-3.4/source/common/param.cpp:2165:10:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    s += sprintf(s, " colormatrix=%d", p->vui.matrixCoeffs);
data/x265-3.4/source/common/param.cpp:2166:10:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    s += sprintf(s, " chromaloc=%d", p->vui.bEnableChromaLocInfoPresentFlag);
data/x265-3.4/source/common/param.cpp:2168:14:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
        s += sprintf(s, " chromaloc-top=%d chromaloc-bottom=%d",
data/x265-3.4/source/common/param.cpp:2170:10:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    s += sprintf(s, " display-window=%d", p->vui.bEnableDefaultDisplayWindowFlag);
data/x265-3.4/source/common/param.cpp:2172:14:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
        s += sprintf(s, " left=%d top=%d right=%d bottom=%d",
data/x265-3.4/source/common/param.cpp:2178:14:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
        s += sprintf(s, " cll=%hu,%hu", p->maxCLL, p->maxFALL);
data/x265-3.4/source/common/param.cpp:2179:10:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    s += sprintf(s, " min-luma=%hu", p->minLuma);
data/x265-3.4/source/common/param.cpp:2180:10:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    s += sprintf(s, " max-luma=%hu", p->maxLuma);
data/x265-3.4/source/common/param.cpp:2181:10:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    s += sprintf(s, " log2-max-poc-lsb=%d", p->log2MaxPocLsb);
data/x265-3.4/source/common/param.cpp:2184:10:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    s += sprintf(s, " slices=%d", p->maxSlices);
data/x265-3.4/source/common/param.cpp:2188:10:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    s += sprintf(s, " scenecut-bias=%.2f", p->scenecutBias);
data/x265-3.4/source/common/param.cpp:2189:10:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    s += sprintf(s, " hist-threshold=%.2f", p->edgeTransitionThreshold);
data/x265-3.4/source/common/param.cpp:2197:14:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
        s += sprintf(s, " analysis-save");
data/x265-3.4/source/common/param.cpp:2199:14:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
        s += sprintf(s, " analysis-load");
data/x265-3.4/source/common/param.cpp:2200:10:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    s += sprintf(s, " analysis-reuse-level=%d", p->analysisReuseLevel);
data/x265-3.4/source/common/param.cpp:2201:10:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    s += sprintf(s, " analysis-save-reuse-level=%d", p->analysisSaveReuseLevel);
data/x265-3.4/source/common/param.cpp:2202:10:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    s += sprintf(s, " analysis-load-reuse-level=%d", p->analysisLoadReuseLevel);
data/x265-3.4/source/common/param.cpp:2203:10:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    s += sprintf(s, " scale-factor=%d", p->scaleFactor);
data/x265-3.4/source/common/param.cpp:2204:10:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    s += sprintf(s, " refine-intra=%d", p->intraRefine);
data/x265-3.4/source/common/param.cpp:2205:10:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    s += sprintf(s, " refine-inter=%d", p->interRefine);
data/x265-3.4/source/common/param.cpp:2206:10:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    s += sprintf(s, " refine-mv=%d", p->mvRefine);
data/x265-3.4/source/common/param.cpp:2207:10:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    s += sprintf(s, " refine-ctu-distortion=%d", p->ctuDistortionRefine);
data/x265-3.4/source/common/param.cpp:2209:10:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    s += sprintf(s, " ctu-info=%d", p->bCTUInfo);
data/x265-3.4/source/common/param.cpp:2211:10:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    s += sprintf(s, " refine-analysis-type=%d", p->bAnalysisType);
data/x265-3.4/source/common/param.cpp:2212:10:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    s += sprintf(s, " copy-pic=%d", p->bCopyPicToFrame);
data/x265-3.4/source/common/param.cpp:2213:10:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    s += sprintf(s, " max-ausize-factor=%.1f", p->maxAUSizeFactor);
data/x265-3.4/source/common/param.cpp:2219:10:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    s += sprintf(s, " qp-adaptation-range=%.2f", p->rc.qpAdaptationRange);
data/x265-3.4/source/common/param.cpp:2222:14:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
        s += sprintf(s, " scenecut-window=%d max-qp-delta=%d", p->scenecutWindow, p->maxQpDelta);
data/x265-3.4/source/common/param.cpp:2223:10:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    s += sprintf(s, "conformance-window-offsets right=%d bottom=%d", p->confWinRightOffset, p->confWinBottomOffset);
data/x265-3.4/source/common/param.cpp:2224:10:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    s += sprintf(s, " decoder-max-rate=%d", p->decoderVbvMaxRate);
data/x265-3.4/source/common/param.cpp:2241: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 line[2048];
data/x265-3.4/source/common/param.cpp:2448: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(dst->rc.zones[i].zoneParam, src->rc.zones[i].zoneParam, sizeof(x265_param));
data/x265-3.4/source/common/param.cpp:2580: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(dst->svtHevcParam, src->svtHevcParam, sizeof(EB_H265_ENC_CONFIGURATION));
data/x265-3.4/source/common/param.cpp:2728: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).
    OPT("input-depth") svtHevcParam->encoderBitDepth = atoi(value);
data/x265-3.4/source/common/param.cpp:2729:59:  [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).
    OPT("total-frames") svtHevcParam->framesToBeEncoded = atoi(value);
data/x265-3.4/source/common/param.cpp:2730: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).
    OPT("frames") svtHevcParam->framesToBeEncoded = atoi(value);
data/x265-3.4/source/common/param.cpp:2737:23:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
            int fps = atoi(value);
data/x265-3.4/source/common/param.cpp:2753:18:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
        else if (atoi(value) < 100)
data/x265-3.4/source/common/param.cpp:2754:35:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
            svtHevcParam->level = atoi(value);
data/x265-3.4/source/common/param.cpp:2791:55:  [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).
                    svtHevcParam->logicalProcessors = atoi(temp2);
data/x265-3.4/source/common/param.cpp:2802: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).
                svtHevcParam->logicalProcessors = atoi(temp1);
data/x265-3.4/source/common/param.cpp:2807:47:  [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).
    OPT("qpmin") svtHevcParam->minQpAllowed = atoi(value);
data/x265-3.4/source/common/param.cpp:2808:47:  [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).
    OPT("qpmax") svtHevcParam->maxQpAllowed = atoi(value);
data/x265-3.4/source/common/param.cpp:2809:59:  [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).
    OPT("rc-lookahead") svtHevcParam->lookAheadDistance = atoi(value);
data/x265-3.4/source/common/param.cpp:2834: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).
    OPT("keyint") svtHevcParam->intraPeriodLength = atoi(value);
data/x265-3.4/source/common/param.cpp:2842: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).
        svtHevcParam->qp = atoi(value);
data/x265-3.4/source/common/param.cpp:2847:39:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
        svtHevcParam->targetBitRate = atoi(value);
data/x265-3.4/source/common/param.cpp:2863:61:  [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).
    OPT("svt-search-width") svtHevcParam->searchAreaWidth = atoi(value);
data/x265-3.4/source/common/param.cpp:2864:63:  [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).
    OPT("svt-search-height") svtHevcParam->searchAreaHeight = atoi(value);
data/x265-3.4/source/common/param.cpp:2882:70:  [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).
    OPT("svt-hierarchical-level") svtHevcParam->hierarchicalLevels = atoi(value);
data/x265-3.4/source/common/param.cpp:2883:75:  [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).
    OPT("svt-base-layer-switch-mode") svtHevcParam->baseLayerSwitchMode = atoi(value);
data/x265-3.4/source/common/param.cpp:2884:67:  [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).
    OPT("svt-pred-struct") svtHevcParam->predStructure = (uint8_t)atoi(value);
data/x265-3.4/source/common/param.cpp:2886:83:  [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).
    OPT("master-display") svtHevcParam->useMasteringDisplayColorVolume = (uint8_t)atoi(value);
data/x265-3.4/source/common/param.cpp:2888:59:  [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).
    OPT("nalu-file") svtHevcParam->useNaluFile = (uint8_t)atoi(value);
data/x265-3.4/source/common/param.cpp:2893:18:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
        else if (atoi(value) < 100)
data/x265-3.4/source/common/param.cpp:2894:48:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
            svtHevcParam->dolbyVisionProfile = atoi(value);
data/x265-3.4/source/common/picyuv.cpp:277: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(yPixel, yChar, width * sizeof(pixel));
data/x265-3.4/source/common/picyuv.cpp:293:21:  [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(uPixel, uChar, (width >> m_hChromaShift) * sizeof(pixel));
data/x265-3.4/source/common/picyuv.cpp:294:21:  [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(vPixel, vChar, (width >> m_hChromaShift) * sizeof(pixel));
data/x265-3.4/source/common/picyuv.cpp:438: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(Y + i * m_stride, Y, (width + padx) * sizeof(pixel));
data/x265-3.4/source/common/picyuv.cpp:459: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(U + j * m_strideC, U, ((width + padx) >> m_hChromaShift) * sizeof(pixel));
data/x265-3.4/source/common/picyuv.cpp:460: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(V + j * m_strideC, V, ((width + padx) >> m_hChromaShift) * sizeof(pixel));
data/x265-3.4/source/common/pixel.cpp:1035: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(top - (y + 1) * stride, top, stride * sizeof(pixel));
data/x265-3.4/source/common/pixel.cpp:1040: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(bot + (y + 1) * stride, bot, stride * sizeof(pixel));
data/x265-3.4/source/common/predict.cpp:740: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(dst, adiTemp, refSize * sizeof(pixel));
data/x265-3.4/source/common/predict.cpp:790: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(adi, adiTemp, aboveUnits * unitWidth * sizeof(*adiTemp));
data/x265-3.4/source/common/predict.cpp:870: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(dst, adi, refSize * sizeof(pixel));
data/x265-3.4/source/common/primitives.cpp:217: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[1000];
data/x265-3.4/source/common/primitives.cpp:218:25:  [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.
        char *p = buf + sprintf(buf, "using cpu capabilities:");
data/x265-3.4/source/common/primitives.cpp:243:13:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
            sprintf(p, " none!");
data/x265-3.4/source/common/scalinglist.cpp:233: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(m_scalingListCoef[sizeId][listId], getScalingListDefaultAddress(sizeId, listId), sizeof(int) * X265_MIN(MAX_MATRIX_COEF_NUM, s_numCoefPerSize[sizeId]));
data/x265-3.4/source/common/scalinglist.cpp: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 line[1024];
data/x265-3.4/source/common/scalinglist.h:45: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 MatrixType[4][6][20];
data/x265-3.4/source/common/scalinglist.h:46: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 MatrixType_DC[4][12][22];
data/x265-3.4/source/common/threadpool.cpp:307:10:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
         char poolString[50] = "";
data/x265-3.4/source/common/threadpool.cpp:310: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.
             char nextCount[10] = "";
data/x265-3.4/source/common/threadpool.cpp:312:18:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
                 sprintf(nextCount, ",%d", cpusPerNode[i]);
data/x265-3.4/source/common/threadpool.cpp:314: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.
                   sprintf(nextCount, "%d", cpusPerNode[i]);
data/x265-3.4/source/common/threadpool.cpp:348: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).
                int count = atoi(nodeStr);
data/x265-3.4/source/common/threadpool.cpp:455: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.
                        len += sprintf(nodesstr + len, ",%d", j);
data/x265-3.4/source/dynamicHDR10/json11/json11.cpp:65: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[32];
data/x265-3.4/source/dynamicHDR10/json11/json11.cpp:74: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[32];
data/x265-3.4/source/dynamicHDR10/json11/json11.cpp:102: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[8];
data/x265-3.4/source/dynamicHDR10/json11/json11.cpp:331: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[12];
data/x265-3.4/source/dynamicHDR10/json11/json11.cpp:601: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).
            return std::atoi(str.c_str() + start_pos);
data/x265-3.4/source/encoder/analysis.cpp:186: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(ctu.m_cuDepth, m_frame->m_addOnDepth[ctu.m_cuAddr], sizeof(uint8_t) * numPartition);
data/x265-3.4/source/encoder/analysis.cpp:231: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(ctu.m_cuDepth, &intraDataCTU->depth[ctu.m_cuAddr * numPartition], sizeof(uint8_t) * numPartition);
data/x265-3.4/source/encoder/analysis.cpp:232: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(ctu.m_lumaIntraDir, &intraDataCTU->modes[ctu.m_cuAddr * numPartition], sizeof(uint8_t) * numPartition);
data/x265-3.4/source/encoder/analysis.cpp:233: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(ctu.m_partSize, &intraDataCTU->partSizes[ctu.m_cuAddr * numPartition], sizeof(char) * numPartition);
data/x265-3.4/source/encoder/analysis.cpp:234: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(ctu.m_chromaIntraDir, &intraDataCTU->chromaModes[ctu.m_cuAddr * numPartition], sizeof(uint8_t) * numPartition);
data/x265-3.4/source/encoder/analysis.cpp:249: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(ctu.m_cuDepth, &interDataCTU->depth[posCTU], sizeof(uint8_t) * numPartition);
data/x265-3.4/source/encoder/analysis.cpp:250: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(ctu.m_predMode, &interDataCTU->modes[posCTU], sizeof(uint8_t) * numPartition);
data/x265-3.4/source/encoder/analysis.cpp:251: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(ctu.m_partSize, &interDataCTU->partSize[posCTU], sizeof(uint8_t) * numPartition);
data/x265-3.4/source/encoder/analysis.cpp:253: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(ctu.m_skipFlag[list], &m_frame->m_analysisData.modeFlag[list][posCTU], sizeof(uint8_t) * numPartition);
data/x265-3.4/source/encoder/analysis.cpp:258: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(ctu.m_lumaIntraDir, &intraDataCTU->modes[posCTU], sizeof(uint8_t) * numPartition);
data/x265-3.4/source/encoder/analysis.cpp:259: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(ctu.m_chromaIntraDir, &intraDataCTU->chromaModes[posCTU], sizeof(uint8_t) * numPartition);
data/x265-3.4/source/encoder/analysis.cpp:286: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(ctu.m_cuDepth, &interDataCTU->depth[posCTU], sizeof(uint8_t) * numPartition);
data/x265-3.4/source/encoder/analysis.cpp:287: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(ctu.m_predMode, &interDataCTU->modes[posCTU], sizeof(uint8_t) * numPartition);
data/x265-3.4/source/encoder/analysis.cpp:288: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(ctu.m_partSize, &interDataCTU->partSize[posCTU], sizeof(uint8_t) * numPartition);
data/x265-3.4/source/encoder/analysis.cpp:292: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(ctu.m_lumaIntraDir, &intraDataCTU->modes[posCTU], sizeof(uint8_t) * numPartition);
data/x265-3.4/source/encoder/analysis.cpp:293: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(ctu.m_chromaIntraDir, &intraDataCTU->chromaModes[posCTU], sizeof(uint8_t) * numPartition);
data/x265-3.4/source/encoder/analysis.cpp:545: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(mode.cu.m_lumaIntraDir, parentCTU.m_lumaIntraDir + cuGeom.absPartIdx, cuGeom.numPartitions);
data/x265-3.4/source/encoder/analysis.cpp:546: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(mode.cu.m_chromaIntraDir, parentCTU.m_chromaIntraDir + cuGeom.absPartIdx, cuGeom.numPartitions);
data/x265-3.4/source/encoder/analysis.cpp:2465:21:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                    memcpy(mode.cu.m_lumaIntraDir, parentCTU.m_lumaIntraDir + cuGeom.absPartIdx, cuGeom.numPartitions);
data/x265-3.4/source/encoder/analysis.cpp:2466:21:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                    memcpy(mode.cu.m_chromaIntraDir, parentCTU.m_chromaIntraDir + cuGeom.absPartIdx, cuGeom.numPartitions);
data/x265-3.4/source/encoder/api.cpp:145: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(encoder->m_svtAppData->svtHevcParams, param->svtHevcParam, sizeof(EB_H265_ENC_CONFIGURATION));
data/x265-3.4/source/encoder/api.cpp:163: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(param->svtHevcParam, encoder->m_svtAppData->svtHevcParams, sizeof(EB_H265_ENC_CONFIGURATION));
data/x265-3.4/source/encoder/api.cpp:203: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(param->rc.zones[i].zoneParam, param, sizeof(x265_param));
data/x265-3.4/source/encoder/api.cpp:208: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(zoneParam, param, sizeof(x265_param));
data/x265-3.4/source/encoder/api.cpp:368: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(&encoder->m_vps.ptl, &saveVPS.ptl, sizeof(saveVPS.ptl));
data/x265-3.4/source/encoder/api.cpp:401: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(zone->relativeComplexity, zone_in->relativeComplexity, sizeof(double) * encoder->m_param->reconfigWindowSize);
data/x265-3.4/source/encoder/api.cpp:454:21:  [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(inputData->dolbyVisionRpu.payload, pic_in->rpu.payload, pic_in->rpu.payloadSize);
data/x265-3.4/source/encoder/api.cpp:1554: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[200];
data/x265-3.4/source/encoder/encoder.cpp:294: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/x265-3.4/source/encoder/encoder.cpp:297: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.
        len += sprintf(buf + len, "wpp(%d rows)", rows);
data/x265-3.4/source/encoder/encoder.cpp:303:9:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
        strcpy(buf, "none");
data/x265-3.4/source/encoder/encoder.cpp:678: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(&(intraData)->depth[cuPos], &(srcIntraData)->depth[mbIndex * 16], 16);
data/x265-3.4/source/encoder/encoder.cpp:679: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(&(intraData)->chromaModes[cuPos], &(srcIntraData)->chromaModes[mbIndex * 16], 16);
data/x265-3.4/source/encoder/encoder.cpp:680: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(&(intraData)->partSizes[cuPos], &(srcIntraData)->partSizes[mbIndex * 16], 16);
data/x265-3.4/source/encoder/encoder.cpp:681: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(&(intraData)->partSizes[cuPos], &(srcIntraData)->partSizes[mbIndex * 16], 16);
data/x265-3.4/source/encoder/encoder.cpp:684: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(&(intraData)->modes, (srcIntraData)->modes, curFrame->m_analysisData.numPartitions * analysis_data->numCUsInFrame);
data/x265-3.4/source/encoder/encoder.cpp:708: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(&(interData)->depth[cuPos], &(srcInterData)->depth[mbIndex * 16], 16);
data/x265-3.4/source/encoder/encoder.cpp:709: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(&(interData)->modes[cuPos], &(srcInterData)->modes[mbIndex * 16], 16);
data/x265-3.4/source/encoder/encoder.cpp:711: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(&(interData)->partSize[cuPos], &(srcInterData)->partSize[mbIndex * 16], 16);
data/x265-3.4/source/encoder/encoder.cpp:730:29:  [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(&(interData)->mv[k][cuPos + cuOffset], &(srcInterData)->mv[k][(mbIndex * 16) + cuOffset], sizeof(MV));
data/x265-3.4/source/encoder/encoder.cpp:781: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(&(currIntraData)->modes, (intraData)->modes, curFrame->m_analysisData.numPartitions * analysis_data->numCUsInFrame);
data/x265-3.4/source/encoder/encoder.cpp:798:21:  [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(&(currInterData)->sadCost[count], &(analysis_data->interData)->sadCost[d], bytes);
data/x265-3.4/source/encoder/encoder.cpp:814:37:  [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(&(currInterData)->mv[i][count + pu], &(interData)->mv[i][d], sizeof(MV));
data/x265-3.4/source/encoder/encoder.cpp:1069: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(toneMap.payload, &m_cim[currentPOC][i + 1], toneMap.payloadSize);
data/x265-3.4/source/encoder/encoder.cpp:1109: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(frame->m_userSEI.payloads[i].payload, input.payload, input.payloadSize);
data/x265-3.4/source/encoder/encoder.cpp:1359:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(dest->planes[0], src->planes[0], src->framesize * sizeof(char));
data/x265-3.4/source/encoder/encoder.cpp:1491: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(m_curMaxUVHist, m_curUVHist[0], HISTOGRAM_BINS * sizeof(int32_t));
data/x265-3.4/source/encoder/encoder.cpp:1527: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(m_prevMaxUVHist, m_curMaxUVHist, bufsize);
data/x265-3.4/source/encoder/encoder.cpp:1528: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(m_prevEdgeHist, m_curEdgeHist, 2 * sizeof(int32_t));
data/x265-3.4/source/encoder/encoder.cpp:1810: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(inFrame->m_rpu.payload, inputPic->rpu.payload, inputPic->rpu.payloadSize);
data/x265-3.4/source/encoder/encoder.cpp:1820: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(inFrame->m_quantOffsets, inputPic->quantOffsets, cuCount * sizeof(float));
data/x265-3.4/source/encoder/encoder.cpp:2528: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(ctuTemp->ctuPartitions, frameCtuInfo[i]->ctuPartitions, sizeof(int32_t) * maxNum8x8Partitions);
data/x265-3.4/source/encoder/encoder.cpp:2529: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(ctuTemp->ctuInfo, frameCtuInfo[i]->ctuInfo, sizeof(int32_t) * maxNum8x8Partitions);
data/x265-3.4/source/encoder/encoder.cpp:2561:29:  [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(ctuTemp->ctuPartitions, frameCtuInfo[l]->ctuPartitions, sizeof(int32_t) * maxNum8x8Partitions);
data/x265-3.4/source/encoder/encoder.cpp:2562:29:  [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(ctuTemp->ctuInfo, frameCtuInfo[l]->ctuInfo, sizeof(int32_t) * maxNum8x8Partitions);
data/x265-3.4/source/encoder/encoder.cpp:2621:15:  [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.
    int len = sprintf(buffer, "%6u, ", stat.m_numPics);
data/x265-3.4/source/encoder/encoder.cpp:2623: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.
    len += sprintf(buffer + len, "Avg QP:%2.2lf", stat.m_totalQp / (double)stat.m_numPics);
data/x265-3.4/source/encoder/encoder.cpp:2624: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.
    len += sprintf(buffer + len, "  kb/s: %-8.2lf", stat.m_accBits * scale);
data/x265-3.4/source/encoder/encoder.cpp:2627: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.
        len += sprintf(buffer + len, "  PSNR Mean: Y:%.3lf U:%.3lf V:%.3lf",
data/x265-3.4/source/encoder/encoder.cpp:2634: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(buffer + len, "  SSIM Mean: %.6lf (%.3lfdB)",
data/x265-3.4/source/encoder/encoder.cpp:2646:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buffer[200];
data/x265-3.4/source/encoder/encoder.cpp:2673:18:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
            p += sprintf(buffer + p, "%.1f%% ", 100. * m_lookahead->m_histogram[i] / pWithB);
data/x265-3.4/source/encoder/encoder.cpp:2700:14:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
        p += sprintf(buffer + p, "\nencoded %d frames in %.2fs (%.2f fps), %.2f kb/s, Avg QP:%2.2lf", m_analyzeAll.m_numPics,
data/x265-3.4/source/encoder/encoder.cpp:2706:18:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
            p += sprintf(buffer + p, ", Global PSNR: %.3f", globalPsnr);
data/x265-3.4/source/encoder/encoder.cpp:2710:18:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
            p += sprintf(buffer + p, ", SSIM Mean Y: %.7f (%6.3f dB)", m_analyzeAll.m_globalSsim / m_analyzeAll.m_numPics, x265_ssim2dB(m_analyzeAll.m_globalSsim / m_analyzeAll.m_numPics));
data/x265-3.4/source/encoder/encoder.cpp:3456: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(zone, p, sizeof(x265_param));
data/x265-3.4/source/encoder/encoder.cpp:4262: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(val, src, (size * readSize));\
data/x265-3.4/source/encoder/encoder.cpp:4454: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(((x265_analysis_inter_data *)analysis->interData)->depth, interPic->depth, depthBytes);
data/x265-3.4/source/encoder/encoder.cpp:4528:33:  [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(&(analysis->interData)->mv[i][count + pu], &mv[i][d], sizeof(MV));
data/x265-3.4/source/encoder/encoder.cpp:4585: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(val, src, (size * readSize));\
data/x265-3.4/source/encoder/encoder.cpp:4911:33:  [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(&(analysis->interData)->mv[i][count + pu], &mvCopy[i], sizeof(MV));
data/x265-3.4/source/encoder/encoder.cpp:5008: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(val, src, (size * readSize));\
data/x265-3.4/source/encoder/encoder.cpp:5335:21:  [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(&(analysis->interData)->mv[i][j], MVBuf[i] + d, sizeof(MV));
data/x265-3.4/source/encoder/encoder.cpp:5336:21:  [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(&(analysis->interData)->mvpIdx[i][j], mvpBuf[i] + d, sizeof(uint8_t));
data/x265-3.4/source/encoder/encoder.cpp:5337:21:  [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(&ref[j], refBuf + (i * depthBytes) + d, sizeof(int32_t));
data/x265-3.4/source/encoder/encoder.cpp:5445: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(&intraDataCTU->modes[ctu->m_cuAddr * ctu->m_numPartitions], ctu->m_lumaIntraDir, sizeof(uint8_t)* ctu->m_numPartitions);
data/x265-3.4/source/encoder/encoder.cpp:5505:21:  [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(&intraDataCTU->modes[ctu->m_cuAddr * ctu->m_numPartitions], ctu->m_lumaIntraDir, sizeof(uint8_t)* ctu->m_numPartitions);
data/x265-3.4/source/encoder/encoder.cpp:5713:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char tmp[60];
data/x265-3.4/source/encoder/encoder.cpp:5736: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 line[1024];
data/x265-3.4/source/encoder/encoder.cpp:5739:19:  [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 poc = atoi(strtok(line, " "));
data/x265-3.4/source/encoder/encoder.cpp:5741:23:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
        int nalType = atoi(strtok(NULL, "/"));
data/x265-3.4/source/encoder/encoder.cpp:5742: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).
        int payloadType = atoi(strtok(NULL, " "));
data/x265-3.4/source/encoder/encoder.cpp:5767: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(seiMsg.payload, base64Decode, seiMsg.payloadSize);
data/x265-3.4/source/encoder/encoder.h:41:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
extern const char g_sliceTypeToChar[3];
data/x265-3.4/source/encoder/entropy.cpp:1515: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(m_contextState, src.m_contextState, MAX_OFF_CTX_MOD * sizeof(uint8_t));
data/x265-3.4/source/encoder/entropy.cpp:2392: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(m_contextState, src.m_contextState, MAX_OFF_CTX_MOD * sizeof(m_contextState[0]));
data/x265-3.4/source/encoder/frameencoder.cpp:388: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(m_top->m_prevTonemapPayload.payload, payload->payload, payload->payloadSize);
data/x265-3.4/source/encoder/frameencoder.cpp:1150: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(nr->nrOffsetDenoise, m_nr->nrOffsetDenoise, sizeof(uint16_t)* MAX_NUM_TR_CATEGORIES * MAX_NUM_TR_COEFFS);
data/x265-3.4/source/encoder/framefilter.cpp:307: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(&m_sao.m_tmpU[0][col * ctuWidth], recY, ctuWidth * sizeof(pixel));
data/x265-3.4/source/encoder/framefilter.cpp:317: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(&m_sao.m_tmpU[1][col * ctuWidth], recU, ctuWidth * sizeof(pixel));
data/x265-3.4/source/encoder/framefilter.cpp:318: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(&m_sao.m_tmpU[2][col * ctuWidth], recV, ctuWidth * sizeof(pixel));
data/x265-3.4/source/encoder/framefilter.cpp:406: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(pixY - (y + 1) * stride, pixY, copySizeY * sizeof(pixel));
data/x265-3.4/source/encoder/framefilter.cpp:412: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(pixU - (y + 1) * strideC, pixU, copySizeC * sizeof(pixel));
data/x265-3.4/source/encoder/framefilter.cpp:413: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(pixV - (y + 1) * strideC, pixV, copySizeC * sizeof(pixel));
data/x265-3.4/source/encoder/framefilter.cpp:425: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(pixY + (y + 1) * stride, pixY, copySizeY * sizeof(pixel));
data/x265-3.4/source/encoder/framefilter.cpp:431: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(pixU + (y + 1) * strideC, pixU, copySizeC * sizeof(pixel));
data/x265-3.4/source/encoder/framefilter.cpp:432: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(pixV + (y + 1) * strideC, pixV, copySizeC * sizeof(pixel));
data/x265-3.4/source/encoder/level.cpp:223: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 profbuf[64];
data/x265-3.4/source/encoder/level.cpp:233:17:  [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(profbuf, "Main 4:4:4 16 Still Picture");
data/x265-3.4/source/encoder/level.cpp:237:17:  [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(profbuf, "Main 4:4:4 16");
data/x265-3.4/source/encoder/level.cpp:243:17:  [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(profbuf, "Main");
data/x265-3.4/source/encoder/level.cpp:245:17:  [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(profbuf, "Main 10");
data/x265-3.4/source/encoder/level.cpp:247:17:  [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(profbuf, "Main 12");
data/x265-3.4/source/encoder/level.cpp:253:17:  [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(profbuf, "Main 4:2:2 10");
data/x265-3.4/source/encoder/level.cpp:255:17:  [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(profbuf, "Main 4:2:2 12");
data/x265-3.4/source/encoder/level.cpp:263:21:  [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(profbuf, "Main 4:4:4 Still Picture");
data/x265-3.4/source/encoder/level.cpp:267:21:  [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(profbuf, "Main 4:4:4");
data/x265-3.4/source/encoder/level.cpp:270:17:  [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(profbuf, "Main 4:4:4 10");
data/x265-3.4/source/encoder/level.cpp:272:17:  [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(profbuf, "Main 4:4:4 12");
data/x265-3.4/source/encoder/level.cpp:275:13:  [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(profbuf, "Unknown");
data/x265-3.4/source/encoder/level.cpp:278:13:  [2] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant string.
            strcat(profbuf, " Intra");
data/x265-3.4/source/encoder/nal.cpp:52:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(m_nal, other.m_nal, sizeof(x265_nal) * m_numNal);
data/x265-3.4/source/encoder/nal.cpp:75: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(temp, m_buffer, m_occupancy);
data/x265-3.4/source/encoder/nal.cpp:102: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(out, startCodePrefix, 4);
data/x265-3.4/source/encoder/nal.cpp:107: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(out, startCodePrefix + 1, 3);
data/x265-3.4/source/encoder/nal.cpp:143: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(out + bytes, m_extraBuffer, m_extraOccupancy);
data/x265-3.4/source/encoder/ratecontrol.cpp:610: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 deltaPOC[128];
data/x265-3.4/source/encoder/ratecontrol.cpp:611: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 bUsed[40];
data/x265-3.4/source/encoder/ratecontrol.cpp:1284: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(m_relativeComplexity, m_param->rc.zones[i].relativeComplexity, sizeof(double) * m_param->reconfigWindowSize);
data/x265-3.4/source/encoder/ratecontrol.cpp:2983: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 deltaPOC[128];
data/x265-3.4/source/encoder/ratecontrol.cpp:2984: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 bUsed[40];
data/x265-3.4/source/encoder/ratecontrol.cpp:2987: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(deltaPOC, "deltapoc:~");
data/x265-3.4/source/encoder/ratecontrol.cpp:2988: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(bUsed, "bused:~");
data/x265-3.4/source/encoder/ratecontrol.cpp:3110: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 tmpStr[128];
data/x265-3.4/source/encoder/ratecontrol.cpp:3120: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).
            rce->rpsData.deltaPOC[idx] = atoi(tmpStr);
data/x265-3.4/source/encoder/ratecontrol.cpp:3133: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 tmpStr[128];
data/x265-3.4/source/encoder/ratecontrol.cpp:3143:39:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
            rce->rpsData.bUsed[idx] = atoi(tmpStr) > 0;
data/x265-3.4/source/encoder/reference.cpp:170: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(pixY - (y + 1) * stride, pixY, stride * sizeof(pixel));
data/x265-3.4/source/encoder/reference.cpp:180: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(pixY + (y + 1) * stride, pixY, stride * sizeof(pixel));
data/x265-3.4/source/encoder/search.cpp:664: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(coeffY, m_tsCoeff, sizeof(coeff_t) << (log2TrSize * 2));
data/x265-3.4/source/encoder/search.cpp:775: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(coeffDestY, coeffSrcY, sizeof(coeff_t) << (log2TrSize * 2));
data/x265-3.4/source/encoder/search.cpp:1074: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(coeffC, m_tsCoeff, sizeof(coeff_t) << (log2TrSizeC * 2));
data/x265-3.4/source/encoder/search.cpp:1118: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(coeffDstU, coeffSrcU, sizeof(coeff_t) * numCoeffC);
data/x265-3.4/source/encoder/search.cpp:1119: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(coeffDstV, coeffSrcV, sizeof(coeff_t) * numCoeffC);
data/x265-3.4/source/encoder/search.cpp:1335: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(&intraNeighbourBuf[0][1], &nScale[1], 2 * 64 * sizeof(pixel));   // Top & Left pixels
data/x265-3.4/source/encoder/search.cpp:1336: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(&intraNeighbourBuf[1][1], &nScale[1], 2 * 64 * sizeof(pixel));
data/x265-3.4/source/encoder/search.cpp:1837: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(m_qtTempCbf[1], cu.m_cbf[1] + absPartIdxC, tuIterator.absPartIdxStep * sizeof(uint8_t));
data/x265-3.4/source/encoder/search.cpp:1838: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(m_qtTempCbf[2], cu.m_cbf[2] + absPartIdxC, tuIterator.absPartIdxStep * sizeof(uint8_t));
data/x265-3.4/source/encoder/search.cpp:1839: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(m_qtTempTransformSkipFlag[1], cu.m_transformSkip[1] + absPartIdxC, tuIterator.absPartIdxStep * sizeof(uint8_t));
data/x265-3.4/source/encoder/search.cpp:1840: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(m_qtTempTransformSkipFlag[2], cu.m_transformSkip[2] + absPartIdxC, tuIterator.absPartIdxStep * sizeof(uint8_t));
data/x265-3.4/source/encoder/search.cpp:1861: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(cu.m_cbf[1] + absPartIdxC, m_qtTempCbf[1], tuIterator.absPartIdxStep * sizeof(uint8_t));
data/x265-3.4/source/encoder/search.cpp:1862: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(cu.m_cbf[2] + absPartIdxC, m_qtTempCbf[2], tuIterator.absPartIdxStep * sizeof(uint8_t));
data/x265-3.4/source/encoder/search.cpp:1863: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(cu.m_transformSkip[1] + absPartIdxC, m_qtTempTransformSkipFlag[1], tuIterator.absPartIdxStep * sizeof(uint8_t));
data/x265-3.4/source/encoder/search.cpp:1864: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(cu.m_transformSkip[2] + absPartIdxC, m_qtTempTransformSkipFlag[2], tuIterator.absPartIdxStep * sizeof(uint8_t));
data/x265-3.4/source/encoder/search.cpp:2671: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(blockBit, listBits[partIdx][lastMode], 3 * sizeof(uint32_t));
data/x265-3.4/source/encoder/search.cpp:2687: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(blockBit, listBits[partIdx][lastMode], 3 * sizeof(uint32_t));
data/x265-3.4/source/encoder/search.cpp:3568: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(coeffCurY, m_tsCoeff, sizeof(coeff_t) * numCoeffY);
data/x265-3.4/source/encoder/search.cpp:3644:25:  [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(coeffCurC + subTUOffset, m_tsCoeff, sizeof(coeff_t) * numCoeffC);
data/x265-3.4/source/encoder/search.cpp:3920: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(coeffDstY, coeffSrcY, sizeof(coeff_t) * numCoeffY);
data/x265-3.4/source/encoder/search.cpp:3933: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(coeffDstU, coeffSrcU, sizeof(coeff_t) * numCoeffC);
data/x265-3.4/source/encoder/search.cpp:3934: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(coeffDstV, coeffSrcV, sizeof(coeff_t) * numCoeffC);
data/x265-3.4/source/encoder/slicetype.cpp:170: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(edgePic, src, width * sizeof(pixel));
data/x265-3.4/source/encoder/slicetype.cpp:171: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(refPic, src, width * sizeof(pixel));
data/x265-3.4/source/encoder/slicetype.cpp:731: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(samples, pixCur, (2 * cuSize + 1) * sizeof(pixel)); /* top */
data/x265-3.4/source/encoder/slicetype.cpp:2044:17:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
                char best_paths[X265_BFRAME_MAX + 1][X265_LOOKAHEAD_MAX + 1] = { "", "P" };
data/x265-3.4/source/encoder/slicetype.cpp:2321: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 paths[2][X265_LOOKAHEAD_MAX + 1];
data/x265-3.4/source/encoder/slicetype.cpp:2331: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(paths[idx], best_paths[len % (X265_BFRAME_MAX + 1)], len);
data/x265-3.4/source/encoder/slicetype.cpp:2345: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(best_paths[length % (X265_BFRAME_MAX + 1)], paths[idx ^ 1], length);
data/x265-3.4/source/encoder/slicetype.cpp:2508: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(frames[0]->qpCuTreeOffset, frames[0]->qpAqOffset, m_cuCount * 4 * sizeof(double));
data/x265-3.4/source/encoder/slicetype.cpp:2510: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(frames[0]->qpCuTreeOffset, frames[0]->qpAqOffset, m_cuCount * sizeof(double));
data/x265-3.4/source/encoder/weightPrediction.cpp: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(slice.m_weightPredTable, wp, sizeof(WeightParam) * 2 * MAX_NUM_REF * 3);
data/x265-3.4/source/encoder/weightPrediction.cpp:509: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[1024];
data/x265-3.4/source/encoder/weightPrediction.cpp:513:13:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
        p = sprintf(buf, "poc: %d weights:", slice.m_poc);
data/x265-3.4/source/encoder/weightPrediction.cpp:521:22:  [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.
                p += sprintf(buf + p, " [L%d:R0 ", list);
data/x265-3.4/source/encoder/weightPrediction.cpp:523:26:  [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.
                    p += sprintf(buf + p, "Y{%d/%d%+d}", w[0].inputWeight, 1 << w[0].log2WeightDenom, w[0].inputOffset);
data/x265-3.4/source/encoder/weightPrediction.cpp:525:26:  [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.
                    p += sprintf(buf + p, "U{%d/%d%+d}", w[1].inputWeight, 1 << w[1].log2WeightDenom, w[1].inputOffset);
data/x265-3.4/source/encoder/weightPrediction.cpp:527:26:  [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.
                    p += sprintf(buf + p, "V{%d/%d%+d}", w[2].inputWeight, 1 << w[2].log2WeightDenom, w[2].inputOffset);
data/x265-3.4/source/input/input.cpp:30:23:  [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).
InputFile* InputFile::open(InputFileInfo& info, bool bForceY4m)
data/x265-3.4/source/input/input.h:69:23:  [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).
    static InputFile* open(InputFileInfo& info, bool bForceY4m);
data/x265-3.4/source/input/y4m.cpp:337: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 hbuf[sizeof(header) + 1];
data/x265-3.4/source/output/output.cpp:33:23:  [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).
ReconFile* ReconFile::open(const char *fname, int width, int height, uint32_t bitdepth, uint32_t fpsNum, uint32_t fpsDenom, int csp)
data/x265-3.4/source/output/output.cpp:43:25:  [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).
OutputFile* OutputFile::open(const char *fname, InputFileInfo& inputInfo)
data/x265-3.4/source/output/output.h:44:23:  [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).
    static ReconFile* open(const char *fname, int width, int height, uint32_t bitdepth,
data/x265-3.4/source/output/output.h:66:24:  [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).
    static OutputFile* open(const char* fname, InputFileInfo& inputInfo);
data/x265-3.4/source/output/reconplay.cpp:137: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, src, pwidth * sizeof(pixel));
data/x265-3.4/source/output/y4m.cpp:37:9:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    ofs.open(filename, ios::binary | ios::out);
data/x265-3.4/source/output/yuv.cpp:38:9:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    ofs.open(filename, ios::binary | ios::out);
data/x265-3.4/source/profile/vtune/vtune.cpp: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 threadname[128];
data/x265-3.4/source/test/pixelharness.cpp:1516: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(opt_dest, ref_dest, sizeof(ref_dest));
data/x265-3.4/source/test/pixelharness.cpp:2083: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(pixel_test_buff1[i], pixel_test_buff[i], sizeof(pixel) * BUFFSIZE);
data/x265-3.4/source/test/pixelharness.cpp:2116: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(pixel_test_buff1[i], pixel_test_buff[i], sizeof(pixel) * BUFFSIZE);
data/x265-3.4/source/test/pixelharness.cpp:2149: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(pixel_test_buff1[i], pixel_test_buff[i], sizeof(pixel)* BUFFSIZE);
data/x265-3.4/source/test/pixelharness.cpp:2180: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(pixel_test_buff1[i], pixel_test_buff[i], sizeof(pixel)* BUFFSIZE);
data/x265-3.4/source/test/pixelharness.cpp:3175:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char header[128];
data/x265-3.4/source/test/pixelharness.cpp:3346:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char header[128];
data/x265-3.4/source/test/testbench.cpp:162: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 name[12];
data/x265-3.4/source/test/testbench.cpp:221: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(&primitives, &asmprim, sizeof(EncoderPrimitives));
data/x265-3.4/source/test/testbench.cpp:257: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(&primitives, &optprim, sizeof(EncoderPrimitives));
data/x265-3.4/source/x265.cpp:136: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 line[1024];
data/x265-3.4/source/x265.cpp:152: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 line[1024];
data/x265-3.4/source/x265.cpp:174: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 *head[X265_HEAD_ENTRIES];
data/x265-3.4/source/x265.cpp:192:35:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
            cliopt[i].loadLevel = atoi(head[1]);
data/x265-3.4/source/x265cli.cpp:403:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char buf[200];
data/x265-3.4/source/x265cli.cpp:415:13:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
            sprintf(buf, "x265 [%.1f%%] %d/%d frames, %.2f fps, %.2f kb/s, eta %d:%02d:%02d",
data/x265-3.4/source/x265cli.cpp:420:13:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
            sprintf(buf, "x265 %d frames: %.2f fps, %.2f kb/s", frameNum, fps, bitrate);
data/x265-3.4/source/x265cli.cpp:442:34:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
                outputBitDepth = atoi(optarg);
data/x265-3.4/source/x265cli.cpp:480: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(globalParam->rc.zones[zonefileCount].zoneParam, globalParam, sizeof(x265_param));
data/x265-3.4/source/x265cli.cpp:567:34:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
                outputBitDepth = atoi(optarg);
data/x265-3.4/source/x265cli.cpp:787:34:  [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).
        this->input = InputFile::open(info, this->bForceY4m);
data/x265-3.4/source/x265cli.cpp:849: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[128];
data/x265-3.4/source/x265cli.cpp:856:22:  [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.
                p += sprintf(buf + p, " sar %d:%d", width, height);
data/x265-3.4/source/x265cli.cpp:859:17:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
                strcpy(buf + p, " unknown frame count");
data/x265-3.4/source/x265cli.cpp:861:17:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
                sprintf(buf + p, " frames %u - %d of %d", this->seek, this->seek + this->framesToBeEncoded - 1, info.frameCount);
data/x265-3.4/source/x265cli.cpp:872:38:  [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).
            this->recon = ReconFile::open(reconfn, param->sourceWidth, param->sourceHeight, reconFileBitDepth,
data/x265-3.4/source/x265cli.cpp:910:36:  [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).
        this->output = OutputFile::open(outputfn, info);
data/x265-3.4/source/x265cli.cpp:957: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 line[256];
data/x265-3.4/source/x265cli.cpp:982:49:  [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).
                param->rc.zones[i].startFrame = atoi(argLine);
data/x265-3.4/source/x265cli.h:40:8:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (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 orgConsoleTitle[CONSOLE_TITLE_SIZE] = "";
data/x265-3.4/source/abrEncApp.cpp:443:83:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                                if ((analysisData->poc == (uint32_t)(ipread)) && (read < write))
data/x265-3.4/source/abrEncApp.cpp:799:21:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                if (fgetc(m_cliopt.dolbyVisionRpu) != EOF)
data/x265-3.4/source/abrEncApp.cpp:970:46:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                while (overWritePicBuffer && read < overWritePicBuffer)
data/x265-3.4/source/abrEncApp.cpp:972:103:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                    read = m_parentEnc->m_parent->m_picIdxReadCnt[m_id][scaledWriteIdx].waitForChange(read);
data/x265-3.4/source/abrEncApp.cpp:1068:42:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            while (overWritePicBuffer && read < overWritePicBuffer)
data/x265-3.4/source/abrEncApp.cpp:1070:93:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                read = m_parentEnc->m_parent->m_picIdxReadCnt[m_id][writeIdx].waitForChange(read);
data/x265-3.4/source/common/param.cpp:675:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (strlen(name) + 1 < sizeof(nameBuf) && strchr(name, '_'))
data/x265-3.4/source/common/param.cpp:796:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (strlen(name) + 1 < sizeof(nameBuf) && strchr(name, '_'))
data/x265-3.4/source/common/param.cpp:1826:38:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    static const int overhead = (int)strlen("x265 [info]: tools: ");
data/x265-3.4/source/common/param.cpp:1828:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (strlen(buf) + strlen(toolstr) + overhead >= size)
data/x265-3.4/source/common/param.cpp:1828: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).
    if (strlen(buf) + strlen(toolstr) + overhead >= size)
data/x265-3.4/source/common/param.cpp:1835:9:  [1] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant character.
        strcat(buf, " ");
data/x265-3.4/source/common/param.cpp:1980:20:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        bufSize += strlen(p->numaPools);
data/x265-3.4/source/common/param.cpp:1982:20:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        bufSize += strlen(p->masteringDisplayColorVolume);
data/x265-3.4/source/common/threading.h:67:31:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
#define GIVE_UP_TIME()        usleep(0)
data/x265-3.4/source/common/threading.h:81:31:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
#define GIVE_UP_TIME()        usleep(0)
data/x265-3.4/source/common/threadpool.cpp:451:48:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                char *nodesstr = new char[64 * strlen(",63") + 1];
data/x265-3.4/source/compat/getopt/getopt.c:234:51:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
# if (!defined __STDC__ || !__STDC__) && !defined strlen
data/x265-3.4/source/compat/getopt/getopt.c:237: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).
extern int strlen (const char *);
data/x265-3.4/source/compat/getopt/getopt.c:428: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).
	      int len = nonoption_flags_max_len = strlen (orig_str);
data/x265-3.4/source/compat/getopt/getopt.c:656: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).
		== (unsigned int) strlen (p->name))
data/x265-3.4/source/compat/getopt/getopt.c:683: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).
	  nextchar += strlen (nextchar);
data/x265-3.4/source/compat/getopt/getopt.c:715: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).
		  nextchar += strlen (nextchar);
data/x265-3.4/source/compat/getopt/getopt.c:731: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).
		  nextchar += strlen (nextchar);
data/x265-3.4/source/compat/getopt/getopt.c:736: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).
	  nextchar += strlen (nextchar);
data/x265-3.4/source/compat/getopt/getopt.c:847:51:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	      if ((unsigned int) (nameend - nextchar) == strlen (p->name))
data/x265-3.4/source/compat/getopt/getopt.c:870: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).
	    nextchar += strlen (nextchar);
data/x265-3.4/source/compat/getopt/getopt.c:890: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).
		    nextchar += strlen (nextchar);
data/x265-3.4/source/compat/getopt/getopt.c:904: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).
		    nextchar += strlen (nextchar);
data/x265-3.4/source/compat/getopt/getopt.c:908: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).
	    nextchar += strlen (nextchar);
data/x265-3.4/source/encoder/api.cpp:393:19:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    if (write && (read < write))
data/x265-3.4/source/encoder/api.cpp:395:75:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        read = encoder->zoneReadCount[encoder->m_zoneIndex].waitForChange(read);
data/x265-3.4/source/encoder/encoder.cpp:147:38:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    char *output = X265_MALLOC(char, strlen(input) + strlen(suffix) + 1);
data/x265-3.4/source/encoder/encoder.cpp:147: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).
    char *output = X265_MALLOC(char, strlen(input) + strlen(suffix) + 1);
data/x265-3.4/source/encoder/encoder.cpp:1600:137:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    if ((pic_in && (!m_param->chunkEnd || (m_encodedFrameNum < m_param->chunkEnd))) || (m_param->bEnableFrameDuplication && !pic_in && (read < written)))
data/x265-3.4/source/encoder/encoder.cpp:1621:62:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        if ((m_param->bEnableFrameDuplication && !pic_in && (read < written)))
data/x265-3.4/source/encoder/encoder.cpp:1707:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            if (read < written)
data/x265-3.4/source/encoder/encoder.cpp:1924:51:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        if (m_param->bEnableFrameDuplication && ((read < written) || (m_dupBuffer[0]->dupPic->picStruct == tripling && (read <= written))))
data/x265-3.4/source/encoder/encoder.cpp:1924:121:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        if (m_param->bEnableFrameDuplication && ((read < written) || (m_dupBuffer[0]->dupPic->picStruct == tripling && (read <= written))))
data/x265-3.4/source/encoder/encoder.cpp:2712:9:  [1] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source is a constant character.
        sprintf(buffer + p, "\n");
data/x265-3.4/source/encoder/encoder.cpp:3246:46:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            char *buffer = X265_MALLOC(char, strlen(opts) + strlen(PFX(version_str)) +
data/x265-3.4/source/encoder/encoder.cpp:3246: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).
            char *buffer = X265_MALLOC(char, strlen(opts) + strlen(PFX(version_str)) +
data/x265-3.4/source/encoder/encoder.cpp:3247: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).
                strlen(PFX(build_info_str)) + 200);
data/x265-3.4/source/encoder/encoder.cpp:3257: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).
                idsei.setSize((uint32_t)strlen(buffer));
data/x265-3.4/source/encoder/encoder.cpp:5744:39:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        int base64EncodeLength = (int)strlen(base64Encode);
data/x265-3.4/source/encoder/level.cpp:479:16:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    size_t l = strlen(profile);
data/x265-3.4/source/encoder/ratecontrol.cpp:96:38:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    char *output = X265_MALLOC(char, strlen(input) + strlen(suffix) + 1);
data/x265-3.4/source/encoder/ratecontrol.cpp:96: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).
    char *output = X265_MALLOC(char, strlen(input) + strlen(suffix) + 1);
data/x265-3.4/source/encoder/ratecontrol.cpp:1274:22:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        if (write <= read)
data/x265-3.4/source/encoder/ratecontrol.cpp:3119:13:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
            strncpy(tmpStr, src, length);
data/x265-3.4/source/encoder/ratecontrol.cpp:3142:13:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
            strncpy(tmpStr, src, length);
data/x265-3.4/source/encoder/slicetype.cpp:2333: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(paths[idx] + len + path, "P");
data/x265-3.4/source/encoder/weightPrediction.cpp:528:22:  [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.
                p += sprintf(buf + p, "]");
data/x265-3.4/source/input/y4m.cpp:155:17:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    while ((c = fgetc(ifs)) != EOF)
data/x265-3.4/source/input/y4m.cpp:159:17:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            c = fgetc(ifs);
data/x265-3.4/source/input/y4m.cpp:163:21:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            switch (fgetc(ifs))
data/x265-3.4/source/input/y4m.cpp:167:29:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                while ((c = fgetc(ifs)) != EOF)
data/x265-3.4/source/input/y4m.cpp:177:29:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                while ((c = fgetc(ifs)) != EOF)
data/x265-3.4/source/input/y4m.cpp:189:29:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                while ((c = fgetc(ifs)) != EOF)
data/x265-3.4/source/input/y4m.cpp:194:37:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                        while ((c = fgetc(ifs)) != EOF)
data/x265-3.4/source/input/y4m.cpp:208:37:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                        while ((c = fgetc(ifs)) != EOF)
data/x265-3.4/source/input/y4m.cpp:225:29:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                while ((c = fgetc(ifs)) != EOF)
data/x265-3.4/source/input/y4m.cpp:229:37:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                        while ((c = fgetc(ifs)) != EOF)
data/x265-3.4/source/input/y4m.cpp:246:29:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                while ((c = fgetc(ifs)) != EOF)
data/x265-3.4/source/input/y4m.cpp:253:37:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                        while ((c = fgetc(ifs)) != EOF)
data/x265-3.4/source/input/y4m.cpp:288:29:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                while ((c = fgetc(ifs)) != EOF)
data/x265-3.4/source/input/y4m.cpp:347:18:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        if ((c = fgetc(ifs)) == EOF)
data/x265-3.4/source/input/y4m.cpp:352:22:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    while (written - read > QUEUE_SIZE - 2)
data/x265-3.4/source/input/y4m.cpp:354:40:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        read = readCount.waitForChange(read);
data/x265-3.4/source/input/y4m.cpp:385:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    if (read < written)
data/x265-3.4/source/input/y4m.cpp:396:29:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        pic.planes[0] = buf[read % QUEUE_SIZE];
data/x265-3.4/source/input/yuv.cpp:166:22:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    while (written - read > QUEUE_SIZE - 2)
data/x265-3.4/source/input/yuv.cpp:168:40:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        read = readCount.waitForChange(read);
data/x265-3.4/source/input/yuv.cpp:200:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    if (read < written)
data/x265-3.4/source/input/yuv.cpp:211:29:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        pic.planes[0] = buf[read % QUEUE_SIZE];
data/x265-3.4/source/output/reconplay.cpp:119:22:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    while (written - read > RECON_BUF_SIZE - 2 || poc[currentCursor] != -1)
data/x265-3.4/source/output/reconplay.cpp:121:40:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        read = readCount.waitForChange(read);
data/x265-3.4/source/output/reconplay.cpp:169:25:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    int currentCursor = read % RECON_BUF_SIZE;
data/x265-3.4/source/output/reconplay.cpp:171:34:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    while (poc[currentCursor] != read)
data/x265-3.4/source/test/testbench.cpp:119:37:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        if (!strncmp(name, "cpuid", strlen(name)))
data/x265-3.4/source/test/testbench.cpp:129:46:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        else if (!strncmp(name, "testbench", strlen(name)))
data/x265-3.4/source/test/testbench.cpp:198:70:  [1] (buffer) strlen:
  Does not handle 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 (testname && strncmp(testname, harness[h]->getName(), strlen(testname)))
data/x265-3.4/source/test/testbench.cpp:224:70:  [1] (buffer) strlen:
  Does not handle 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 (testname && strncmp(testname, harness[h]->getName(), strlen(testname)))
data/x265-3.4/source/test/testbench.cpp:264:66:  [1] (buffer) strlen:
  Does not handle 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 (testname && strncmp(testname, harness[h]->getName(), strlen(testname)))

ANALYSIS SUMMARY:

Hits = 736
Lines analyzed = 127608 in approximately 4.22 seconds (30210 lines/second)
Physical Source Lines of Code (SLOC) = 99724
Hits@level = [0] 977 [1]  84 [2] 573 [3]  38 [4]  41 [5]   0
Hits@level+ = [0+] 1713 [1+] 736 [2+] 652 [3+]  79 [4+]  41 [5+]   0
Hits/KSLOC@level+ = [0+] 17.1774 [1+] 7.38037 [2+] 6.53805 [3+] 0.792186 [4+] 0.411135 [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.