idx
int64
func_before
string
Vulnerability Classification
string
vul
int64
func_after
string
patch
string
CWE ID
string
lines_before
string
lines_after
string
150,800
Tracks::~Tracks() { Track** i = m_trackEntries; Track** const j = m_trackEntriesEnd; while (i != j) { Track* const pTrack = *i++; delete pTrack; } delete[] m_trackEntries; }
DoS Exec Code Overflow Mem. Corr.
1
Tracks::~Tracks()
@@ -12,1380 +12,1208 @@ #include <new> #include <climits> -mkvparser::IMkvReader::~IMkvReader() -{ +#ifdef _MSC_VER +// Disable MSVC warnings that suggest making code non-portable. +#pragma warning(disable : 4996) +#endif + +mkvparser::IMkvReader::~IMkvReader() {} + +void mkvparser::GetVersion(int& major, int& min...
CWE-119
{ Track** i = m_trackEntries; Track** const j = m_trackEntriesEnd; while (i != j) { Track* const pTrack = *i++; delete pTrack; } delete[] m_trackEntries; }
null
150,801
int main(int argc, char **argv) { int frame_cnt = 0; FILE *outfile = NULL; vpx_codec_ctx_t codec; VpxVideoReader *reader = NULL; const VpxVideoInfo *info = NULL; const VpxInterface *decoder = NULL; exec_name = argv[0]; if (argc != 3) die("Invalid number of arguments."); reader = vpx_video_reader_open(...
DoS Exec Code Overflow Mem. Corr.
1
int main(int argc, char **argv) { int frame_cnt = 0; FILE *outfile = NULL; vpx_codec_ctx_t codec; VpxVideoReader *reader = NULL; const VpxVideoInfo *info = NULL; const VpxInterface *decoder = NULL; exec_name = argv[0]; if (argc != 3) die("Invalid number of arguments."); reader = vpx_video_reader_open(...
@@ -33,14 +33,12 @@ #include <stdlib.h> #include <string.h> -#define VPX_CODEC_DISABLE_COMPAT 1 - #include "vpx/vp8dx.h" #include "vpx/vpx_decoder.h" -#include "./md5_utils.h" -#include "./tools_common.h" -#include "./video_reader.h" +#include "../md5_utils.h" +#include "../tools_common.h" +#include "../video_...
CWE-119
printf("Using %s\n", vpx_codec_iface_name(decoder->interface())); if (vpx_codec_dec_init(&codec, decoder->interface(), NULL, 0))
printf("Using %s\n", vpx_codec_iface_name(decoder->codec_interface())); if (vpx_codec_dec_init(&codec, decoder->codec_interface(), NULL, 0))
150,802
int main(int argc, char **argv) { int frame_cnt = 0; FILE *outfile = NULL; vpx_codec_ctx_t codec; const VpxInterface *decoder = NULL; VpxVideoReader *reader = NULL; const VpxVideoInfo *info = NULL; int n = 0; int m = 0; int is_range = 0; char *nptr = NULL; exec_name = argv[0]; if (argc != 4) die("Inv...
DoS Exec Code Overflow Mem. Corr.
1
int main(int argc, char **argv) { int frame_cnt = 0; FILE *outfile = NULL; vpx_codec_ctx_t codec; const VpxInterface *decoder = NULL; VpxVideoReader *reader = NULL; const VpxVideoInfo *info = NULL; int n = 0; int m = 0; int is_range = 0; char *nptr = NULL; exec_name = argv[0]; if (argc != 4) die("Inv...
@@ -56,18 +56,16 @@ #include <stdlib.h> #include <string.h> -#define VPX_CODEC_DISABLE_COMPAT 1 - #include "vpx/vp8dx.h" #include "vpx/vpx_decoder.h" -#include "./tools_common.h" -#include "./video_reader.h" +#include "../tools_common.h" +#include "../video_reader.h" #include "./vpx_config.h" static const ...
CWE-119
printf("Using %s\n", vpx_codec_iface_name(decoder->interface())); if (vpx_codec_dec_init(&codec, decoder->interface(), NULL, 0))
printf("Using %s\n", vpx_codec_iface_name(decoder->codec_interface())); if (vpx_codec_dec_init(&codec, decoder->codec_interface(), NULL, 0))
150,803
void usage_exit() { fprintf(stderr, "Usage: %s <infile> <outfile> <N-M|N/M>\n", exec_name); exit(EXIT_FAILURE); }
DoS Exec Code Overflow Mem. Corr.
1
void usage_exit() { void usage_exit(void) { fprintf(stderr, "Usage: %s <infile> <outfile> <N-M|N/M>\n", exec_name); exit(EXIT_FAILURE); }
@@ -56,18 +56,16 @@ #include <stdlib.h> #include <string.h> -#define VPX_CODEC_DISABLE_COMPAT 1 - #include "vpx/vp8dx.h" #include "vpx/vpx_decoder.h" -#include "./tools_common.h" -#include "./video_reader.h" +#include "../tools_common.h" +#include "../video_reader.h" #include "./vpx_config.h" static const ...
CWE-119
null
void usage_exit(void) {
150,804
int main(int argc, char **argv) { int frame_cnt = 0; FILE *outfile = NULL; vpx_codec_ctx_t codec; vpx_codec_err_t res; VpxVideoReader *reader = NULL; const VpxInterface *decoder = NULL; const VpxVideoInfo *info = NULL; exec_name = argv[0]; if (argc != 3) die("Invalid number of arguments."); reader = ...
DoS Exec Code Overflow Mem. Corr.
1
int main(int argc, char **argv) { int frame_cnt = 0; FILE *outfile = NULL; vpx_codec_ctx_t codec; vpx_codec_err_t res; VpxVideoReader *reader = NULL; const VpxInterface *decoder = NULL; const VpxVideoInfo *info = NULL; exec_name = argv[0]; if (argc != 3) die("Invalid number of arguments."); reader = ...
@@ -43,18 +43,16 @@ #include <stdlib.h> #include <string.h> -#define VPX_CODEC_DISABLE_COMPAT 1 - #include "vpx/vp8dx.h" #include "vpx/vpx_decoder.h" -#include "./tools_common.h" -#include "./video_reader.h" +#include "../tools_common.h" +#include "../video_reader.h" #include "./vpx_config.h" static const ...
CWE-119
printf("Using %s\n", vpx_codec_iface_name(decoder->interface())); res = vpx_codec_dec_init(&codec, decoder->interface(), NULL,
printf("Using %s\n", vpx_codec_iface_name(decoder->codec_interface())); res = vpx_codec_dec_init(&codec, decoder->codec_interface(), NULL,
150,805
int main(int argc, char *argv[]) { char *fin, *fout; FILE *fpin, *fpout; uint8_t *inbuf, *outbuf; uint8_t *inbuf_u, *outbuf_u; uint8_t *inbuf_v, *outbuf_v; int f, frames; int width, height, target_width, target_height; if (argc < 5) { printf("Incorrect parameters:\n"); usage(argv[0]); ret...
DoS Exec Code Overflow Mem. Corr.
1
int main(int argc, char *argv[]) { char *fin, *fout; FILE *fpin, *fpout; uint8_t *inbuf, *outbuf; uint8_t *inbuf_u, *outbuf_u; uint8_t *inbuf_v, *outbuf_v; int f, frames; int width, height, target_width, target_height; exec_name = argv[0]; if (argc < 5) { printf("Incorrect parameters:\n"); ...
@@ -15,15 +15,23 @@ #include <stdlib.h> #include <string.h> -#include "./vp9/encoder/vp9_resize.h" +#include "../tools_common.h" +#include "../vp9/encoder/vp9_resize.h" -static void usage(char *progname) { +static const char *exec_name = NULL; + +static void usage() { printf("Usage:\n"); printf("%s <input_...
CWE-119
usage(argv[0]); usage(argv[0]); usage(argv[0]); usage(argv[0]); usage(argv[0]);
exec_name = argv[0]; usage(); usage(); usage(); usage(); usage();
150,806
int main(int argc, char **argv) { FILE *infile = NULL; vpx_codec_ctx_t codec = {0}; vpx_codec_enc_cfg_t cfg = {0}; int frame_count = 0; vpx_image_t raw = {0}; vpx_codec_err_t res; VpxVideoInfo info = {0}; VpxVideoWriter *writer = NULL; const VpxInterface *encoder = NULL; const int fps = 2; ...
DoS Exec Code Overflow Mem. Corr.
1
int main(int argc, char **argv) { FILE *infile = NULL; vpx_codec_ctx_t codec; vpx_codec_enc_cfg_t cfg; int frame_count = 0; vpx_image_t raw; vpx_codec_err_t res; VpxVideoInfo info; VpxVideoWriter *writer = NULL; const VpxInterface *encoder = NULL; const int fps = 2; // TODO(dkovalev) a...
@@ -42,20 +42,20 @@ // Use the `simple_decoder` example to decode this sample, and observe // the change in the image at frames 22, 33, and 44. +#include <assert.h> #include <stdio.h> #include <stdlib.h> #include <string.h> -#define VPX_CODEC_DISABLE_COMPAT 1 #include "vpx/vp8cx.h" #include "vpx/vpx_encoder...
CWE-119
vpx_codec_ctx_t codec = {0}; vpx_codec_enc_cfg_t cfg = {0}; vpx_image_t raw = {0}; VpxVideoInfo info = {0}; encoder = get_vpx_encoder_by_name(argv[1]); if (!encoder) die("Unsupported codec."); printf("Using %s\n", vpx_codec_iface_name(encoder->interface())); res = vpx_codec_enc_config_default(encode...
vpx_codec_ctx_t codec; vpx_codec_enc_cfg_t cfg; vpx_image_t raw; VpxVideoInfo info; memset(&info, 0, sizeof(info)); encoder = get_vpx_encoder_by_name(argv[1]); if (encoder == NULL) { die("Unsupported codec."); } assert(encoder != NULL); printf("Using %s\n", vpx_codec_iface_name(encoder->codec_in...
150,807
static void set_active_map(const vpx_codec_enc_cfg_t *cfg, vpx_codec_ctx_t *codec) { unsigned int i; vpx_active_map_t map = {0}; map.rows = (cfg->g_h + 15) / 16; map.cols = (cfg->g_w + 15) / 16; map.active_map = (uint8_t *)malloc(map.rows * map.cols); for (i = 0; i < map.row...
DoS Exec Code Overflow Mem. Corr.
1
static void set_active_map(const vpx_codec_enc_cfg_t *cfg, vpx_codec_ctx_t *codec) { unsigned int i; vpx_active_map_t map = {0, 0, 0}; map.rows = (cfg->g_h + 15) / 16; map.cols = (cfg->g_w + 15) / 16; map.active_map = (uint8_t *)malloc(map.rows * map.cols); for (i = 0; i < m...
@@ -42,20 +42,20 @@ // Use the `simple_decoder` example to decode this sample, and observe // the change in the image at frames 22, 33, and 44. +#include <assert.h> #include <stdio.h> #include <stdlib.h> #include <string.h> -#define VPX_CODEC_DISABLE_COMPAT 1 #include "vpx/vp8cx.h" #include "vpx/vpx_encoder...
CWE-119
vpx_active_map_t map = {0};
vpx_active_map_t map = {0, 0, 0};
150,808
static void set_roi_map(const vpx_codec_enc_cfg_t *cfg, vpx_codec_ctx_t *codec) { unsigned int i; vpx_roi_map_t roi = {0}; roi.rows = (cfg->g_h + 15) / 16; roi.cols = (cfg->g_w + 15) / 16; roi.delta_q[0] = 0; roi.delta_q[1] = -2; roi.delta_q[2] = -4; roi.delta_q[3] = -6; ...
DoS Exec Code Overflow Mem. Corr.
1
static void set_roi_map(const vpx_codec_enc_cfg_t *cfg, vpx_codec_ctx_t *codec) { unsigned int i; vpx_roi_map_t roi; memset(&roi, 0, sizeof(roi)); roi.rows = (cfg->g_h + 15) / 16; roi.cols = (cfg->g_w + 15) / 16; roi.delta_q[0] = 0; roi.delta_q[1] = -2; roi.delta_q[2] = -...
@@ -42,20 +42,20 @@ // Use the `simple_decoder` example to decode this sample, and observe // the change in the image at frames 22, 33, and 44. +#include <assert.h> #include <stdio.h> #include <stdlib.h> #include <string.h> -#define VPX_CODEC_DISABLE_COMPAT 1 #include "vpx/vp8cx.h" #include "vpx/vpx_encoder...
CWE-119
vpx_roi_map_t roi = {0};
vpx_roi_map_t roi; memset(&roi, 0, sizeof(roi));
150,809
static void unset_active_map(const vpx_codec_enc_cfg_t *cfg, vpx_codec_ctx_t *codec) { vpx_active_map_t map = {0}; map.rows = (cfg->g_h + 15) / 16; map.cols = (cfg->g_w + 15) / 16; map.active_map = NULL; if (vpx_codec_control(codec, VP8E_SET_ACTIVEMAP, &map)) die_codec(...
DoS Exec Code Overflow Mem. Corr.
1
static void unset_active_map(const vpx_codec_enc_cfg_t *cfg, vpx_codec_ctx_t *codec) { vpx_active_map_t map = {0, 0, 0}; map.rows = (cfg->g_h + 15) / 16; map.cols = (cfg->g_w + 15) / 16; map.active_map = NULL; if (vpx_codec_control(codec, VP8E_SET_ACTIVEMAP, &map)) die_...
@@ -42,20 +42,20 @@ // Use the `simple_decoder` example to decode this sample, and observe // the change in the image at frames 22, 33, and 44. +#include <assert.h> #include <stdio.h> #include <stdlib.h> #include <string.h> -#define VPX_CODEC_DISABLE_COMPAT 1 #include "vpx/vp8cx.h" #include "vpx/vpx_encoder...
CWE-119
vpx_active_map_t map = {0};
vpx_active_map_t map = {0, 0, 0};
150,810
int main(int argc, char **argv) { int frame_cnt = 0; FILE *outfile = NULL; vpx_codec_ctx_t codec; VpxVideoReader *reader = NULL; const VpxInterface *decoder = NULL; const VpxVideoInfo *info = NULL; exec_name = argv[0]; if (argc != 3) die("Invalid number of arguments."); reader = vpx_video_reader_open(...
DoS Exec Code Overflow Mem. Corr.
1
int main(int argc, char **argv) { int frame_cnt = 0; FILE *outfile = NULL; vpx_codec_ctx_t codec; VpxVideoReader *reader = NULL; const VpxInterface *decoder = NULL; const VpxVideoInfo *info = NULL; exec_name = argv[0]; if (argc != 3) die("Invalid number of arguments."); reader = vpx_video_reader_open(...
@@ -29,30 +29,29 @@ // ----------------- // For decoders, you only have to include `vpx_decoder.h` and then any // header files for the specific codecs you use. In this case, we're using -// vp8. The `VPX_CODEC_DISABLE_COMPAT` macro can be defined to ensure -// strict compliance with the latest SDK by disabling som...
CWE-119
printf("Using %s\n", vpx_codec_iface_name(decoder->interface())); if (vpx_codec_dec_init(&codec, decoder->interface(), NULL, 0))
printf("Using %s\n", vpx_codec_iface_name(decoder->codec_interface())); if (vpx_codec_dec_init(&codec, decoder->codec_interface(), NULL, 0))
150,811
int main(int argc, char **argv) { FILE *infile = NULL; vpx_codec_ctx_t codec; vpx_codec_enc_cfg_t cfg; int frame_count = 0; vpx_image_t raw; vpx_codec_err_t res; VpxVideoInfo info = {0}; VpxVideoWriter *writer = NULL; const VpxInterface *encoder = NULL; const int fps = 30; // TODO(dkovalev) add command line ...
DoS Exec Code Overflow Mem. Corr.
1
int main(int argc, char **argv) { FILE *infile = NULL; vpx_codec_ctx_t codec; vpx_codec_enc_cfg_t cfg; int frame_count = 0; vpx_image_t raw; vpx_codec_err_t res; VpxVideoInfo info = {0}; VpxVideoWriter *writer = NULL; const VpxInterface *encoder = NULL; const int fps = 30; // TODO(dkovalev) add command line ...
@@ -28,9 +28,7 @@ // ----------------- // For encoders, you only have to include `vpx_encoder.h` and then any // header files for the specific codecs you use. In this case, we're using -// vp8. The `VPX_CODEC_DISABLE_COMPAT` macro can be defined to ensure -// strict compliance with the latest SDK by disabling some ...
CWE-119
printf("Using %s\n", vpx_codec_iface_name(encoder->interface())); res = vpx_codec_enc_config_default(encoder->interface(), &cfg, 0); if (vpx_codec_enc_init(&codec, encoder->interface(), &cfg, 0)) encode_frame(&codec, NULL, -1, 0, writer); // flush the encoder
printf("Using %s\n", vpx_codec_iface_name(encoder->codec_interface())); res = vpx_codec_enc_config_default(encoder->codec_interface(), &cfg, 0); if (vpx_codec_enc_init(&codec, encoder->codec_interface(), &cfg, 0)) // Encode frames. // Flush encoder. while (encode_frame(&codec, NULL, -1, 0, writer)) {};
150,812
void usage_exit() { fprintf(stderr, "Usage: %s <codec> <width> <height> <infile> <outfile> " "<keyframe-interval> [<error-resilient>]\nSee comments in " "simple_encoder.c for more information.\n", exec_name); exit(EXIT_FAILURE); }
DoS Exec Code Overflow Mem. Corr.
1
void usage_exit() { void usage_exit(void) { fprintf(stderr, "Usage: %s <codec> <width> <height> <infile> <outfile> " "<keyframe-interval> [<error-resilient>]\nSee comments in " "simple_encoder.c for more information.\n", exec_name); exit(EXIT_FAILURE); }
@@ -28,9 +28,7 @@ // ----------------- // For encoders, you only have to include `vpx_encoder.h` and then any // header files for the specific codecs you use. In this case, we're using -// vp8. The `VPX_CODEC_DISABLE_COMPAT` macro can be defined to ensure -// strict compliance with the latest SDK by disabling some ...
CWE-119
null
void usage_exit(void) {
150,813
static void get_frame_stats(vpx_codec_ctx_t *ctx, const vpx_image_t *img, vpx_codec_pts_t pts, unsigned int duration, vpx_enc_frame_flags_t flags, unsigned int deadline, ...
DoS Exec Code Overflow Mem. Corr.
1
static void get_frame_stats(vpx_codec_ctx_t *ctx, static int get_frame_stats(vpx_codec_ctx_t *ctx, const vpx_image_t *img, vpx_codec_pts_t pts, unsigned int duration, vpx_enc_frame_flags_t flags, ...
@@ -28,9 +28,8 @@ // Encoding A Frame // ---------------- // Encoding a frame in two pass mode is identical to the simple encoder -// example, except the deadline is set to VPX_DL_BEST_QUALITY to get the -// best quality possible. VPX_DL_GOOD_QUALITY could also be used. -// +// example. To increase the quality whil...
CWE-119
const vpx_image_t *img, vpx_codec_pts_t pts, unsigned int duration, vpx_enc_frame_flags_t flags, unsigned int deadline, vpx_fixed_buf_t *stats) {
static int get_frame_stats(vpx_codec_ctx_t *ctx, const vpx_image_t *img, vpx_codec_pts_t pts, unsigned int duration, vpx_enc_frame_flags_t flags, unsigned int deadline, ...
150,814
int main(int argc, char **argv) { FILE *infile = NULL; VpxVideoWriter *writer = NULL; vpx_codec_ctx_t codec; vpx_codec_enc_cfg_t cfg; vpx_image_t raw; vpx_codec_err_t res; vpx_fixed_buf_t stats = {0}; VpxVideoInfo info = {0}; const VpxInterface *encoder = NULL; int pass; const int fps = 30...
DoS Exec Code Overflow Mem. Corr.
1
int main(int argc, char **argv) { FILE *infile = NULL; int w, h; vpx_codec_ctx_t codec; vpx_codec_enc_cfg_t cfg; vpx_image_t raw; vpx_codec_err_t res; vpx_fixed_buf_t stats; const VpxInterface *encoder = NULL; const int fps = 30; // TODO(dkovalev) add command line argument const int...
@@ -28,9 +28,8 @@ // Encoding A Frame // ---------------- // Encoding a frame in two pass mode is identical to the simple encoder -// example, except the deadline is set to VPX_DL_BEST_QUALITY to get the -// best quality possible. VPX_DL_GOOD_QUALITY could also be used. -// +// example. To increase the quality whil...
CWE-119
VpxVideoWriter *writer = NULL; vpx_fixed_buf_t stats = {0}; VpxVideoInfo info = {0}; int pass; info.codec_fourcc = encoder->fourcc; info.time_base.numerator = 1; info.time_base.denominator = fps; info.frame_width = strtol(width_arg, NULL, 0); info.frame_height = strtol(height_arg, NULL, 0); if (info...
int w, h; vpx_fixed_buf_t stats; w = strtol(width_arg, NULL, 0); h = strtol(height_arg, NULL, 0); if (w <= 0 || h <= 0 || (w % 2) != 0 || (h % 2) != 0) die("Invalid frame size: %dx%d", w, h); if (!vpx_img_alloc(&raw, VPX_IMG_FMT_I420, w, h, 1)) die("Failed to allocate image", w, h); printf("Usi...
150,815
void usage_exit() { fprintf(stderr, "Usage: %s <codec> <width> <height> <infile> <outfile>\n", exec_name); exit(EXIT_FAILURE); }
DoS Exec Code Overflow Mem. Corr.
1
void usage_exit() { void usage_exit(void) { fprintf(stderr, "Usage: %s <codec> <width> <height> <infile> <outfile>\n", exec_name); exit(EXIT_FAILURE); }
@@ -28,9 +28,8 @@ // Encoding A Frame // ---------------- // Encoding a frame in two pass mode is identical to the simple encoder -// example, except the deadline is set to VPX_DL_BEST_QUALITY to get the -// best quality possible. VPX_DL_GOOD_QUALITY could also be used. -// +// example. To increase the quality whil...
CWE-119
null
void usage_exit(void) {
150,816
static void die(const char *fmt, ...) { va_list ap; va_start(ap, fmt); vprintf(fmt, ap); if(fmt[strlen(fmt)-1] != '\n') printf("\n"); exit(EXIT_FAILURE); }
DoS Exec Code Overflow Mem. Corr.
1
static void die(const char *fmt, ...) {
@@ -13,22 +13,40 @@ * High-resolution input video is down-sampled to lower-resolutions. The * encoder then encodes the video and outputs multiple bitstreams with * different resolutions. + * + * This test also allows for settings temporal layers for each spatial layer. + * Different number of temporal layers per...
CWE-119
va_list ap; va_start(ap, fmt); vprintf(fmt, ap); if(fmt[strlen(fmt)-1] != '\n') printf("\n"); exit(EXIT_FAILURE); }
null
150,817
static void die_codec(vpx_codec_ctx_t *ctx, const char *s) { const char *detail = vpx_codec_error_detail(ctx); printf("%s: %s\n", s, vpx_codec_error(ctx)); if(detail) printf(" %s\n",detail); exit(EXIT_FAILURE); }
DoS Exec Code Overflow Mem. Corr.
1
static void die_codec(vpx_codec_ctx_t *ctx, const char *s) {
@@ -13,22 +13,40 @@ * High-resolution input video is down-sampled to lower-resolutions. The * encoder then encodes the video and outputs multiple bitstreams with * different resolutions. + * + * This test also allows for settings temporal layers for each spatial layer. + * Different number of temporal layers per...
CWE-119
const char *detail = vpx_codec_error_detail(ctx); printf("%s: %s\n", s, vpx_codec_error(ctx)); if(detail) printf(" %s\n",detail); exit(EXIT_FAILURE); }
null
150,818
int main(int argc, char **argv) { FILE *infile, *outfile[NUM_ENCODERS]; vpx_codec_ctx_t codec[NUM_ENCODERS]; vpx_codec_enc_cfg_t cfg[NUM_ENCODERS]; vpx_codec_pts_t frame_cnt = 0; vpx_image_t raw[NUM_ENCODERS]; vpx_codec_err_t res[NUM_ENCODERS]; ...
DoS Exec Code Overflow Mem. Corr.
1
int main(int argc, char **argv) { FILE *infile, *outfile[NUM_ENCODERS]; FILE *downsampled_input[NUM_ENCODERS - 1]; char filename[50]; vpx_codec_ctx_t codec[NUM_ENCODERS]; vpx_codec_enc_cfg_t cfg[NUM_ENCODERS]; int frame_c...
@@ -13,22 +13,40 @@ * High-resolution input video is down-sampled to lower-resolutions. The * encoder then encodes the video and outputs multiple bitstreams with * different resolutions. + * + * This test also allows for settings temporal layers for each spatial layer. + * Different number of temporal layers per...
CWE-119
FILE *infile, *outfile[NUM_ENCODERS]; vpx_codec_pts_t frame_cnt = 0; if(argc!= (5+NUM_ENCODERS)) die("Usage: %s <width> <height> <infile> <outfile(s)> <output psnr?>\n", if(!(infile = fopen(argv[3], "rb"))) die("Failed to open %s for reading", argv[3]); if(!(o...
FILE *infile, *outfile[NUM_ENCODERS]; FILE *downsampled_input[NUM_ENCODERS - 1]; char filename[50]; int frame_cnt = 0; int length_frame; int layer_id = 0; int layer_flags[VPX_...
150,819
int main(int argc, char **argv) { FILE *infile = NULL; vpx_codec_ctx_t codec = {0}; vpx_codec_enc_cfg_t cfg = {0}; int frame_count = 0; vpx_image_t raw; vpx_codec_err_t res; VpxVideoInfo info = {0}; VpxVideoWriter *writer = NULL; const VpxInterface *encoder = NULL; int update_frame_num = 0; const int fps = ...
DoS Exec Code Overflow Mem. Corr.
1
int main(int argc, char **argv) { FILE *infile = NULL; vpx_codec_ctx_t codec = {0}; vpx_codec_enc_cfg_t cfg = {0}; int frame_count = 0; vpx_image_t raw; vpx_codec_err_t res; VpxVideoInfo info = {0}; VpxVideoWriter *writer = NULL; const VpxInterface *encoder = NULL; int update_frame_num = 0; const int fps = ...
@@ -50,25 +50,25 @@ #include <stdlib.h> #include <string.h> -#define VPX_CODEC_DISABLE_COMPAT 1 #include "vpx/vp8cx.h" #include "vpx/vpx_encoder.h" -#include "./tools_common.h" -#include "./video_writer.h" +#include "../tools_common.h" +#include "../video_writer.h" static const char *exec_name; -void usag...
CWE-119
printf("Using %s\n", vpx_codec_iface_name(encoder->interface())); res = vpx_codec_enc_config_default(encoder->interface(), &cfg, 0); if (vpx_codec_enc_init(&codec, encoder->interface(), &cfg, 0)) encode_frame(&codec, NULL, -1, writer);
printf("Using %s\n", vpx_codec_iface_name(encoder->codec_interface())); res = vpx_codec_enc_config_default(encoder->codec_interface(), &cfg, 0); if (vpx_codec_enc_init(&codec, encoder->codec_interface(), &cfg, 0)) // Encode frames. // Flush encoder. while (encode_frame(&codec, NULL, -1, writer)) {}
150,820
void usage_exit() { fprintf(stderr, "Usage: %s <width> <height> <infile> <outfile> <frame>\n", exec_name); exit(EXIT_FAILURE); }
DoS Exec Code Overflow Mem. Corr.
1
void usage_exit() { void usage_exit(void) { fprintf(stderr, "Usage: %s <width> <height> <infile> <outfile> <frame>\n", exec_name); exit(EXIT_FAILURE); }
@@ -50,25 +50,25 @@ #include <stdlib.h> #include <string.h> -#define VPX_CODEC_DISABLE_COMPAT 1 #include "vpx/vp8cx.h" #include "vpx/vpx_encoder.h" -#include "./tools_common.h" -#include "./video_writer.h" +#include "../tools_common.h" +#include "../video_writer.h" static const char *exec_name; -void usag...
CWE-119
null
void usage_exit(void) {
150,821
void update_rate_histogram(struct rate_hist *hist, const vpx_codec_enc_cfg_t *cfg, const vpx_codec_cx_pkt_t *pkt) { int i; int64_t then = 0; int64_t avg_bitrate = 0; int64_t sum_sz = 0; const int64_t now = pkt->data.frame.pts * 1000 * (uint64_t)cfg->g_timebase.num / (uint64_t)cfg->g_timebase.den; int idx = h...
DoS Exec Code Overflow Mem. Corr.
1
void update_rate_histogram(struct rate_hist *hist, const vpx_codec_enc_cfg_t *cfg, const vpx_codec_cx_pkt_t *pkt) { int i; int64_t then = 0; int64_t avg_bitrate = 0; int64_t sum_sz = 0; const int64_t now = pkt->data.frame.pts * 1000 * (uint64_t)cfg->g_timebase.num / (uint64_t)cfg->g_timebase.den; int idx = h...
@@ -88,6 +88,9 @@ if (now < cfg->rc_buf_initial_sz) return; + if (!cfg->rc_target_bitrate) + return; + then = now; /* Sum the size over the past rc_buf_sz ms */
CWE-119
null
if (!cfg->rc_target_bitrate) return;
150,822
virtual void PreEncodeFrameHook(::libvpx_test::VideoSource *video, ::libvpx_test::Encoder *encoder) { if (video->frame() == 1) { encoder->Control(VP8E_SET_CPUUSED, cpu_used_); } else if (video->frame() == 3) { vpx_active_map_t map = {0}; uint8_t active_map[9 * 13] = { 1, 1, 1, ...
DoS Exec Code Overflow Mem. Corr.
1
virtual void PreEncodeFrameHook(::libvpx_test::VideoSource *video, ::libvpx_test::Encoder *encoder) { if (video->frame() == 1) { encoder->Control(VP8E_SET_CPUUSED, cpu_used_); } else if (video->frame() == 3) { vpx_active_map_t map = vpx_active_map_t(); uint8_t active_map[9 * 13] = { ...
@@ -38,7 +38,7 @@ if (video->frame() == 1) { encoder->Control(VP8E_SET_CPUUSED, cpu_used_); } else if (video->frame() == 3) { - vpx_active_map_t map = {0}; + vpx_active_map_t map = vpx_active_map_t(); uint8_t active_map[9 * 13] = { 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, ...
CWE-119
vpx_active_map_t map = {0}; vpx_active_map_t map = {0};
vpx_active_map_t map = vpx_active_map_t(); vpx_active_map_t map = vpx_active_map_t();
150,823
virtual void FramePktHook(const vpx_codec_cx_pkt_t *pkt) { if (pkt->data.frame.flags & VPX_FRAME_IS_KEY) { } }
DoS Exec Code Overflow Mem. Corr.
1
virtual void FramePktHook(const vpx_codec_cx_pkt_t *pkt) {
@@ -7,8 +7,6 @@ * in the file PATENTS. All contributing project authors may * be found in the AUTHORS file in the root of the source tree. */ -#include <climits> -#include <vector> #include "third_party/googletest/src/include/gtest/gtest.h" #include "test/codec_factory.h" #include "test/encode_test_driver....
CWE-119
if (pkt->data.frame.flags & VPX_FRAME_IS_KEY) { } }
null
150,824
ConvolveFunctions(convolve_fn_t h8, convolve_fn_t h8_avg, convolve_fn_t v8, convolve_fn_t v8_avg, convolve_fn_t hv8, convolve_fn_t hv8_avg) : h8_(h8), v8_(v8), hv8_(hv8), h8_avg_(h8_avg), v8_avg_(v8_avg), hv8_avg_(hv8_avg) {}
DoS Exec Code Overflow Mem. Corr.
1
ConvolveFunctions(convolve_fn_t h8, convolve_fn_t h8_avg,
@@ -9,40 +9,65 @@ */ #include <string.h> -#include "test/acm_random.h" -#include "test/register_state_check.h" -#include "test/util.h" + #include "third_party/googletest/src/include/gtest/gtest.h" #include "./vpx_config.h" #include "./vp9_rtcd.h" +#include "./vpx_dsp_rtcd.h" +#include "test/acm_random.h" +#i...
CWE-119
convolve_fn_t v8, convolve_fn_t v8_avg, convolve_fn_t hv8, convolve_fn_t hv8_avg) : h8_(h8), v8_(v8), hv8_(hv8), h8_avg_(h8_avg), v8_avg_(v8_avg), hv8_avg_(hv8_avg) {}
null
150,825
void SetConstantInput(int value) { memset(input_, value, kInputBufferSize); }
DoS Exec Code Overflow Mem. Corr.
1
void SetConstantInput(int value) { memset(input_, value, kInputBufferSize); #if CONFIG_VP9_HIGHBITDEPTH vpx_memset16(input16_, value, kInputBufferSize); #endif } void CopyOutputToRef() { memcpy(output_ref_, output_, kOutputBufferSize); #if CONFIG_VP9_HIGHBITDEPTH memcpy(output16_ref_, output16_...
@@ -9,40 +9,65 @@ */ #include <string.h> -#include "test/acm_random.h" -#include "test/register_state_check.h" -#include "test/util.h" + #include "third_party/googletest/src/include/gtest/gtest.h" #include "./vpx_config.h" #include "./vp9_rtcd.h" +#include "./vpx_dsp_rtcd.h" +#include "test/acm_random.h" +#i...
CWE-119
null
#if CONFIG_VP9_HIGHBITDEPTH vpx_memset16(input16_, value, kInputBufferSize); #endif } void CopyOutputToRef() { memcpy(output_ref_, output_, kOutputBufferSize); #if CONFIG_VP9_HIGHBITDEPTH memcpy(output16_ref_, output16_, kOutputBufferSize); #endif
150,826
virtual void SetUp() { UUT_ = GET_PARAM(2); /* Set up guard blocks for an inner block centered in the outer block */ for (int i = 0; i < kOutputBufferSize; ++i) { if (IsIndexInBorder(i)) output_[i] = 255; else output_[i] = 0; } ::libvpx_test::ACMRandom prng; fo...
DoS Exec Code Overflow Mem. Corr.
1
virtual void SetUp() { UUT_ = GET_PARAM(2); #if CONFIG_VP9_HIGHBITDEPTH if (UUT_->use_highbd_ != 0) mask_ = (1 << UUT_->use_highbd_) - 1; else mask_ = 255; #endif /* Set up guard blocks for an inner block centered in the outer block */ for (int i = 0; i < kOutputBufferSize; ++i) { ...
@@ -9,40 +9,65 @@ */ #include <string.h> -#include "test/acm_random.h" -#include "test/register_state_check.h" -#include "test/util.h" + #include "third_party/googletest/src/include/gtest/gtest.h" #include "./vpx_config.h" #include "./vp9_rtcd.h" +#include "./vpx_dsp_rtcd.h" +#include "test/acm_random.h" +#i...
CWE-119
for (int i = 0; i < kInputBufferSize; ++i) input_[i] = prng.Rand8Extremes();
#if CONFIG_VP9_HIGHBITDEPTH if (UUT_->use_highbd_ != 0) mask_ = (1 << UUT_->use_highbd_) - 1; else mask_ = 255; #endif for (int i = 0; i < kInputBufferSize; ++i) { if (i & 1) { input_[i] = 255; #if CONFIG_VP9_HIGHBITDEPTH input16_[i] = mask_; #endif } else { i...
150,827
static void TearDownTestCase() { vpx_free(input_ - 1); input_ = NULL; vpx_free(output_); output_ = NULL; }
DoS Exec Code Overflow Mem. Corr.
1
static void TearDownTestCase() { vpx_free(input_ - 1); input_ = NULL; vpx_free(output_); output_ = NULL; vpx_free(output_ref_); output_ref_ = NULL; #if CONFIG_VP9_HIGHBITDEPTH vpx_free(input16_ - 1); input16_ = NULL; vpx_free(output16_); output16_ = NULL; vpx_free(outp...
@@ -9,40 +9,65 @@ */ #include <string.h> -#include "test/acm_random.h" -#include "test/register_state_check.h" -#include "test/util.h" + #include "third_party/googletest/src/include/gtest/gtest.h" #include "./vpx_config.h" #include "./vp9_rtcd.h" +#include "./vpx_dsp_rtcd.h" +#include "test/acm_random.h" +#i...
CWE-119
null
vpx_free(output_ref_); output_ref_ = NULL; #if CONFIG_VP9_HIGHBITDEPTH vpx_free(input16_ - 1); input16_ = NULL; vpx_free(output16_); output16_ = NULL; vpx_free(output16_ref_); output16_ref_ = NULL; #endif
150,828
void filter_average_block2d_8_c(const uint8_t *src_ptr, const unsigned int src_stride, const int16_t *HFilter, const int16_t *VFilter, uint8_t *dst_ptr, unsigned int dst_stride, unsigned int output_width, unsigned in...
DoS Exec Code Overflow Mem. Corr.
1
void filter_average_block2d_8_c(const uint8_t *src_ptr, const unsigned int src_stride, const int16_t *HFilter, const int16_t *VFilter, uint8_t *dst_ptr, unsigned int dst_stride, unsigned int output_width, unsigned in...
@@ -9,40 +9,65 @@ */ #include <string.h> -#include "test/acm_random.h" -#include "test/register_state_check.h" -#include "test/util.h" + #include "third_party/googletest/src/include/gtest/gtest.h" #include "./vpx_config.h" #include "./vp9_rtcd.h" +#include "./vpx_dsp_rtcd.h" +#include "test/acm_random.h" +#i...
CWE-119
uint8_t tmp[64 * 64]; assert(output_width <= 64); assert(output_height <= 64);
uint8_t tmp[kMaxDimension * kMaxDimension]; assert(output_width <= kMaxDimension); assert(output_height <= kMaxDimension);
150,829
uint8_t* input() const { return input_ + BorderTop() * kOuterBlockSize + BorderLeft(); }
DoS Exec Code Overflow Mem. Corr.
1
uint8_t* input() const { uint8_t *input() const { #if CONFIG_VP9_HIGHBITDEPTH if (UUT_->use_highbd_ == 0) { return input_ + BorderTop() * kOuterBlockSize + BorderLeft(); } else { return CONVERT_TO_BYTEPTR(input16_ + BorderTop() * kOuterBlockSize + BorderLeft()); ...
@@ -9,40 +9,65 @@ */ #include <string.h> -#include "test/acm_random.h" -#include "test/register_state_check.h" -#include "test/util.h" + #include "third_party/googletest/src/include/gtest/gtest.h" #include "./vpx_config.h" #include "./vp9_rtcd.h" +#include "./vpx_dsp_rtcd.h" +#include "test/acm_random.h" +#i...
CWE-119
null
uint8_t *input() const { #if CONFIG_VP9_HIGHBITDEPTH if (UUT_->use_highbd_ == 0) { return input_ + BorderTop() * kOuterBlockSize + BorderLeft(); } else { return CONVERT_TO_BYTEPTR(input16_ + BorderTop() * kOuterBlockSize + BorderLeft()); } #else #endif
150,830
uint8_t* output() const { return output_ + BorderTop() * kOuterBlockSize + BorderLeft(); }
DoS Exec Code Overflow Mem. Corr.
1
uint8_t* output() const { uint8_t *output() const { #if CONFIG_VP9_HIGHBITDEPTH if (UUT_->use_highbd_ == 0) { return output_ + BorderTop() * kOuterBlockSize + BorderLeft(); } else { return CONVERT_TO_BYTEPTR(output16_ + BorderTop() * kOuterBlockSize + BorderLeft()...
@@ -9,40 +9,65 @@ */ #include <string.h> -#include "test/acm_random.h" -#include "test/register_state_check.h" -#include "test/util.h" + #include "third_party/googletest/src/include/gtest/gtest.h" #include "./vpx_config.h" #include "./vp9_rtcd.h" +#include "./vpx_dsp_rtcd.h" +#include "test/acm_random.h" +#i...
CWE-119
null
uint8_t *output() const { #if CONFIG_VP9_HIGHBITDEPTH if (UUT_->use_highbd_ == 0) { return output_ + BorderTop() * kOuterBlockSize + BorderLeft(); } else { return CONVERT_TO_BYTEPTR(output16_ + BorderTop() * kOuterBlockSize + BorderLeft()); } #else #endif } ...
150,831
virtual void FramePktHook(const vpx_codec_cx_pkt_t *pkt) { if (pkt->data.frame.flags & VPX_FRAME_IS_KEY) { } }
DoS Exec Code Overflow Mem. Corr.
1
virtual void FramePktHook(const vpx_codec_cx_pkt_t *pkt) { virtual void PSNRPktHook(const vpx_codec_cx_pkt_t *pkt) { if (pkt->data.psnr.psnr[0] < min_psnr_) min_psnr_ = pkt->data.psnr.psnr[0]; }
@@ -7,45 +7,65 @@ * in the file PATENTS. All contributing project authors may * be found in the AUTHORS file in the root of the source tree. */ -#include <climits> -#include <vector> #include "third_party/googletest/src/include/gtest/gtest.h" #include "test/codec_factory.h" #include "test/encode_test_drive...
CWE-119
if (pkt->data.frame.flags & VPX_FRAME_IS_KEY) { }
virtual void PSNRPktHook(const vpx_codec_cx_pkt_t *pkt) { if (pkt->data.psnr.psnr[0] < min_psnr_) min_psnr_ = pkt->data.psnr.psnr[0];
150,832
virtual void PreEncodeFrameHook(::libvpx_test::VideoSource *video, ::libvpx_test::Encoder *encoder) { if (video->frame() == 1) { encoder->Control(VP8E_SET_CPUUSED, set_cpu_used_); encoder->Control(VP8E_SET_ENABLEAUTOALTREF, 1); encoder->Control(VP8E_SET_ARNR...
DoS Exec Code Overflow Mem. Corr.
1
virtual void PreEncodeFrameHook(::libvpx_test::VideoSource *video, ::libvpx_test::Encoder *encoder) { if (video->frame() == 1) { encoder->Control(VP8E_SET_CPUUSED, set_cpu_used_); if (encoding_mode_ != ::libvpx_test::kRealTime) { encoder->Control(VP8E_SET_...
@@ -7,45 +7,65 @@ * in the file PATENTS. All contributing project authors may * be found in the AUTHORS file in the root of the source tree. */ -#include <climits> -#include <vector> #include "third_party/googletest/src/include/gtest/gtest.h" #include "test/codec_factory.h" #include "test/encode_test_drive...
CWE-119
encoder->Control(VP8E_SET_ENABLEAUTOALTREF, 1); encoder->Control(VP8E_SET_ARNR_MAXFRAMES, 7); encoder->Control(VP8E_SET_ARNR_STRENGTH, 5); encoder->Control(VP8E_SET_ARNR_TYPE, 3);
if (encoding_mode_ != ::libvpx_test::kRealTime) { encoder->Control(VP8E_SET_ENABLEAUTOALTREF, 1); encoder->Control(VP8E_SET_ARNR_MAXFRAMES, 7); encoder->Control(VP8E_SET_ARNR_STRENGTH, 5); encoder->Control(VP8E_SET_ARNR_TYPE, 3); }
150,833
virtual void PreEncodeFrameHook(::libvpx_test::VideoSource *video, ::libvpx_test::Encoder *encoder) { if (video->frame() == 1) { encoder->Control(VP8E_SET_CPUUSED, set_cpu_used_); } if (cfg_.ts_number_layers > 1) { if (video->frame() == 1) { enco...
DoS Exec Code Overflow Mem. Corr.
1
virtual void PreEncodeFrameHook(::libvpx_test::VideoSource *video, ::libvpx_test::Encoder *encoder) { if (video->frame() == 0) encoder->Control(VP8E_SET_CPUUSED, set_cpu_used_); if (denoiser_offon_test_) { ASSERT_GT(denoiser_offon_period_, 0) << "den...
@@ -14,6 +14,7 @@ #include "test/i420_video_source.h" #include "test/util.h" #include "test/y4m_video_source.h" +#include "vpx/vpx_codec.h" namespace { @@ -38,10 +39,25 @@ first_drop_ = 0; bits_total_ = 0; duration_ = 0.0; + denoiser_offon_test_ = 0; + denoiser_offon_period_ = -1; } ...
CWE-119
if (video->frame() == 1) { if (video->frame() == 1) { vpx_svc_layer_id_t layer_id = {0, 0}; if (video->frame() > 0) { encoder->Control(VP9E_SET_SVC_LAYER_ID, &layer_id); }
if (video->frame() == 0) if (denoiser_offon_test_) { ASSERT_GT(denoiser_offon_period_, 0) << "denoiser_offon_period_ is not positive."; if ((video->frame() + 1) % denoiser_offon_period_ == 0) { // Flip denoiser_on_ periodically denoiser_on_ ^= 1; } encoder->Cont...
150,834
virtual void ResetModel() { last_pts_ = 0; bits_in_buffer_model_ = cfg_.rc_target_bitrate * cfg_.rc_buf_initial_sz; frame_number_ = 0; first_drop_ = 0; bits_total_ = 0; duration_ = 0.0; }
DoS Exec Code Overflow Mem. Corr.
1
virtual void ResetModel() { last_pts_ = 0; bits_in_buffer_model_ = cfg_.rc_target_bitrate * cfg_.rc_buf_initial_sz; frame_number_ = 0; first_drop_ = 0; bits_total_ = 0; duration_ = 0.0; denoiser_offon_test_ = 0; denoiser_offon_period_ = -1; }
@@ -14,6 +14,7 @@ #include "test/i420_video_source.h" #include "test/util.h" #include "test/y4m_video_source.h" +#include "vpx/vpx_codec.h" namespace { @@ -38,10 +39,25 @@ first_drop_ = 0; bits_total_ = 0; duration_ = 0.0; + denoiser_offon_test_ = 0; + denoiser_offon_period_ = -1; } ...
CWE-119
null
denoiser_offon_test_ = 0; denoiser_offon_period_ = -1;
150,835
virtual void ResetModel() { last_pts_ = 0; bits_in_buffer_model_ = cfg_.rc_target_bitrate * cfg_.rc_buf_initial_sz; frame_number_ = 0; tot_frame_number_ = 0; first_drop_ = 0; num_drops_ = 0; for (int i = 0; i < 3; ++i) { bits_total_[i] = 0; } }
DoS Exec Code Overflow Mem. Corr.
1
virtual void ResetModel() { last_pts_ = 0; bits_in_buffer_model_ = cfg_.rc_target_bitrate * cfg_.rc_buf_initial_sz; frame_number_ = 0; tot_frame_number_ = 0; first_drop_ = 0; num_drops_ = 0; // Denoiser is off by default. denoiser_on_ = 0; for (int i = 0; i < 3; ++i) { b...
@@ -14,6 +14,7 @@ #include "test/i420_video_source.h" #include "test/util.h" #include "test/y4m_video_source.h" +#include "vpx/vpx_codec.h" namespace { @@ -38,10 +39,25 @@ first_drop_ = 0; bits_total_ = 0; duration_ = 0.0; + denoiser_offon_test_ = 0; + denoiser_offon_period_ = -1; } ...
CWE-119
null
// Denoiser is off by default. denoiser_on_ = 0; denoiser_offon_test_ = 0; denoiser_offon_period_ = -1;
150,836
void RunCoeffCheck() { ACMRandom rnd(ACMRandom::DeterministicSeed()); const int count_test_block = 1000; DECLARE_ALIGNED_ARRAY(16, int16_t, input_block, kNumCoeffs); DECLARE_ALIGNED_ARRAY(16, int16_t, output_ref_block, kNumCoeffs); DECLARE_ALIGNED_ARRAY(16, int16_t, output_block, kNumCoeffs); ...
DoS Exec Code Overflow Mem. Corr.
1
void RunCoeffCheck() { ACMRandom rnd(ACMRandom::DeterministicSeed()); const int count_test_block = 1000; DECLARE_ALIGNED(16, int16_t, input_block[kNumCoeffs]); DECLARE_ALIGNED(16, tran_low_t, output_ref_block[kNumCoeffs]); DECLARE_ALIGNED(16, tran_low_t, output_block[kNumCoeffs]); for (i...
@@ -13,18 +13,18 @@ #include <string.h> #include "third_party/googletest/src/include/gtest/gtest.h" + +#include "./vp9_rtcd.h" +#include "./vpx_dsp_rtcd.h" #include "test/acm_random.h" #include "test/clear_system_state.h" #include "test/register_state_check.h" #include "test/util.h" - -#include "./vp9_rtcd.h" ...
CWE-119
DECLARE_ALIGNED_ARRAY(16, int16_t, input_block, kNumCoeffs); DECLARE_ALIGNED_ARRAY(16, int16_t, output_ref_block, kNumCoeffs); DECLARE_ALIGNED_ARRAY(16, int16_t, output_block, kNumCoeffs); input_block[j] = rnd.Rand8() - rnd.Rand8(); REGISTER_STATE_CHECK(RunFwdTxfm(input_block, output_block, pi...
DECLARE_ALIGNED(16, int16_t, input_block[kNumCoeffs]); DECLARE_ALIGNED(16, tran_low_t, output_ref_block[kNumCoeffs]); DECLARE_ALIGNED(16, tran_low_t, output_block[kNumCoeffs]); // Initialize a test block with input range [-mask_, mask_]. input_block[j] = (rnd.Rand16() & mask_) - (rnd.Rand16() ...
150,837
void RunFwdTxfm(int16_t *in, int16_t *out, int stride) { fwd_txfm_(in, out, stride); }
DoS Exec Code Overflow Mem. Corr.
1
void RunFwdTxfm(int16_t *in, int16_t *out, int stride) { void RunFwdTxfm(int16_t *in, tran_low_t *out, int stride) { fwd_txfm_(in, out, stride); }
@@ -13,18 +13,18 @@ #include <string.h> #include "third_party/googletest/src/include/gtest/gtest.h" + +#include "./vp9_rtcd.h" +#include "./vpx_dsp_rtcd.h" #include "test/acm_random.h" #include "test/clear_system_state.h" #include "test/register_state_check.h" #include "test/util.h" - -#include "./vp9_rtcd.h" ...
CWE-119
null
void RunFwdTxfm(int16_t *in, tran_low_t *out, int stride) {
150,838
void RunFwdTxfm(int16_t *in, int16_t *out, int stride) { fwd_txfm_(in, out, stride, tx_type_); }
DoS Exec Code Overflow Mem. Corr.
1
void RunFwdTxfm(int16_t *in, int16_t *out, int stride) { void RunFwdTxfm(int16_t *in, tran_low_t *out, int stride) { fwd_txfm_(in, out, stride, tx_type_); }
@@ -13,18 +13,18 @@ #include <string.h> #include "third_party/googletest/src/include/gtest/gtest.h" + +#include "./vp9_rtcd.h" +#include "./vpx_dsp_rtcd.h" #include "test/acm_random.h" #include "test/clear_system_state.h" #include "test/register_state_check.h" #include "test/util.h" - -#include "./vp9_rtcd.h" ...
CWE-119
null
void RunFwdTxfm(int16_t *in, tran_low_t *out, int stride) {
150,839
void RunInvAccuracyCheck() { ACMRandom rnd(ACMRandom::DeterministicSeed()); const int count_test_block = 1000; DECLARE_ALIGNED_ARRAY(16, int16_t, in, kNumCoeffs); DECLARE_ALIGNED_ARRAY(16, int16_t, coeff, kNumCoeffs); DECLARE_ALIGNED_ARRAY(16, uint8_t, dst, kNumCoeffs); DECLARE_ALIGNED_ARRA...
DoS Exec Code Overflow Mem. Corr.
1
void RunInvAccuracyCheck() { ACMRandom rnd(ACMRandom::DeterministicSeed()); const int count_test_block = 1000; DECLARE_ALIGNED(16, int16_t, in[kNumCoeffs]); DECLARE_ALIGNED(16, tran_low_t, coeff[kNumCoeffs]); DECLARE_ALIGNED(16, uint8_t, dst[kNumCoeffs]); DECLARE_ALIGNED(16, uint8_t, src[kN...
@@ -13,18 +13,18 @@ #include <string.h> #include "third_party/googletest/src/include/gtest/gtest.h" + +#include "./vp9_rtcd.h" +#include "./vpx_dsp_rtcd.h" #include "test/acm_random.h" #include "test/clear_system_state.h" #include "test/register_state_check.h" #include "test/util.h" - -#include "./vp9_rtcd.h" ...
CWE-119
DECLARE_ALIGNED_ARRAY(16, int16_t, in, kNumCoeffs); DECLARE_ALIGNED_ARRAY(16, int16_t, coeff, kNumCoeffs); DECLARE_ALIGNED_ARRAY(16, uint8_t, dst, kNumCoeffs); DECLARE_ALIGNED_ARRAY(16, uint8_t, src, kNumCoeffs); src[j] = rnd.Rand8(); dst[j] = rnd.Rand8(); in[j] = src[j] - dst[j]...
DECLARE_ALIGNED(16, int16_t, in[kNumCoeffs]); DECLARE_ALIGNED(16, tran_low_t, coeff[kNumCoeffs]); DECLARE_ALIGNED(16, uint8_t, dst[kNumCoeffs]); DECLARE_ALIGNED(16, uint8_t, src[kNumCoeffs]); #if CONFIG_VP9_HIGHBITDEPTH DECLARE_ALIGNED(16, uint16_t, dst16[kNumCoeffs]); DECLARE_ALIGNED(16, uint16...
150,840
void RunInvTxfm(int16_t *out, uint8_t *dst, int stride) { inv_txfm_(out, dst, stride, tx_type_); }
DoS Exec Code Overflow Mem. Corr.
1
void RunInvTxfm(int16_t *out, uint8_t *dst, int stride) { void RunInvTxfm(tran_low_t *out, uint8_t *dst, int stride) { inv_txfm_(out, dst, stride, tx_type_); }
@@ -13,18 +13,18 @@ #include <string.h> #include "third_party/googletest/src/include/gtest/gtest.h" + +#include "./vp9_rtcd.h" +#include "./vpx_dsp_rtcd.h" #include "test/acm_random.h" #include "test/clear_system_state.h" #include "test/register_state_check.h" #include "test/util.h" - -#include "./vp9_rtcd.h" ...
CWE-119
null
void RunInvTxfm(tran_low_t *out, uint8_t *dst, int stride) {
150,841
virtual void SetUp() { fwd_txfm_ = GET_PARAM(0); inv_txfm_ = GET_PARAM(1); tx_type_ = GET_PARAM(2); pitch_ = 16; fwd_txfm_ref = fht16x16_ref; }
DoS Exec Code Overflow Mem. Corr.
1
virtual void SetUp() { fwd_txfm_ = GET_PARAM(0); inv_txfm_ = GET_PARAM(1); tx_type_ = GET_PARAM(2); bit_depth_ = GET_PARAM(3); pitch_ = 16; fwd_txfm_ref = fht16x16_ref; inv_txfm_ref = iht16x16_ref; mask_ = (1 << bit_depth_) - 1; #if CONFIG_VP9_HIGHBITDEPTH switch (bit_dept...
@@ -13,18 +13,18 @@ #include <string.h> #include "third_party/googletest/src/include/gtest/gtest.h" + +#include "./vp9_rtcd.h" +#include "./vpx_dsp_rtcd.h" #include "test/acm_random.h" #include "test/clear_system_state.h" #include "test/register_state_check.h" #include "test/util.h" - -#include "./vp9_rtcd.h" ...
CWE-119
null
bit_depth_ = GET_PARAM(3); inv_txfm_ref = iht16x16_ref; mask_ = (1 << bit_depth_) - 1; #if CONFIG_VP9_HIGHBITDEPTH switch (bit_depth_) { case VPX_BITS_10: inv_txfm_ref = iht16x16_10; break; case VPX_BITS_12: inv_txfm_ref = iht16x16_12; break; default: ...
150,842
void fdct16x16_ref(const int16_t *in, int16_t *out, int stride, int tx_type) { vp9_fdct16x16_c(in, out, stride); }
DoS Exec Code Overflow Mem. Corr.
1
void fdct16x16_ref(const int16_t *in, int16_t *out, int stride, int tx_type) { void fdct16x16_ref(const int16_t *in, tran_low_t *out, int stride, int /*tx_type*/) { vpx_fdct16x16_c(in, out, stride); }
@@ -13,18 +13,18 @@ #include <string.h> #include "third_party/googletest/src/include/gtest/gtest.h" + +#include "./vp9_rtcd.h" +#include "./vpx_dsp_rtcd.h" #include "test/acm_random.h" #include "test/clear_system_state.h" #include "test/register_state_check.h" #include "test/util.h" - -#include "./vp9_rtcd.h" ...
CWE-119
vp9_fdct16x16_c(in, out, stride);
void fdct16x16_ref(const int16_t *in, tran_low_t *out, int stride, int /*tx_type*/) { vpx_fdct16x16_c(in, out, stride);
150,843
void fht16x16_ref(const int16_t *in, int16_t *out, int stride, int tx_type) { vp9_fht16x16_c(in, out, stride, tx_type); }
DoS Exec Code Overflow Mem. Corr.
1
void fht16x16_ref(const int16_t *in, int16_t *out, int stride, int tx_type) { void idct16x16_ref(const tran_low_t *in, uint8_t *dest, int stride, int /*tx_type*/) { vpx_idct16x16_256_add_c(in, dest, stride); } void fht16x16_ref(const int16_t *in, tran_low_t *out, int stride, int ...
@@ -13,18 +13,18 @@ #include <string.h> #include "third_party/googletest/src/include/gtest/gtest.h" + +#include "./vp9_rtcd.h" +#include "./vpx_dsp_rtcd.h" #include "test/acm_random.h" #include "test/clear_system_state.h" #include "test/register_state_check.h" #include "test/util.h" - -#include "./vp9_rtcd.h" ...
CWE-119
null
void idct16x16_ref(const tran_low_t *in, uint8_t *dest, int stride, int /*tx_type*/) { vpx_idct16x16_256_add_c(in, dest, stride); } void fht16x16_ref(const int16_t *in, tran_low_t *out, int stride, int tx_type) {
150,844
void reference_32x32_dct_2d(const int16_t input[kNumCoeffs], double output[kNumCoeffs]) { for (int i = 0; i < 32; ++i) { double temp_in[32], temp_out[32]; for (int j = 0; j < 32; ++j) temp_in[j] = input[j*32 + i]; reference_32x32_dct_1d(temp_in, temp_out, 1); for (int j = 0; j < 32; ++j) ...
DoS Exec Code Overflow Mem. Corr.
1
void reference_32x32_dct_2d(const int16_t input[kNumCoeffs], double output[kNumCoeffs]) { for (int i = 0; i < 32; ++i) { double temp_in[32], temp_out[32]; for (int j = 0; j < 32; ++j) temp_in[j] = input[j*32 + i]; reference_32x32_dct_1d(temp_in, temp_out); for (int j = 0; j < 32; ++j) ...
@@ -13,15 +13,18 @@ #include <string.h> #include "third_party/googletest/src/include/gtest/gtest.h" + +#include "./vp9_rtcd.h" +#include "./vpx_config.h" +#include "./vpx_dsp_rtcd.h" #include "test/acm_random.h" #include "test/clear_system_state.h" #include "test/register_state_check.h" #include "test/util.h" ...
CWE-119
reference_32x32_dct_1d(temp_in, temp_out, 1); reference_32x32_dct_1d(temp_in, temp_out, 1);
reference_32x32_dct_1d(temp_in, temp_out); reference_32x32_dct_1d(temp_in, temp_out);
150,845
vpx_codec_err_t Decoder::DecodeFrame(const uint8_t *cxdata, size_t size) { vpx_codec_err_t res_dec; InitOnce(); REGISTER_STATE_CHECK( res_dec = vpx_codec_decode(&decoder_, cxdata, static_cast<unsigned int>(size), NULL, 0)); return res...
DoS Exec Code Overflow Mem. Corr.
1
vpx_codec_err_t Decoder::DecodeFrame(const uint8_t *cxdata, size_t size) { return DecodeFrame(cxdata, size, NULL); } vpx_codec_err_t Decoder::DecodeFrame(const uint8_t *cxdata, size_t size, void *user_priv) { vpx_codec_err_t res_dec; InitOnce(); API_REGISTER_STATE_CHECK(...
@@ -7,35 +7,95 @@ * in the file PATENTS. All contributing project authors may * be found in the AUTHORS file in the root of the source tree. */ + +#include "third_party/googletest/src/include/gtest/gtest.h" + #include "test/codec_factory.h" #include "test/decode_test_driver.h" -#include "third_party/googlet...
CWE-119
REGISTER_STATE_CHECK( NULL, 0));
return DecodeFrame(cxdata, size, NULL); } vpx_codec_err_t Decoder::DecodeFrame(const uint8_t *cxdata, size_t size, void *user_priv) { API_REGISTER_STATE_CHECK( user_priv, 0));
150,846
void DecoderTest::RunLoop(CompressedVideoSource *video) { vpx_codec_dec_cfg_t dec_cfg = {0}; Decoder* const decoder = codec_->CreateDecoder(dec_cfg, 0); ASSERT_TRUE(decoder != NULL); for (video->Begin(); video->cxdata(); video->Next()) { PreDecodeFrameHook(*video, decoder); vpx_codec_err_t res_dec =...
DoS Exec Code Overflow Mem. Corr.
1
void DecoderTest::RunLoop(CompressedVideoSource *video) { bool Decoder::IsVP8() const { const char *codec_name = GetDecoderName(); return strncmp(kVP8Name, codec_name, sizeof(kVP8Name) - 1) == 0; } void DecoderTest::HandlePeekResult(Decoder *const decoder, CompressedVideoSource *...
@@ -7,35 +7,95 @@ * in the file PATENTS. All contributing project authors may * be found in the AUTHORS file in the root of the source tree. */ + +#include "third_party/googletest/src/include/gtest/gtest.h" + #include "test/codec_factory.h" #include "test/decode_test_driver.h" -#include "third_party/googlet...
CWE-119
vpx_codec_dec_cfg_t dec_cfg = {0}; Decoder* const decoder = codec_->CreateDecoder(dec_cfg, 0); for (video->Begin(); video->cxdata(); video->Next()) { vpx_codec_err_t res_dec = decoder->DecodeFrame(video->cxdata(), video->frame_size()); ASSERT_EQ(VPX_CODEC...
bool Decoder::IsVP8() const { const char *codec_name = GetDecoderName(); return strncmp(kVP8Name, codec_name, sizeof(kVP8Name) - 1) == 0; } void DecoderTest::HandlePeekResult(Decoder *const decoder, CompressedVideoSource *video, const vpx_codec_...
150,847
void Encoder::Flush() { const vpx_codec_err_t res = vpx_codec_encode(&encoder_, NULL, 0, 0, 0, deadline_); ASSERT_EQ(VPX_CODEC_OK, res) << EncoderError(); }
DoS Exec Code Overflow Mem. Corr.
1
void Encoder::Flush() { const vpx_codec_err_t res = vpx_codec_encode(&encoder_, NULL, 0, 0, 0, deadline_); if (!encoder_.priv) ASSERT_EQ(VPX_CODEC_ERROR, res) << EncoderError(); else ASSERT_EQ(VPX_CODEC_OK, res) << EncoderError(); }
@@ -8,15 +8,59 @@ * be found in the AUTHORS file in the root of the source tree. */ -#include "./vpx_config.h" -#include "test/codec_factory.h" -#include "test/encode_test_driver.h" -#include "test/decode_test_driver.h" -#include "test/register_state_check.h" -#include "test/video_source.h" +#include <string> +...
CWE-119
ASSERT_EQ(VPX_CODEC_OK, res) << EncoderError();
if (!encoder_.priv) ASSERT_EQ(VPX_CODEC_ERROR, res) << EncoderError(); else ASSERT_EQ(VPX_CODEC_OK, res) << EncoderError();
150,848
void EncoderTest::MismatchHook(const vpx_image_t *img1, const vpx_image_t *img2) { ASSERT_TRUE(0) << "Encode/Decode mismatch found"; }
DoS Exec Code Overflow Mem. Corr.
1
void EncoderTest::MismatchHook(const vpx_image_t *img1, void EncoderTest::MismatchHook(const vpx_image_t* /*img1*/, const vpx_image_t* /*img2*/) { ASSERT_TRUE(0) << "Encode/Decode mismatch found"; }
@@ -8,15 +8,59 @@ * be found in the AUTHORS file in the root of the source tree. */ -#include "./vpx_config.h" -#include "test/codec_factory.h" -#include "test/encode_test_driver.h" -#include "test/decode_test_driver.h" -#include "test/register_state_check.h" -#include "test/video_source.h" +#include <string> +...
CWE-119
const vpx_image_t *img2) {
void EncoderTest::MismatchHook(const vpx_image_t* /*img1*/, const vpx_image_t* /*img2*/) {
150,849
void EncoderTest::RunLoop(VideoSource *video) { vpx_codec_dec_cfg_t dec_cfg = {0}; stats_.Reset(); ASSERT_TRUE(passes_ == 1 || passes_ == 2); for (unsigned int pass = 0; pass < passes_; pass++) { last_pts_ = 0; if (passes_ == 1) cfg_.g_pass = VPX_RC_ONE_PASS; else if (pass == 0) cfg_.g_p...
DoS Exec Code Overflow Mem. Corr.
1
void EncoderTest::RunLoop(VideoSource *video) { vpx_codec_dec_cfg_t dec_cfg = vpx_codec_dec_cfg_t(); stats_.Reset(); ASSERT_TRUE(passes_ == 1 || passes_ == 2); for (unsigned int pass = 0; pass < passes_; pass++) { last_pts_ = 0; if (passes_ == 1) cfg_.g_pass = VPX_RC_ONE_PASS; else if (pass ==...
@@ -8,15 +8,59 @@ * be found in the AUTHORS file in the root of the source tree. */ -#include "./vpx_config.h" -#include "test/codec_factory.h" -#include "test/encode_test_driver.h" -#include "test/decode_test_driver.h" -#include "test/register_state_check.h" -#include "test/video_source.h" +#include <string> +...
CWE-119
vpx_codec_dec_cfg_t dec_cfg = {0}; Decoder* const decoder = codec_->CreateDecoder(dec_cfg, 0); for (again = true, video->Begin(); again; video->Next()) { ASSERT_EQ(VPX_CODEC_OK, res_dec) << decoder->DecodeError();
vpx_codec_dec_cfg_t dec_cfg = vpx_codec_dec_cfg_t(); video->Begin(); encoder->InitEncoder(video); unsigned long dec_init_flags = 0; // NOLINT // Use fragment decoder if encoder outputs partitions. // NOTE: fragment decoder and partition encoder are only supported by VP8. if (init_flags_ & V...
150,850
static bool compare_img(const vpx_image_t *img1, const vpx_image_t *img2) { bool match = (img1->fmt == img2->fmt) && (img1->d_w == img2->d_w) && (img1->d_h == img2->d_h); const unsigned int width_y = img1->d_w; const unsigned int height_y = img1->d_h; u...
DoS Exec Code Overflow Mem. Corr.
1
static bool compare_img(const vpx_image_t *img1, const vpx_image_t *img2) { bool match = (img1->fmt == img2->fmt) && (img1->cs == img2->cs) && (img1->d_w == img2->d_w) && (img1->d_h == img2->d_h); const unsigned int width_y = img1->d_w; co...
@@ -8,15 +8,59 @@ * be found in the AUTHORS file in the root of the source tree. */ -#include "./vpx_config.h" -#include "test/codec_factory.h" -#include "test/encode_test_driver.h" -#include "test/decode_test_driver.h" -#include "test/register_state_check.h" -#include "test/video_source.h" +#include <string> +...
CWE-119
null
(img1->cs == img2->cs) &&
150,851
virtual void PreEncodeFrameHook(libvpx_test::VideoSource *video) { frame_flags_ &= ~(VP8_EFLAG_NO_UPD_LAST | VP8_EFLAG_NO_UPD_GF | VP8_EFLAG_NO_UPD_ARF); if (droppable_nframes_ > 0 && (cfg_.g_pass == VPX_RC_LAST_PASS || cfg_.g_pass == VPX_RC_ONE_PASS)) { ...
DoS Exec Code Overflow Mem. Corr.
1
virtual void PreEncodeFrameHook(libvpx_test::VideoSource *video) { // // Frame flags and layer id for temporal layers. // For two layers, test pattern is: // 1 3 // 0 2 ..... // LAST is updated on base/layer 0, GOLDEN updated on layer 1. // Non-zero pattern_switch parameter means pattern w...
@@ -37,6 +37,7 @@ void Reset() { error_nframes_ = 0; droppable_nframes_ = 0; + pattern_switch_ = 0; } virtual void SetUp() { @@ -56,22 +57,77 @@ nframes_++; } - virtual void PreEncodeFrameHook(libvpx_test::VideoSource *video) { + // + // Frame flags and layer id for temporal layer...
CWE-119
if (droppable_nframes_ > 0 && (cfg_.g_pass == VPX_RC_LAST_PASS || cfg_.g_pass == VPX_RC_ONE_PASS)) { std::cout << " Encoding droppable frame: " frame_flags_ |= (VP8_EFLAG_NO_UPD_LAST | VP8_EFLAG_NO_UPD_GF | VP8_EFLAG_NO_UP...
// // Frame flags and layer id for temporal layers. // For two layers, test pattern is: // 1 3 // 0 2 ..... // LAST is updated on base/layer 0, GOLDEN updated on layer 1. // Non-zero pattern_switch parameter means pattern will switch to // not using LAST for frame_num >= pattern_switch. ...
150,852
void Reset() { error_nframes_ = 0; droppable_nframes_ = 0; }
DoS Exec Code Overflow Mem. Corr.
1
void Reset() { error_nframes_ = 0; droppable_nframes_ = 0; pattern_switch_ = 0; }
@@ -37,6 +37,7 @@ void Reset() { error_nframes_ = 0; droppable_nframes_ = 0; + pattern_switch_ = 0; } virtual void SetUp() { @@ -56,22 +57,77 @@ nframes_++; } - virtual void PreEncodeFrameHook(libvpx_test::VideoSource *video) { + // + // Frame flags and layer id for temporal layer...
CWE-119
null
pattern_switch_ = 0;
150,853
int GetFreeFrameBuffer(size_t min_size, vpx_codec_frame_buffer_t *fb) { EXPECT_TRUE(fb != NULL); const int idx = FindFreeBufferIndex(); if (idx == num_buffers_) return -1; if (ext_fb_list_[idx].size < min_size) { delete [] ext_fb_list_[idx].data; ext_fb_list_[idx].data = new uint8_t[min_siz...
DoS Exec Code Overflow Mem. Corr.
1
int GetFreeFrameBuffer(size_t min_size, vpx_codec_frame_buffer_t *fb) { EXPECT_TRUE(fb != NULL); const int idx = FindFreeBufferIndex(); if (idx == num_buffers_) return -1; if (ext_fb_list_[idx].size < min_size) { delete [] ext_fb_list_[idx].data; ext_fb_list_[idx].data = new uint8_t[min_siz...
@@ -10,13 +10,16 @@ #include <string> +#include "./vpx_config.h" #include "test/codec_factory.h" #include "test/decode_test_driver.h" #include "test/ivf_video_source.h" #include "test/md5_helper.h" #include "test/test_vectors.h" #include "test/util.h" +#if CONFIG_WEBM_IO #include "test/webm_video_source.h"...
CWE-119
null
memset(ext_fb_list_[idx].data, 0, min_size);
150,854
int ReturnFrameBuffer(vpx_codec_frame_buffer_t *fb) { EXPECT_TRUE(fb != NULL); ExternalFrameBuffer *const ext_fb = reinterpret_cast<ExternalFrameBuffer*>(fb->priv); EXPECT_TRUE(ext_fb != NULL); EXPECT_EQ(1, ext_fb->in_use); ext_fb->in_use = 0; return 0; }
DoS Exec Code Overflow Mem. Corr.
1
int ReturnFrameBuffer(vpx_codec_frame_buffer_t *fb) { if (fb == NULL) { EXPECT_TRUE(fb != NULL); return -1; } ExternalFrameBuffer *const ext_fb = reinterpret_cast<ExternalFrameBuffer*>(fb->priv); if (ext_fb == NULL) { EXPECT_TRUE(ext_fb != NULL); return -1; } ...
@@ -10,13 +10,16 @@ #include <string> +#include "./vpx_config.h" #include "test/codec_factory.h" #include "test/decode_test_driver.h" #include "test/ivf_video_source.h" #include "test/md5_helper.h" #include "test/test_vectors.h" #include "test/util.h" +#if CONFIG_WEBM_IO #include "test/webm_video_source.h"...
CWE-119
EXPECT_TRUE(fb != NULL); EXPECT_TRUE(ext_fb != NULL);
if (fb == NULL) { EXPECT_TRUE(fb != NULL); return -1; } if (ext_fb == NULL) { EXPECT_TRUE(ext_fb != NULL); return -1; }
150,855
virtual void SetUp() { video_ = new libvpx_test::WebMVideoSource(kVP9TestFile); ASSERT_TRUE(video_ != NULL); video_->Init(); video_->Begin(); vpx_codec_dec_cfg_t cfg = {0}; decoder_ = new libvpx_test::VP9Decoder(cfg, 0); ASSERT_TRUE(decoder_ != NULL); }
DoS Exec Code Overflow Mem. Corr.
1
virtual void SetUp() { video_ = new libvpx_test::WebMVideoSource(kVP9TestFile); ASSERT_TRUE(video_ != NULL); video_->Init(); video_->Begin(); vpx_codec_dec_cfg_t cfg = vpx_codec_dec_cfg_t(); decoder_ = new libvpx_test::VP9Decoder(cfg, 0); ASSERT_TRUE(decoder_ != NULL); }
@@ -10,13 +10,16 @@ #include <string> +#include "./vpx_config.h" #include "test/codec_factory.h" #include "test/decode_test_driver.h" #include "test/ivf_video_source.h" #include "test/md5_helper.h" #include "test/test_vectors.h" #include "test/util.h" +#if CONFIG_WEBM_IO #include "test/webm_video_source.h"...
CWE-119
vpx_codec_dec_cfg_t cfg = {0};
vpx_codec_dec_cfg_t cfg = vpx_codec_dec_cfg_t();
150,856
void RunAccuracyCheck() { ACMRandom rnd(ACMRandom::DeterministicSeed()); uint32_t max_error = 0; int64_t total_error = 0; const int count_test_block = 10000; for (int i = 0; i < count_test_block; ++i) { DECLARE_ALIGNED_ARRAY(16, int16_t, test_input_block, kNumCoeffs); DECLARE_ALIG...
DoS Exec Code Overflow Mem. Corr.
1
void RunAccuracyCheck() { void RunAccuracyCheck(int limit) { ACMRandom rnd(ACMRandom::DeterministicSeed()); uint32_t max_error = 0; int64_t total_error = 0; const int count_test_block = 10000; for (int i = 0; i < count_test_block; ++i) { DECLARE_ALIGNED(16, int16_t, test_input_block[k...
@@ -13,74 +13,140 @@ #include <string.h> #include "third_party/googletest/src/include/gtest/gtest.h" + +#include "./vp9_rtcd.h" +#include "./vpx_dsp_rtcd.h" #include "test/acm_random.h" #include "test/clear_system_state.h" #include "test/register_state_check.h" #include "test/util.h" - -#include "./vp9_rtcd.h"...
CWE-119
DECLARE_ALIGNED_ARRAY(16, int16_t, test_input_block, kNumCoeffs); DECLARE_ALIGNED_ARRAY(16, int16_t, test_temp_block, kNumCoeffs); DECLARE_ALIGNED_ARRAY(16, uint8_t, dst, kNumCoeffs); DECLARE_ALIGNED_ARRAY(16, uint8_t, src, kNumCoeffs); src[j] = rnd.Rand8(); dst[j] = rnd.Rand8();...
void RunAccuracyCheck(int limit) { DECLARE_ALIGNED(16, int16_t, test_input_block[kNumCoeffs]); DECLARE_ALIGNED(16, tran_low_t, test_temp_block[kNumCoeffs]); DECLARE_ALIGNED(16, uint8_t, dst[kNumCoeffs]); DECLARE_ALIGNED(16, uint8_t, src[kNumCoeffs]); #if CONFIG_VP9_HIGHBITDEPTH DECLARE_A...
150,857
void RunFwdTxfm(const int16_t *in, int16_t *out, int stride) { fwd_txfm_(in, out, stride); }
DoS Exec Code Overflow Mem. Corr.
1
void RunFwdTxfm(const int16_t *in, int16_t *out, int stride) { void RunFwdTxfm(const int16_t *in, tran_low_t *out, int stride) { fwd_txfm_(in, out, stride); }
@@ -13,74 +13,140 @@ #include <string.h> #include "third_party/googletest/src/include/gtest/gtest.h" + +#include "./vp9_rtcd.h" +#include "./vpx_dsp_rtcd.h" #include "test/acm_random.h" #include "test/clear_system_state.h" #include "test/register_state_check.h" #include "test/util.h" - -#include "./vp9_rtcd.h"...
CWE-119
null
void RunFwdTxfm(const int16_t *in, tran_low_t *out, int stride) {
150,858
void RunFwdTxfm(const int16_t *in, int16_t *out, int stride) { fwd_txfm_(in, out, stride, tx_type_); }
DoS Exec Code Overflow Mem. Corr.
1
void RunFwdTxfm(const int16_t *in, int16_t *out, int stride) { void RunFwdTxfm(const int16_t *in, tran_low_t *out, int stride) { fwd_txfm_(in, out, stride, tx_type_); }
@@ -13,74 +13,140 @@ #include <string.h> #include "third_party/googletest/src/include/gtest/gtest.h" + +#include "./vp9_rtcd.h" +#include "./vpx_dsp_rtcd.h" #include "test/acm_random.h" #include "test/clear_system_state.h" #include "test/register_state_check.h" #include "test/util.h" - -#include "./vp9_rtcd.h"...
CWE-119
null
void RunFwdTxfm(const int16_t *in, tran_low_t *out, int stride) {
150,859
void RunInvTxfm(const int16_t *out, uint8_t *dst, int stride) { inv_txfm_(out, dst, stride); }
DoS Exec Code Overflow Mem. Corr.
1
void RunInvTxfm(const int16_t *out, uint8_t *dst, int stride) { void RunInvTxfm(const tran_low_t *out, uint8_t *dst, int stride) { inv_txfm_(out, dst, stride); }
@@ -13,74 +13,140 @@ #include <string.h> #include "third_party/googletest/src/include/gtest/gtest.h" + +#include "./vp9_rtcd.h" +#include "./vpx_dsp_rtcd.h" #include "test/acm_random.h" #include "test/clear_system_state.h" #include "test/register_state_check.h" #include "test/util.h" - -#include "./vp9_rtcd.h"...
CWE-119
null
void RunInvTxfm(const tran_low_t *out, uint8_t *dst, int stride) {
150,860
void RunMemCheck() { ACMRandom rnd(ACMRandom::DeterministicSeed()); const int count_test_block = 5000; DECLARE_ALIGNED_ARRAY(16, int16_t, input_block, kNumCoeffs); DECLARE_ALIGNED_ARRAY(16, int16_t, input_extreme_block, kNumCoeffs); DECLARE_ALIGNED_ARRAY(16, int16_t, output_ref_block, kNumCoeff...
DoS Exec Code Overflow Mem. Corr.
1
void RunMemCheck() { ACMRandom rnd(ACMRandom::DeterministicSeed()); const int count_test_block = 5000; DECLARE_ALIGNED(16, int16_t, input_extreme_block[kNumCoeffs]); DECLARE_ALIGNED(16, tran_low_t, output_ref_block[kNumCoeffs]); DECLARE_ALIGNED(16, tran_low_t, output_block[kNumCoeffs]); ...
@@ -13,74 +13,140 @@ #include <string.h> #include "third_party/googletest/src/include/gtest/gtest.h" + +#include "./vp9_rtcd.h" +#include "./vpx_dsp_rtcd.h" #include "test/acm_random.h" #include "test/clear_system_state.h" #include "test/register_state_check.h" #include "test/util.h" - -#include "./vp9_rtcd.h"...
CWE-119
DECLARE_ALIGNED_ARRAY(16, int16_t, input_block, kNumCoeffs); DECLARE_ALIGNED_ARRAY(16, int16_t, input_extreme_block, kNumCoeffs); DECLARE_ALIGNED_ARRAY(16, int16_t, output_ref_block, kNumCoeffs); DECLARE_ALIGNED_ARRAY(16, int16_t, output_block, kNumCoeffs); input_block[j] = rnd.Rand8() - rnd.Ran...
DECLARE_ALIGNED(16, int16_t, input_extreme_block[kNumCoeffs]); DECLARE_ALIGNED(16, tran_low_t, output_ref_block[kNumCoeffs]); DECLARE_ALIGNED(16, tran_low_t, output_block[kNumCoeffs]); // Initialize a test block with input range [-mask_, mask_]. input_extreme_block[j] = rnd.Rand8() % 2 ? mask_...
150,861
virtual void SetUp() { fwd_txfm_ = GET_PARAM(0); inv_txfm_ = GET_PARAM(1); tx_type_ = GET_PARAM(2); pitch_ = 4; fwd_txfm_ref = fdct4x4_ref; }
DoS Exec Code Overflow Mem. Corr.
1
virtual void SetUp() { fwd_txfm_ = GET_PARAM(0); inv_txfm_ = GET_PARAM(1); tx_type_ = GET_PARAM(2); pitch_ = 4; fwd_txfm_ref = fdct4x4_ref; bit_depth_ = GET_PARAM(3); mask_ = (1 << bit_depth_) - 1; }
@@ -13,74 +13,140 @@ #include <string.h> #include "third_party/googletest/src/include/gtest/gtest.h" + +#include "./vp9_rtcd.h" +#include "./vpx_dsp_rtcd.h" #include "test/acm_random.h" #include "test/clear_system_state.h" #include "test/register_state_check.h" #include "test/util.h" - -#include "./vp9_rtcd.h"...
CWE-119
null
bit_depth_ = GET_PARAM(3); mask_ = (1 << bit_depth_) - 1;
150,862
virtual void SetUp() { fwd_txfm_ = GET_PARAM(0); inv_txfm_ = GET_PARAM(1); tx_type_ = GET_PARAM(2); pitch_ = 4; fwd_txfm_ref = fht4x4_ref; }
DoS Exec Code Overflow Mem. Corr.
1
virtual void SetUp() { fwd_txfm_ = GET_PARAM(0); inv_txfm_ = GET_PARAM(1); tx_type_ = GET_PARAM(2); pitch_ = 4; fwd_txfm_ref = fht4x4_ref; bit_depth_ = GET_PARAM(3); mask_ = (1 << bit_depth_) - 1; }
@@ -13,74 +13,140 @@ #include <string.h> #include "third_party/googletest/src/include/gtest/gtest.h" + +#include "./vp9_rtcd.h" +#include "./vpx_dsp_rtcd.h" #include "test/acm_random.h" #include "test/clear_system_state.h" #include "test/register_state_check.h" #include "test/util.h" - -#include "./vp9_rtcd.h"...
CWE-119
null
bit_depth_ = GET_PARAM(3); mask_ = (1 << bit_depth_) - 1;
150,863
void fdct4x4_ref(const int16_t *in, int16_t *out, int stride, int tx_type) { vp9_fdct4x4_c(in, out, stride); }
DoS Exec Code Overflow Mem. Corr.
1
void fdct4x4_ref(const int16_t *in, int16_t *out, int stride, int tx_type) { void fdct4x4_ref(const int16_t *in, tran_low_t *out, int stride, int tx_type) { vpx_fdct4x4_c(in, out, stride); }
@@ -13,74 +13,140 @@ #include <string.h> #include "third_party/googletest/src/include/gtest/gtest.h" + +#include "./vp9_rtcd.h" +#include "./vpx_dsp_rtcd.h" #include "test/acm_random.h" #include "test/clear_system_state.h" #include "test/register_state_check.h" #include "test/util.h" - -#include "./vp9_rtcd.h"...
CWE-119
vp9_fdct4x4_c(in, out, stride);
void fdct4x4_ref(const int16_t *in, tran_low_t *out, int stride, int tx_type) { vpx_fdct4x4_c(in, out, stride);
150,864
void fht4x4_ref(const int16_t *in, int16_t *out, int stride, int tx_type) { vp9_fht4x4_c(in, out, stride, tx_type); }
DoS Exec Code Overflow Mem. Corr.
1
void fht4x4_ref(const int16_t *in, int16_t *out, int stride, int tx_type) { void fht4x4_ref(const int16_t *in, tran_low_t *out, int stride, int tx_type) { vp9_fht4x4_c(in, out, stride, tx_type); }
@@ -13,74 +13,140 @@ #include <string.h> #include "third_party/googletest/src/include/gtest/gtest.h" + +#include "./vp9_rtcd.h" +#include "./vpx_dsp_rtcd.h" #include "test/acm_random.h" #include "test/clear_system_state.h" #include "test/register_state_check.h" #include "test/util.h" - -#include "./vp9_rtcd.h"...
CWE-119
null
void fht4x4_ref(const int16_t *in, tran_low_t *out, int stride, int tx_type) {
150,865
void RunExtremalCheck() { ACMRandom rnd(ACMRandom::DeterministicSeed()); int max_error = 0; int total_error = 0; const int count_test_block = 100000; DECLARE_ALIGNED_ARRAY(16, int16_t, test_input_block, 64); DECLARE_ALIGNED_ARRAY(16, int16_t, test_temp_block, 64); DECLARE_ALIGNED_ARRAY...
DoS Exec Code Overflow Mem. Corr.
1
void RunExtremalCheck() { ACMRandom rnd(ACMRandom::DeterministicSeed()); int max_error = 0; int total_error = 0; int total_coeff_error = 0; const int count_test_block = 100000; DECLARE_ALIGNED(16, int16_t, test_input_block[64]); DECLARE_ALIGNED(16, tran_low_t, test_temp_block[64]); ...
@@ -13,52 +13,139 @@ #include <string.h> #include "third_party/googletest/src/include/gtest/gtest.h" + +#include "./vp9_rtcd.h" +#include "./vpx_dsp_rtcd.h" #include "test/acm_random.h" #include "test/clear_system_state.h" #include "test/register_state_check.h" #include "test/util.h" - -#include "./vp9_rtcd.h"...
CWE-119
DECLARE_ALIGNED_ARRAY(16, int16_t, test_input_block, 64); DECLARE_ALIGNED_ARRAY(16, int16_t, test_temp_block, 64); DECLARE_ALIGNED_ARRAY(16, uint8_t, dst, 64); DECLARE_ALIGNED_ARRAY(16, uint8_t, src, 64); src[j] = rnd.Rand8() % 2 ? 255 : 0; dst[j] = src[j] > 0 ? 0 : 255; test_inp...
int total_coeff_error = 0; DECLARE_ALIGNED(16, int16_t, test_input_block[64]); DECLARE_ALIGNED(16, tran_low_t, test_temp_block[64]); DECLARE_ALIGNED(16, tran_low_t, ref_temp_block[64]); DECLARE_ALIGNED(16, uint8_t, dst[64]); DECLARE_ALIGNED(16, uint8_t, src[64]); #if CONFIG_VP9_HIGHBITDEPTH ...
150,866
void RunRoundTripErrorCheck() { ACMRandom rnd(ACMRandom::DeterministicSeed()); int max_error = 0; int total_error = 0; const int count_test_block = 100000; DECLARE_ALIGNED_ARRAY(16, int16_t, test_input_block, 64); DECLARE_ALIGNED_ARRAY(16, int16_t, test_temp_block, 64); DECLARE_ALIGNED_ARR...
DoS Exec Code Overflow Mem. Corr.
1
void RunRoundTripErrorCheck() { ACMRandom rnd(ACMRandom::DeterministicSeed()); int max_error = 0; int total_error = 0; const int count_test_block = 100000; DECLARE_ALIGNED(16, int16_t, test_input_block[64]); DECLARE_ALIGNED(16, tran_low_t, test_temp_block[64]); DECLARE_ALIGNED(16, uint8_t,...
@@ -13,52 +13,139 @@ #include <string.h> #include "third_party/googletest/src/include/gtest/gtest.h" + +#include "./vp9_rtcd.h" +#include "./vpx_dsp_rtcd.h" #include "test/acm_random.h" #include "test/clear_system_state.h" #include "test/register_state_check.h" #include "test/util.h" - -#include "./vp9_rtcd.h"...
CWE-119
DECLARE_ALIGNED_ARRAY(16, int16_t, test_input_block, 64); DECLARE_ALIGNED_ARRAY(16, int16_t, test_temp_block, 64); DECLARE_ALIGNED_ARRAY(16, uint8_t, dst, 64); DECLARE_ALIGNED_ARRAY(16, uint8_t, src, 64); src[j] = rnd.Rand8(); dst[j] = rnd.Rand8(); test_input_block[j] = src[j] - ...
DECLARE_ALIGNED(16, int16_t, test_input_block[64]); DECLARE_ALIGNED(16, tran_low_t, test_temp_block[64]); DECLARE_ALIGNED(16, uint8_t, dst[64]); DECLARE_ALIGNED(16, uint8_t, src[64]); #if CONFIG_VP9_HIGHBITDEPTH DECLARE_ALIGNED(16, uint16_t, dst16[64]); DECLARE_ALIGNED(16, uint16_t, src16[64]); ...
150,867
virtual void SetUp() { fwd_txfm_ = GET_PARAM(0); inv_txfm_ = GET_PARAM(1); tx_type_ = GET_PARAM(2); pitch_ = 8; fwd_txfm_ref = fdct8x8_ref; }
DoS Exec Code Overflow Mem. Corr.
1
virtual void SetUp() { fwd_txfm_ = GET_PARAM(0); inv_txfm_ = GET_PARAM(1); tx_type_ = GET_PARAM(2); pitch_ = 8; fwd_txfm_ref = fdct8x8_ref; bit_depth_ = GET_PARAM(3); mask_ = (1 << bit_depth_) - 1; }
@@ -13,52 +13,139 @@ #include <string.h> #include "third_party/googletest/src/include/gtest/gtest.h" + +#include "./vp9_rtcd.h" +#include "./vpx_dsp_rtcd.h" #include "test/acm_random.h" #include "test/clear_system_state.h" #include "test/register_state_check.h" #include "test/util.h" - -#include "./vp9_rtcd.h"...
CWE-119
null
bit_depth_ = GET_PARAM(3); mask_ = (1 << bit_depth_) - 1;
150,868
void fdct8x8_ref(const int16_t *in, int16_t *out, int stride, int tx_type) { vp9_fdct8x8_c(in, out, stride); }
DoS Exec Code Overflow Mem. Corr.
1
void fdct8x8_ref(const int16_t *in, int16_t *out, int stride, int tx_type) { const int kSignBiasMaxDiff255 = 1500; const int kSignBiasMaxDiff15 = 10000; typedef void (*FdctFunc)(const int16_t *in, tran_low_t *out, int stride); typedef void (*IdctFunc)(const tran_low_t *in, uint8_t *out, int stride); typedef void (*Fht...
@@ -13,52 +13,139 @@ #include <string.h> #include "third_party/googletest/src/include/gtest/gtest.h" + +#include "./vp9_rtcd.h" +#include "./vpx_dsp_rtcd.h" #include "test/acm_random.h" #include "test/clear_system_state.h" #include "test/register_state_check.h" #include "test/util.h" - -#include "./vp9_rtcd.h"...
CWE-119
vp9_fdct8x8_c(in, out, stride);
const int kSignBiasMaxDiff255 = 1500; const int kSignBiasMaxDiff15 = 10000; typedef void (*FdctFunc)(const int16_t *in, tran_low_t *out, int stride); typedef void (*IdctFunc)(const tran_low_t *in, uint8_t *out, int stride); typedef void (*FhtFunc)(const int16_t *in, tran_low_t *out, int stride, ...
150,869
void fht8x8_ref(const int16_t *in, int16_t *out, int stride, int tx_type) { vp9_fht8x8_c(in, out, stride, tx_type); }
DoS Exec Code Overflow Mem. Corr.
1
void fht8x8_ref(const int16_t *in, int16_t *out, int stride, int tx_type) { void reference_8x8_dct_2d(const int16_t input[kNumCoeffs], double output[kNumCoeffs]) { // First transform columns for (int i = 0; i < 8; ++i) { double temp_in[8], temp_out[8]; for (int j = 0; j < 8; ++j) ...
@@ -13,52 +13,139 @@ #include <string.h> #include "third_party/googletest/src/include/gtest/gtest.h" + +#include "./vp9_rtcd.h" +#include "./vpx_dsp_rtcd.h" #include "test/acm_random.h" #include "test/clear_system_state.h" #include "test/register_state_check.h" #include "test/util.h" - -#include "./vp9_rtcd.h"...
CWE-119
null
void reference_8x8_dct_2d(const int16_t input[kNumCoeffs], double output[kNumCoeffs]) { // First transform columns for (int i = 0; i < 8; ++i) { double temp_in[8], temp_out[8]; for (int j = 0; j < 8; ++j) temp_in[j] = input[j*8 + i]; reference_8x8_dct_1d(temp_in, temp_out...
150,870
virtual void Predict(MB_PREDICTION_MODE mode) { mbptr_->mode_info_context->mbmi.mode = mode; REGISTER_STATE_CHECK(pred_fn_(mbptr_, data_ptr_[0] - kStride, data_ptr_[0] - 1, kStride, data_ptr_[0], kStride));...
DoS Exec Code Overflow Mem. Corr.
1
virtual void Predict(MB_PREDICTION_MODE mode) { mbptr_->mode_info_context->mbmi.mode = mode; ASM_REGISTER_STATE_CHECK(pred_fn_(mbptr_, data_ptr_[0] - kStride, data_ptr_[0] - 1, kStride, data_ptr...
@@ -8,15 +8,15 @@ * be found in the AUTHORS file in the root of the source tree. */ - #include <string.h> -#include "test/acm_random.h" -#include "test/clear_system_state.h" -#include "test/register_state_check.h" + #include "third_party/googletest/src/include/gtest/gtest.h" #include "./vpx_config.h" #inc...
CWE-119
REGISTER_STATE_CHECK(pred_fn_(mbptr_, data_ptr_[0] - kStride, data_ptr_[0] - 1, kStride, data_ptr_[0], kStride));
ASM_REGISTER_STATE_CHECK(pred_fn_(mbptr_, data_ptr_[0] - kStride, data_ptr_[0] - 1, kStride, data_ptr_[0], kStride));
150,871
virtual void SetUp() { full_itxfm_ = GET_PARAM(0); partial_itxfm_ = GET_PARAM(1); tx_size_ = GET_PARAM(2); last_nonzero_ = GET_PARAM(3); }
DoS Exec Code Overflow Mem. Corr.
1
virtual void SetUp() { ftxfm_ = GET_PARAM(0); full_itxfm_ = GET_PARAM(1); partial_itxfm_ = GET_PARAM(2); tx_size_ = GET_PARAM(3); last_nonzero_ = GET_PARAM(4); }
@@ -13,12 +13,13 @@ #include <string.h> #include "third_party/googletest/src/include/gtest/gtest.h" + +#include "./vp9_rtcd.h" +#include "./vpx_dsp_rtcd.h" #include "test/acm_random.h" #include "test/clear_system_state.h" #include "test/register_state_check.h" #include "test/util.h" - -#include "./vp9_rtcd.h" ...
CWE-119
full_itxfm_ = GET_PARAM(0); partial_itxfm_ = GET_PARAM(1); tx_size_ = GET_PARAM(2); last_nonzero_ = GET_PARAM(3);
ftxfm_ = GET_PARAM(0); full_itxfm_ = GET_PARAM(1); partial_itxfm_ = GET_PARAM(2); tx_size_ = GET_PARAM(3); last_nonzero_ = GET_PARAM(4);
150,872
virtual void FramePktHook(const vpx_codec_cx_pkt_t *pkt) { #if WRITE_COMPRESSED_STREAM ++out_frames_; if (pkt->data.frame.pts == 0) write_ivf_file_header(&cfg_, 0, outfile_); write_ivf_frame_header(pkt, outfile_); (void)fwrite(pkt->data.frame.buf, 1, pkt->data.frame.sz, outfile_); #endif ...
DoS Exec Code Overflow Mem. Corr.
1
virtual void FramePktHook(const vpx_codec_cx_pkt_t *pkt) { #if WRITE_COMPRESSED_STREAM virtual void FramePktHook(const vpx_codec_cx_pkt_t *pkt) { ++out_frames_; if (pkt->data.frame.pts == 0) write_ivf_file_header(&cfg_, 0, outfile_); write_ivf_frame_header(pkt, outfile_); (void)fwrite(pkt...
@@ -144,6 +144,7 @@ TEST_P(ResizeTest, TestExternalResizeWorks) { ResizingVideoSource video; + cfg_.g_lag_in_frames = 0; ASSERT_NO_FATAL_FAILURE(RunLoop(&video)); for (std::vector<FrameInfo>::const_iterator info = frame_info_list_.begin(); @@ -153,9 +154,9 @@ const unsigned int expected_h = ScaleF...
CWE-119
#endif
virtual void FramePktHook(const vpx_codec_cx_pkt_t *pkt) {
150,873
void CheckSADs() { unsigned int reference_sad, exp_sad[4]; SADs(exp_sad); for (int block = 0; block < 4; block++) { reference_sad = ReferenceSAD(UINT_MAX, block); EXPECT_EQ(exp_sad[block], reference_sad) << "block " << block; } }
DoS Exec Code Overflow Mem. Corr.
1
void CheckSADs() { unsigned int reference_sad, exp_sad[4]; SADs(exp_sad); for (int block = 0; block < 4; ++block) { reference_sad = ReferenceSAD(block); EXPECT_EQ(reference_sad, exp_sad[block]) << "block " << block; } }
@@ -13,56 +13,74 @@ #include <limits.h> #include <stdio.h> -#include "./vpx_config.h" -#if CONFIG_VP8_ENCODER -#include "./vp8_rtcd.h" -#endif -#if CONFIG_VP9_ENCODER -#include "./vp9_rtcd.h" -#endif -#include "vpx_mem/vpx_mem.h" +#include "third_party/googletest/src/include/gtest/gtest.h" +#include "./vpx_confi...
CWE-119
for (int block = 0; block < 4; block++) { reference_sad = ReferenceSAD(UINT_MAX, block); EXPECT_EQ(exp_sad[block], reference_sad) << "block " << block;
for (int block = 0; block < 4; ++block) { reference_sad = ReferenceSAD(block); EXPECT_EQ(reference_sad, exp_sad[block]) << "block " << block;
150,874
void CheckSad(unsigned int max_sad) { unsigned int reference_sad, exp_sad; reference_sad = ReferenceSAD(max_sad); exp_sad = SAD(max_sad); if (reference_sad <= max_sad) { ASSERT_EQ(exp_sad, reference_sad); } else { ASSERT_GE(exp_sad, reference_sad); } }
DoS Exec Code Overflow Mem. Corr.
1
void CheckSad(unsigned int max_sad) {
@@ -13,56 +13,74 @@ #include <limits.h> #include <stdio.h> -#include "./vpx_config.h" -#if CONFIG_VP8_ENCODER -#include "./vp8_rtcd.h" -#endif -#if CONFIG_VP9_ENCODER -#include "./vp9_rtcd.h" -#endif -#include "vpx_mem/vpx_mem.h" +#include "third_party/googletest/src/include/gtest/gtest.h" +#include "./vpx_confi...
CWE-119
unsigned int reference_sad, exp_sad; reference_sad = ReferenceSAD(max_sad); exp_sad = SAD(max_sad); if (reference_sad <= max_sad) { ASSERT_EQ(exp_sad, reference_sad); } else { ASSERT_GE(exp_sad, reference_sad); } }
null
150,875
virtual uint8_t* GetReference(int block_idx) { return reference_data_ + block_idx * kDataBlockSize; }
DoS Exec Code Overflow Mem. Corr.
1
virtual uint8_t* GetReference(int block_idx) { virtual uint8_t *GetReference(int block_idx) { #if CONFIG_VP9_HIGHBITDEPTH if (use_high_bit_depth_) return CONVERT_TO_BYTEPTR(CONVERT_TO_SHORTPTR(reference_data_) + block_idx * kDataBlockSize); #endif // CONFIG_VP9_HIGHBITDEPT...
@@ -13,56 +13,74 @@ #include <limits.h> #include <stdio.h> -#include "./vpx_config.h" -#if CONFIG_VP8_ENCODER -#include "./vp8_rtcd.h" -#endif -#if CONFIG_VP9_ENCODER -#include "./vp9_rtcd.h" -#endif -#include "vpx_mem/vpx_mem.h" +#include "third_party/googletest/src/include/gtest/gtest.h" +#include "./vpx_confi...
CWE-119
null
virtual uint8_t *GetReference(int block_idx) { #if CONFIG_VP9_HIGHBITDEPTH if (use_high_bit_depth_) return CONVERT_TO_BYTEPTR(CONVERT_TO_SHORTPTR(reference_data_) + block_idx * kDataBlockSize); #endif // CONFIG_VP9_HIGHBITDEPTH
150,876
void SADs(unsigned int *results) { const uint8_t* refs[] = {GetReference(0), GetReference(1), GetReference(2), GetReference(3)}; REGISTER_STATE_CHECK(GET_PARAM(2)(source_data_, source_stride_, refs, reference_stride_, ...
DoS Exec Code Overflow Mem. Corr.
1
void SADs(unsigned int *results) { const uint8_t *references[] = {GetReference(0), GetReference(1), GetReference(2), GetReference(3)}; ASM_REGISTER_STATE_CHECK(GET_PARAM(2)(source_data_, source_stride_, references, reference_strid...
@@ -13,56 +13,74 @@ #include <limits.h> #include <stdio.h> -#include "./vpx_config.h" -#if CONFIG_VP8_ENCODER -#include "./vp8_rtcd.h" -#endif -#if CONFIG_VP9_ENCODER -#include "./vp9_rtcd.h" -#endif -#include "vpx_mem/vpx_mem.h" +#include "third_party/googletest/src/include/gtest/gtest.h" +#include "./vpx_confi...
CWE-119
const uint8_t* refs[] = {GetReference(0), GetReference(1), GetReference(2), GetReference(3)}; REGISTER_STATE_CHECK(GET_PARAM(2)(source_data_, source_stride_, refs, reference_stride_, results));
const uint8_t *references[] = {GetReference(0), GetReference(1), GetReference(2), GetReference(3)}; ASM_REGISTER_STATE_CHECK(GET_PARAM(2)(source_data_, source_stride_, references, reference_stride_, ...
150,877
virtual void SetUp() { source_stride_ = (width_ + 31) & ~31; reference_stride_ = width_ * 2; rnd_.Reset(ACMRandom::DeterministicSeed()); }
DoS Exec Code Overflow Mem. Corr.
1
virtual void SetUp() { if (bd_ == -1) { use_high_bit_depth_ = false; bit_depth_ = VPX_BITS_8; source_data_ = source_data8_; reference_data_ = reference_data8_; second_pred_ = second_pred8_; #if CONFIG_VP9_HIGHBITDEPTH } else { use_high_bit_depth_ = true; bit_depth_ =...
@@ -13,56 +13,74 @@ #include <limits.h> #include <stdio.h> -#include "./vpx_config.h" -#if CONFIG_VP8_ENCODER -#include "./vp8_rtcd.h" -#endif -#if CONFIG_VP9_ENCODER -#include "./vp9_rtcd.h" -#endif -#include "vpx_mem/vpx_mem.h" +#include "third_party/googletest/src/include/gtest/gtest.h" +#include "./vpx_confi...
CWE-119
null
if (bd_ == -1) { use_high_bit_depth_ = false; bit_depth_ = VPX_BITS_8; source_data_ = source_data8_; reference_data_ = reference_data8_; second_pred_ = second_pred8_; #if CONFIG_VP9_HIGHBITDEPTH } else { use_high_bit_depth_ = true; bit_depth_ = static_cast<vpx_bit_depth...
150,878
static void SetUpTestCase() { source_data_ = reinterpret_cast<uint8_t*>( vpx_memalign(kDataAlignment, kDataBlockSize)); reference_data_ = reinterpret_cast<uint8_t*>( vpx_memalign(kDataAlignment, kDataBufferSize)); }
DoS Exec Code Overflow Mem. Corr.
1
static void SetUpTestCase() { source_data8_ = reinterpret_cast<uint8_t*>( vpx_memalign(kDataAlignment, kDataBlockSize)); reference_data8_ = reinterpret_cast<uint8_t*>( vpx_memalign(kDataAlignment, kDataBufferSize)); second_pred8_ = reinterpret_cast<uint8_t*>( vpx_memalign(kDataA...
@@ -13,56 +13,74 @@ #include <limits.h> #include <stdio.h> -#include "./vpx_config.h" -#if CONFIG_VP8_ENCODER -#include "./vp8_rtcd.h" -#endif -#if CONFIG_VP9_ENCODER -#include "./vp9_rtcd.h" -#endif -#include "vpx_mem/vpx_mem.h" +#include "third_party/googletest/src/include/gtest/gtest.h" +#include "./vpx_confi...
CWE-119
source_data_ = reinterpret_cast<uint8_t*>( reference_data_ = reinterpret_cast<uint8_t*>(
source_data8_ = reinterpret_cast<uint8_t*>( reference_data8_ = reinterpret_cast<uint8_t*>( second_pred8_ = reinterpret_cast<uint8_t*>( vpx_memalign(kDataAlignment, 64*64)); source_data16_ = reinterpret_cast<uint16_t*>( vpx_memalign(kDataAlignment, kDataBlockSize*sizeof(uint16_t))); r...
150,879
virtual void SetUp() { svc_.encoding_mode = INTER_LAYER_PREDICTION_IP; svc_.log_level = SVC_LOG_DEBUG; svc_.log_print = 0; codec_iface_ = vpx_codec_vp9_cx(); const vpx_codec_err_t res = vpx_codec_enc_config_default(codec_iface_, &codec_enc_, 0); EXPECT_EQ(VPX_CODEC_OK, res); cod...
DoS Exec Code Overflow Mem. Corr.
1
virtual void SetUp() { svc_.log_level = SVC_LOG_DEBUG; svc_.log_print = 0; codec_iface_ = vpx_codec_vp9_cx(); const vpx_codec_err_t res = vpx_codec_enc_config_default(codec_iface_, &codec_enc_, 0); EXPECT_EQ(VPX_CODEC_OK, res); codec_enc_.g_w = kWidth; codec_enc_.g_h = kHeight; ...
@@ -13,6 +13,9 @@ #include "test/codec_factory.h" #include "test/decode_test_driver.h" #include "test/i420_video_source.h" + +#include "vp9/decoder/vp9_decoder.h" + #include "vpx/svc_context.h" #include "vpx/vp8cx.h" #include "vpx/vpx_encoder.h" @@ -21,6 +24,7 @@ using libvpx_test::CodecFactory; using libvp...
CWE-119
svc_.encoding_mode = INTER_LAYER_PREDICTION_IP; vpx_codec_dec_cfg_t dec_cfg = {0};
vpx_codec_dec_cfg_t dec_cfg = vpx_codec_dec_cfg_t(); tile_columns_ = 0; tile_rows_ = 0;
150,880
SvcTest() : codec_iface_(0), test_file_name_("hantro_collage_w352h288.yuv"), stats_file_name_("hantro_collage_w352h288.stat"), codec_initialized_(false), decoder_(0) { memset(&svc_, 0, sizeof(svc_)); memset(&codec_, 0, sizeof(codec_)); memset(&codec_enc_, 0, siz...
DoS Exec Code Overflow Mem. Corr.
1
SvcTest() : codec_iface_(0), test_file_name_("hantro_collage_w352h288.yuv"), codec_initialized_(false), decoder_(0) { memset(&svc_, 0, sizeof(svc_)); memset(&codec_, 0, sizeof(codec_)); memset(&codec_enc_, 0, sizeof(codec_enc_)); }
@@ -13,6 +13,9 @@ #include "test/codec_factory.h" #include "test/decode_test_driver.h" #include "test/i420_video_source.h" + +#include "vp9/decoder/vp9_decoder.h" + #include "vpx/svc_context.h" #include "vpx/vp8cx.h" #include "vpx/vpx_encoder.h" @@ -21,6 +24,7 @@ using libvpx_test::CodecFactory; using libvp...
CWE-119
stats_file_name_("hantro_collage_w352h288.stat"),
null
150,881
virtual void TearDown() { vpx_svc_release(&svc_); delete(decoder_); if (codec_initialized_) vpx_codec_destroy(&codec_); }
DoS Exec Code Overflow Mem. Corr.
1
virtual void TearDown() { ReleaseEncoder(); delete(decoder_); } void InitializeEncoder() { const vpx_codec_err_t res = vpx_svc_init(&svc_, &codec_, vpx_codec_vp9_cx(), &codec_enc_); EXPECT_EQ(VPX_CODEC_OK, res); vpx_codec_control(&codec_, VP8E_SET_CPUUSED, 4); // Make the test fast...
@@ -13,6 +13,9 @@ #include "test/codec_factory.h" #include "test/decode_test_driver.h" #include "test/i420_video_source.h" + +#include "vp9/decoder/vp9_decoder.h" + #include "vpx/svc_context.h" #include "vpx/vp8cx.h" #include "vpx/vpx_encoder.h" @@ -21,6 +24,7 @@ using libvpx_test::CodecFactory; using libvp...
CWE-119
vpx_svc_release(&svc_);
ReleaseEncoder(); } void InitializeEncoder() { const vpx_codec_err_t res = vpx_svc_init(&svc_, &codec_, vpx_codec_vp9_cx(), &codec_enc_); EXPECT_EQ(VPX_CODEC_OK, res); vpx_codec_control(&codec_, VP8E_SET_CPUUSED, 4); // Make the test faster vpx_codec_control(&codec_, VP9E_SET_TILE_COLU...
150,882
int main(int argc, char **argv) { ::testing::InitGoogleTest(&argc, argv); #if ARCH_X86 || ARCH_X86_64 const int simd_caps = x86_simd_caps(); if (!(simd_caps & HAS_MMX)) append_negative_gtest_filter(":MMX/*"); if (!(simd_caps & HAS_SSE)) append_negative_gtest_filter(":SSE/*"); if (!(simd_caps & H...
DoS Exec Code Overflow Mem. Corr.
1
int main(int argc, char **argv) { ::testing::InitGoogleTest(&argc, argv); #if ARCH_X86 || ARCH_X86_64 const int simd_caps = x86_simd_caps(); if (!(simd_caps & HAS_MMX)) append_negative_gtest_filter(":MMX.*:MMX/*"); if (!(simd_caps & HAS_SSE)) append_negative_gtest_filter(":SSE.*:SSE/*"); if (!(s...
@@ -8,6 +8,9 @@ * be found in the AUTHORS file in the root of the source tree. */ #include <string> + +#include "third_party/googletest/src/include/gtest/gtest.h" + #include "./vpx_config.h" #if ARCH_X86 || ARCH_X86_64 #include "vpx_ports/x86.h" @@ -15,12 +18,13 @@ extern "C" { #if CONFIG_VP8 extern void ...
CWE-119
append_negative_gtest_filter(":MMX/*"); append_negative_gtest_filter(":SSE/*"); append_negative_gtest_filter(":SSE2/*"); append_negative_gtest_filter(":SSE3/*"); append_negative_gtest_filter(":SSSE3/*"); append_negative_gtest_filter(":SSE4_1/*"); append_negative_gtest_filter(":AVX/*"); a...
append_negative_gtest_filter(":MMX.*:MMX/*"); append_negative_gtest_filter(":SSE.*:SSE/*"); append_negative_gtest_filter(":SSE2.*:SSE2/*"); append_negative_gtest_filter(":SSE3.*:SSE3/*"); append_negative_gtest_filter(":SSSE3.*:SSSE3/*"); append_negative_gtest_filter(":SSE4_1.*:SSE4_1/*"); ap...
150,883
TileIndependenceTest() : EncoderTest(GET_PARAM(0)), md5_fw_order_(), md5_inv_order_(), n_tiles_(GET_PARAM(1)) { init_flags_ = VPX_CODEC_USE_PSNR; vpx_codec_dec_cfg_t cfg; cfg.w = 704; cfg.h = 144; cfg.threads = 1; fw_dec_ = codec_->CreateDecoder(cfg, 0); inv_...
DoS Exec Code Overflow Mem. Corr.
1
TileIndependenceTest() : EncoderTest(GET_PARAM(0)), md5_fw_order_(), md5_inv_order_(), n_tiles_(GET_PARAM(1)) { init_flags_ = VPX_CODEC_USE_PSNR; vpx_codec_dec_cfg_t cfg = vpx_codec_dec_cfg_t(); cfg.w = 704; cfg.h = 144; cfg.threads = 1; fw_dec_ = codec_->CreateD...
@@ -29,7 +29,7 @@ md5_inv_order_(), n_tiles_(GET_PARAM(1)) { init_flags_ = VPX_CODEC_USE_PSNR; - vpx_codec_dec_cfg_t cfg; + vpx_codec_dec_cfg_t cfg = vpx_codec_dec_cfg_t(); cfg.w = 704; cfg.h = 144; cfg.threads = 1; @@ -104,4 +104,5 @@ VP9_INSTANTIATE_TEST_CASE(TileIndep...
CWE-119
vpx_codec_dec_cfg_t cfg;
vpx_codec_dec_cfg_t cfg = vpx_codec_dec_cfg_t();
150,884
void VarianceTest<VarianceFunctionType>::OneQuarterTest() { memset(src_, 255, block_size_); const int half = block_size_ / 2; memset(ref_, 255, half); memset(ref_ + half, 0, half); unsigned int sse; unsigned int var; REGISTER_STATE_CHECK(var = variance_(src_, width_, ref_, width_, &sse)); const uns...
DoS Exec Code Overflow Mem. Corr.
1
void VarianceTest<VarianceFunctionType>::OneQuarterTest() { const int half = block_size_ / 2; if (!use_high_bit_depth_) { memset(src_, 255, block_size_); memset(ref_, 255, half); memset(ref_ + half, 0, half); #if CONFIG_VP9_HIGHBITDEPTH } else { vpx_memset16(CONVERT_TO_SHORTPTR(src_), 255 << (bi...
@@ -7,111 +7,271 @@ * in the file PATENTS. All contributing project authors may * be found in the AUTHORS file in the root of the source tree. */ -#include <stdlib.h> + +#include <cstdlib> #include <new> #include "third_party/googletest/src/include/gtest/gtest.h" +#include "./vpx_config.h" +#include "./...
CWE-119
memset(src_, 255, block_size_); memset(ref_, 255, half); memset(ref_ + half, 0, half); REGISTER_STATE_CHECK(var = variance_(src_, width_, ref_, width_, &sse));
if (!use_high_bit_depth_) { memset(src_, 255, block_size_); memset(ref_, 255, half); memset(ref_ + half, 0, half); #if CONFIG_VP9_HIGHBITDEPTH } else { vpx_memset16(CONVERT_TO_SHORTPTR(src_), 255 << (bit_depth_ - 8), block_size_); vpx_memset16(CONVERT_TO_SHORTPTR(ref_), 255 << (...
150,885
void VarianceTest<VarianceFunctionType>::RefTest() { for (int i = 0; i < 10; ++i) { for (int j = 0; j < block_size_; j++) { src_[j] = rnd.Rand8(); ref_[j] = rnd.Rand8(); } unsigned int sse1, sse2; unsigned int var1; REGISTER_STATE_CHECK(var1 = variance_(src_, width_, ref_, width_...
DoS Exec Code Overflow Mem. Corr.
1
void VarianceTest<VarianceFunctionType>::RefTest() { for (int i = 0; i < 10; ++i) { for (int j = 0; j < block_size_; j++) { if (!use_high_bit_depth_) { src_[j] = rnd_.Rand8(); ref_[j] = rnd_.Rand8(); #if CONFIG_VP9_HIGHBITDEPTH } else { CONVERT_TO_SHORTPTR(src_)[j] = rnd_.Rand16() && ...
@@ -7,111 +7,271 @@ * in the file PATENTS. All contributing project authors may * be found in the AUTHORS file in the root of the source tree. */ -#include <stdlib.h> + +#include <cstdlib> #include <new> #include "third_party/googletest/src/include/gtest/gtest.h" +#include "./vpx_config.h" +#include "./...
CWE-119
src_[j] = rnd.Rand8(); ref_[j] = rnd.Rand8(); REGISTER_STATE_CHECK(var1 = variance_(src_, width_, ref_, width_, &sse1)); log2height_, &sse2);
if (!use_high_bit_depth_) { src_[j] = rnd_.Rand8(); ref_[j] = rnd_.Rand8(); #if CONFIG_VP9_HIGHBITDEPTH } else { CONVERT_TO_SHORTPTR(src_)[j] = rnd_.Rand16() && mask_; CONVERT_TO_SHORTPTR(ref_)[j] = rnd_.Rand16() && mask_; #endif // CONFIG_VP9_HIGHBITDEPTH } const int stride_coe...
150,886
void SubpelVarianceTest<SubpelVarianceFunctionType>::RefTest() { for (int x = 0; x < 16; ++x) { for (int y = 0; y < 16; ++y) { for (int j = 0; j < block_size_; j++) { src_[j] = rnd.Rand8(); } for (int j = 0; j < block_size_ + width_ + height_ + 1; j++) { ref_[j] = rnd.Rand8(); ...
DoS Exec Code Overflow Mem. Corr.
1
void SubpelVarianceTest<SubpelVarianceFunctionType>::RefTest() { for (int x = 0; x < 8; ++x) { for (int y = 0; y < 8; ++y) { if (!use_high_bit_depth_) { for (int j = 0; j < block_size_; j++) { src_[j] = rnd_.Rand8(); } for (int j = 0; j < block_size_ + width_ + height_ + 1...
@@ -7,111 +7,271 @@ * in the file PATENTS. All contributing project authors may * be found in the AUTHORS file in the root of the source tree. */ -#include <stdlib.h> + +#include <cstdlib> #include <new> #include "third_party/googletest/src/include/gtest/gtest.h" +#include "./vpx_config.h" +#include "./...
CWE-119
for (int x = 0; x < 16; ++x) { for (int y = 0; y < 16; ++y) { for (int j = 0; j < block_size_; j++) { src_[j] = rnd.Rand8(); } for (int j = 0; j < block_size_ + width_ + height_ + 1; j++) { ref_[j] = rnd.Rand8(); REGISTER_STATE_CHECK(var1 = subpel_variance_(ref_, width_ + 1...
for (int x = 0; x < 8; ++x) { for (int y = 0; y < 8; ++y) { if (!use_high_bit_depth_) { for (int j = 0; j < block_size_; j++) { src_[j] = rnd_.Rand8(); } for (int j = 0; j < block_size_ + width_ + height_ + 1; j++) { ref_[j] = rnd_.Rand8(); } #if CONFIG_VP...
150,887
void SubpelVarianceTest<vp9_subp_avg_variance_fn_t>::RefTest() { for (int x = 0; x < 16; ++x) { for (int y = 0; y < 16; ++y) { for (int j = 0; j < block_size_; j++) { src_[j] = rnd.Rand8(); sec_[j] = rnd.Rand8(); } for (int j = 0; j < block_size_ + width_ + height_ + 1; j++) { ...
DoS Exec Code Overflow Mem. Corr.
1
void SubpelVarianceTest<vp9_subp_avg_variance_fn_t>::RefTest() { void SubpelVarianceTest<SubpixAvgVarMxNFunc>::RefTest() { for (int x = 0; x < 8; ++x) { for (int y = 0; y < 8; ++y) { if (!use_high_bit_depth_) { for (int j = 0; j < block_size_; j++) { src_[j] = rnd_.Rand8(); sec_[...
@@ -7,111 +7,271 @@ * in the file PATENTS. All contributing project authors may * be found in the AUTHORS file in the root of the source tree. */ -#include <stdlib.h> + +#include <cstdlib> #include <new> #include "third_party/googletest/src/include/gtest/gtest.h" +#include "./vpx_config.h" +#include "./...
CWE-119
for (int x = 0; x < 16; ++x) { for (int y = 0; y < 16; ++y) { for (int j = 0; j < block_size_; j++) { src_[j] = rnd.Rand8(); sec_[j] = rnd.Rand8(); } for (int j = 0; j < block_size_ + width_ + height_ + 1; j++) { ref_[j] = rnd.Rand8(); REGISTER_STATE_CHECK(var1 = su...
void SubpelVarianceTest<SubpixAvgVarMxNFunc>::RefTest() { for (int x = 0; x < 8; ++x) { for (int y = 0; y < 8; ++y) { if (!use_high_bit_depth_) { for (int j = 0; j < block_size_; j++) { src_[j] = rnd_.Rand8(); sec_[j] = rnd_.Rand8(); } for (int j = 0; j < block_si...
150,888
virtual void SetUp() { const tuple<int, int, VarianceFunctionType>& params = this->GetParam(); log2width_ = get<0>(params); width_ = 1 << log2width_; log2height_ = get<1>(params); height_ = 1 << log2height_; variance_ = get<2>(params); rnd(ACMRandom::DeterministicSeed()); blo...
DoS Exec Code Overflow Mem. Corr.
1
virtual void SetUp() { const tuple<int, int, VarianceFunctionType, int>& params = this->GetParam(); log2width_ = get<0>(params); width_ = 1 << log2width_; log2height_ = get<1>(params); height_ = 1 << log2height_; variance_ = get<2>(params); if (get<3>(params)) { bit_depth_ = s...
@@ -7,111 +7,271 @@ * in the file PATENTS. All contributing project authors may * be found in the AUTHORS file in the root of the source tree. */ -#include <stdlib.h> + +#include <cstdlib> #include <new> #include "third_party/googletest/src/include/gtest/gtest.h" +#include "./vpx_config.h" +#include "./...
CWE-119
const tuple<int, int, VarianceFunctionType>& params = this->GetParam(); rnd(ACMRandom::DeterministicSeed()); src_ = new uint8_t[block_size_]; ref_ = new uint8_t[block_size_];
const tuple<int, int, VarianceFunctionType, int>& params = this->GetParam(); if (get<3>(params)) { bit_depth_ = static_cast<vpx_bit_depth_t>(get<3>(params)); use_high_bit_depth_ = true; } else { bit_depth_ = VPX_BITS_8; use_high_bit_depth_ = false; } mask_ = (1 << bit_depth_)...
150,889
virtual void SetUp() { const tuple<int, int, SubpelVarianceFunctionType>& params = this->GetParam(); log2width_ = get<0>(params); width_ = 1 << log2width_; log2height_ = get<1>(params); height_ = 1 << log2height_; subpel_variance_ = get<2>(params); rnd(ACMRandom::Determini...
DoS Exec Code Overflow Mem. Corr.
1
virtual void SetUp() { const tuple<int, int, MseFunctionType>& params = this->GetParam(); log2width_ = get<0>(params); width_ = 1 << log2width_; log2height_ = get<1>(params); height_ = 1 << log2height_; mse_ = get<2>(params); rnd(ACMRandom::DeterministicSeed()); block_size_ =...
@@ -7,111 +7,271 @@ * in the file PATENTS. All contributing project authors may * be found in the AUTHORS file in the root of the source tree. */ -#include <stdlib.h> + +#include <cstdlib> #include <new> #include "third_party/googletest/src/include/gtest/gtest.h" +#include "./vpx_config.h" +#include "./...
CWE-119
const tuple<int, int, SubpelVarianceFunctionType>& params = this->GetParam(); subpel_variance_ = get<2>(params); sec_ = reinterpret_cast<uint8_t *>(vpx_memalign(16, block_size_)); ref_ = new uint8_t[block_size_ + width_ + height_ + 1]; ASSERT_TRUE(sec_ != NULL);
const tuple<int, int, MseFunctionType>& params = this->GetParam(); mse_ = get<2>(params); ref_ = new uint8_t[block_size_];
150,890
void VarianceTest<VarianceFunctionType>::ZeroTest() { for (int i = 0; i <= 255; ++i) { memset(src_, i, block_size_); for (int j = 0; j <= 255; ++j) { memset(ref_, j, block_size_); unsigned int sse; unsigned int var; REGISTER_STATE_CHECK(var = variance_(src_, width_, ref_, width_, ...
DoS Exec Code Overflow Mem. Corr.
1
void VarianceTest<VarianceFunctionType>::ZeroTest() { for (int i = 0; i <= 255; ++i) { if (!use_high_bit_depth_) { memset(src_, i, block_size_); #if CONFIG_VP9_HIGHBITDEPTH } else { vpx_memset16(CONVERT_TO_SHORTPTR(src_), i << (bit_depth_ - 8), block_size_); #endif // CONFIG_...
@@ -7,111 +7,271 @@ * in the file PATENTS. All contributing project authors may * be found in the AUTHORS file in the root of the source tree. */ -#include <stdlib.h> + +#include <cstdlib> #include <new> #include "third_party/googletest/src/include/gtest/gtest.h" +#include "./vpx_config.h" +#include "./...
CWE-119
memset(src_, i, block_size_); memset(ref_, j, block_size_); REGISTER_STATE_CHECK(var = variance_(src_, width_, ref_, width_, &sse)); EXPECT_EQ(0u, var) << "src values: " << i << "ref values: " << j;
if (!use_high_bit_depth_) { memset(src_, i, block_size_); #if CONFIG_VP9_HIGHBITDEPTH } else { vpx_memset16(CONVERT_TO_SHORTPTR(src_), i << (bit_depth_ - 8), block_size_); #endif // CONFIG_VP9_HIGHBITDEPTH } if (!use_high_bit_depth_) { memset(ref_, j, block_size...
150,891
unsigned int subpel_avg_variance_ref(const uint8_t *ref, const uint8_t *src, const uint8_t *second_pred, int l2w, int l2h, int xoff, int yoff, ...
DoS Exec Code Overflow Mem. Corr.
1
unsigned int subpel_avg_variance_ref(const uint8_t *ref,
@@ -7,111 +7,271 @@ * in the file PATENTS. All contributing project authors may * be found in the AUTHORS file in the root of the source tree. */ -#include <stdlib.h> + +#include <cstdlib> #include <new> #include "third_party/googletest/src/include/gtest/gtest.h" +#include "./vpx_config.h" +#include "./...
CWE-119
const uint8_t *src, const uint8_t *second_pred, int l2w, int l2h, int xoff, int yoff, unsigned int *sse_ptr) { int se = 0; unsigned...
null
150,892
static unsigned int subpel_variance_ref(const uint8_t *ref, const uint8_t *src, int l2w, int l2h, int xoff, int yoff, unsigned int *sse_ptr) { int se = 0; unsigned int sse = 0; const int w = 1 << l2w, h = 1 << l2h; for (int y = 0; ...
DoS Exec Code Overflow Mem. Corr.
1
static unsigned int subpel_variance_ref(const uint8_t *ref, const uint8_t *src, static unsigned int mb_ss_ref(const int16_t *src) { unsigned int res = 0; for (int i = 0; i < 256; ++i) { res += src[i] * src[i]; } return res; } static uint32_t variance_ref(const uint8_t *src, const uint8_t *ref, ...
@@ -7,111 +7,271 @@ * in the file PATENTS. All contributing project authors may * be found in the AUTHORS file in the root of the source tree. */ -#include <stdlib.h> + +#include <cstdlib> #include <new> #include "third_party/googletest/src/include/gtest/gtest.h" +#include "./vpx_config.h" +#include "./...
CWE-119
int l2w, int l2h, int xoff, int yoff, unsigned int *sse_ptr) { int se = 0; unsigned int sse = 0; const int w = 1 << l2w, h = 1 << l2h; const int a1 = ref[(w + 1) * (y + 0) + x + 0]; const int a2 = ref[(w + 1) * (y + 0) + x...
static unsigned int mb_ss_ref(const int16_t *src) { unsigned int res = 0; for (int i = 0; i < 256; ++i) { res += src[i] * src[i]; } return res; } static uint32_t variance_ref(const uint8_t *src, const uint8_t *ref, int l2w, int l2h, int src_stride_coeff, ...
150,893
static unsigned int variance_ref(const uint8_t *ref, const uint8_t *src, int l2w, int l2h, unsigned int *sse_ptr) { int se = 0; unsigned int sse = 0; const int w = 1 << l2w, h = 1 << l2h; for (int y = 0; y < h; y++) { for (int x = 0; x < w; x++) { int diff = ref[w * y ...
DoS Exec Code Overflow Mem. Corr.
1
static unsigned int variance_ref(const uint8_t *ref, const uint8_t *src, //// Truncate high bit depth results by downshifting (with rounding) by: //// 2 * (bit_depth - 8) for sse //// (bit_depth - 8) for se static void RoundHighBitDepth(int bit_depth, int64_t *se, uint64_t *sse) { switch (bit_depth) { case VPX_BI...
@@ -7,111 +7,271 @@ * in the file PATENTS. All contributing project authors may * be found in the AUTHORS file in the root of the source tree. */ -#include <stdlib.h> + +#include <cstdlib> #include <new> #include "third_party/googletest/src/include/gtest/gtest.h" +#include "./vpx_config.h" +#include "./...
CWE-119
int l2w, int l2h, unsigned int *sse_ptr) { int se = 0; unsigned int sse = 0; const int w = 1 << l2w, h = 1 << l2h; for (int y = 0; y < h; y++) { for (int x = 0; x < w; x++) { int diff = ref[w * y + x] - src[w * y + x]; se += diff; sse += diff * diff; } ...
static void RoundHighBitDepth(int bit_depth, int64_t *se, uint64_t *sse) { switch (bit_depth) { case VPX_BITS_12: *sse = (*sse + 128) >> 8; *se = (*se + 8) >> 4; break; case VPX_BITS_10: *sse = (*sse + 8) >> 4; *se = (*se + 2) >> 2; break; case VPX_BITS_8: default: ...
150,894
LosslessTestLarge() : EncoderTest(GET_PARAM(0)), psnr_(kMaxPsnr), nframes_(0), encoding_mode_(GET_PARAM(1)) { }
DoS Exec Code Overflow Mem. Corr.
1
LosslessTestLarge() LosslessTest() : EncoderTest(GET_PARAM(0)), psnr_(kMaxPsnr), nframes_(0), encoding_mode_(GET_PARAM(1)) { }
@@ -7,8 +7,10 @@ * in the file PATENTS. All contributing project authors may * be found in the AUTHORS file in the root of the source tree. */ -#include "./vpx_config.h" + #include "third_party/googletest/src/include/gtest/gtest.h" + +#include "./vpx_config.h" #include "test/codec_factory.h" #include "test...
CWE-119
null
LosslessTest()
150,895
string DecodeFile(const string& filename, int num_threads) { libvpx_test::WebMVideoSource video(filename); video.Init(); vpx_codec_dec_cfg_t cfg = {0}; cfg.threads = num_threads; libvpx_test::VP9Decoder decoder(cfg, 0); libvpx_test::MD5 md5; for (video.Begin(); video.cxdata(); video.Next()) { con...
DoS Exec Code Overflow Mem. Corr.
1
string DecodeFile(const string& filename, int num_threads) { libvpx_test::WebMVideoSource video(filename); video.Init(); vpx_codec_dec_cfg_t cfg = vpx_codec_dec_cfg_t(); cfg.threads = num_threads; libvpx_test::VP9Decoder decoder(cfg, 0); libvpx_test::MD5 md5; for (video.Begin(); video.cxdata(); vi...
@@ -11,28 +11,40 @@ #include <string> #include "third_party/googletest/src/include/gtest/gtest.h" +#include "./vpx_config.h" #include "test/codec_factory.h" #include "test/decode_test_driver.h" #include "test/md5_helper.h" +#if CONFIG_WEBM_IO #include "test/webm_video_source.h" -#include "vp9/decoder/vp9_threa...
CWE-119
vpx_codec_dec_cfg_t cfg = {0};
vpx_codec_dec_cfg_t cfg = vpx_codec_dec_cfg_t();
150,896
virtual void TearDown() { vp9_worker_end(&worker_); }
DoS Exec Code Overflow Mem. Corr.
1
virtual void TearDown() { vpx_get_worker_interface()->end(&worker_); }
@@ -11,28 +11,40 @@ #include <string> #include "third_party/googletest/src/include/gtest/gtest.h" +#include "./vpx_config.h" #include "test/codec_factory.h" #include "test/decode_test_driver.h" #include "test/md5_helper.h" +#if CONFIG_WEBM_IO #include "test/webm_video_source.h" -#include "vp9/decoder/vp9_threa...
CWE-119
vp9_worker_end(&worker_);
vpx_get_worker_interface()->end(&worker_);
150,897
void WT_Interpolate (S_WT_VOICE *pWTVoice, S_WT_INT_FRAME *pWTIntFrame) { EAS_PCM *pOutputBuffer; EAS_I32 phaseInc; EAS_I32 phaseFrac; EAS_I32 acc0; const EAS_SAMPLE *pSamples; const EAS_SAMPLE *loopEnd; EAS_I32 samp1; EAS_I32 samp2; EAS_I32 numSamples; /* initialize some local variables...
DoS Exec Code Overflow Mem. Corr.
1
void WT_Interpolate (S_WT_VOICE *pWTVoice, S_WT_INT_FRAME *pWTIntFrame) { EAS_PCM *pOutputBuffer; EAS_I32 phaseInc; EAS_I32 phaseFrac; EAS_I32 acc0; const EAS_SAMPLE *pSamples; const EAS_SAMPLE *loopEnd; EAS_I32 samp1; EAS_I32 samp2; EAS_I32 numSamples; /* initialize some local variables...
@@ -33,6 +33,7 @@ *------------------------------------ */ #include "log/log.h" +#include <cutils/log.h> #include "eas_types.h" #include "eas_math.h" @@ -92,6 +93,7 @@ numSamples = pWTIntFrame->numSamples; if (numSamples <= 0) { ALOGE("b/26366256"); + android_errorWriteLog(0x534e4554...
CWE-119
null
android_errorWriteLog(0x534e4554, "26366256");
150,898
void WT_InterpolateMono (S_WT_VOICE *pWTVoice, S_WT_INT_FRAME *pWTIntFrame) { EAS_I32 *pMixBuffer; const EAS_I8 *pLoopEnd; const EAS_I8 *pCurrentPhaseInt; EAS_I32 numSamples; EAS_I32 gain; EAS_I32 gainIncrement; EAS_I32 currentPhaseFrac; EAS_I32 phaseInc; EAS_I32 tmp0; EAS_I32 tmp1; ...
DoS Exec Code Overflow Mem. Corr.
1
void WT_InterpolateMono (S_WT_VOICE *pWTVoice, S_WT_INT_FRAME *pWTIntFrame) { EAS_I32 *pMixBuffer; const EAS_I8 *pLoopEnd; const EAS_I8 *pCurrentPhaseInt; EAS_I32 numSamples; EAS_I32 gain; EAS_I32 gainIncrement; EAS_I32 currentPhaseFrac; EAS_I32 phaseInc; EAS_I32 tmp0; EAS_I32 tmp1; ...
@@ -33,6 +33,7 @@ *------------------------------------ */ #include "log/log.h" +#include <cutils/log.h> #include "eas_types.h" #include "eas_math.h" @@ -92,6 +93,7 @@ numSamples = pWTIntFrame->numSamples; if (numSamples <= 0) { ALOGE("b/26366256"); + android_errorWriteLog(0x534e4554...
CWE-119
null
android_errorWriteLog(0x534e4554, "26366256");
150,899
void WT_InterpolateNoLoop (S_WT_VOICE *pWTVoice, S_WT_INT_FRAME *pWTIntFrame) { EAS_PCM *pOutputBuffer; EAS_I32 phaseInc; EAS_I32 phaseFrac; EAS_I32 acc0; const EAS_SAMPLE *pSamples; EAS_I32 samp1; EAS_I32 samp2; EAS_I32 numSamples; /* initialize some local variables */ numSamples =...
DoS Exec Code Overflow Mem. Corr.
1
void WT_InterpolateNoLoop (S_WT_VOICE *pWTVoice, S_WT_INT_FRAME *pWTIntFrame) { EAS_PCM *pOutputBuffer; EAS_I32 phaseInc; EAS_I32 phaseFrac; EAS_I32 acc0; const EAS_SAMPLE *pSamples; EAS_I32 samp1; EAS_I32 samp2; EAS_I32 numSamples; /* initialize some local variables */ numSamples =...
@@ -33,6 +33,7 @@ *------------------------------------ */ #include "log/log.h" +#include <cutils/log.h> #include "eas_types.h" #include "eas_math.h" @@ -92,6 +93,7 @@ numSamples = pWTIntFrame->numSamples; if (numSamples <= 0) { ALOGE("b/26366256"); + android_errorWriteLog(0x534e4554...
CWE-119
null
android_errorWriteLog(0x534e4554, "26366256");