cve_id stringlengths 13 16 | repo stringclasses 12
values | repo_url stringclasses 10
values | file_path stringlengths 7 62 | function_name stringlengths 4 52 | pa stringlengths 50 341k | pb stringlengths 33 341k | px stringlengths 50 338k | py stringlengths 33 338k | pa_sliced stringlengths 31 44.3k | pb_sliced stringlengths 31 44.6k | px_sliced stringlengths 51 45.8k | py_sliced stringlengths 33 46.9k | patch_sliced stringlengths 0 46.8k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
CVE-2012-2784 | FFmpeg | https://github.com/FFmpeg/FFmpeg | libavcodec/cavsdec.c | decode_seq_header | static int decode_seq_header(AVSContext *h) {
MpegEncContext *s = &h->s;
int frame_rate_code;
h->profile = get_bits(&s->gb,8);
h->level = get_bits(&s->gb,8);
skip_bits1(&s->gb);
s->width = get_bits(&s->gb,14);
s->height = get_bits(&s->gb,14);
skip_bits(&s->gb,2);
skip_bits(&s->gb,3);... | static int decode_seq_header(AVSContext *h) {
MpegEncContext *s = &h->s;
int frame_rate_code;
int width, height;
h->profile = get_bits(&s->gb,8);
h->level = get_bits(&s->gb,8);
skip_bits1(&s->gb);
width = get_bits(&s->gb,14);
height = get_bits(&s->gb,14);
if ((s->width || s->height) ... | static int decode_seq_header(AVSContext *h) {
MpegEncContext *s = &h->s;
int frame_rate_code;
h->profile = get_bits(&s->gb,8);
h->level = get_bits(&s->gb,8);
skip_bits1(&s->gb);
s->width = get_bits(&s->gb,14);
s->height = get_bits(&s->gb,14);
skip_bits(&s->gb,2);
skip_bits(&s->gb,3);... | static int decode_seq_header(AVSContext *h) {
MpegEncContext *s = &h->s;
int frame_rate_code;
int width, height;
h->profile = get_bits(&s->gb,8);
h->level = get_bits(&s->gb,8);
skip_bits1(&s->gb);
width = get_bits(&s->gb, 14);
height = get_bits(&s->gb, 14);
if ((s->width || s->height... | static int decode_seq_header(AVSContext *h) {
MpegEncContext *s = &h->s;
int frame_rate_code;
h->profile = get_bits(&s->gb,8);
skip_bits1(&s->gb);
s->width = get_bits(&s->gb,14);
s->height = get_bits(&s->gb,14);
skip_bits(&s->gb,2);
h->mb_width = (s->width + 15) >> 4;
h->mb_height = ... | static int decode_seq_header(AVSContext *h) {
MpegEncContext *s = &h->s;
int frame_rate_code;
int width, height;
h->profile = get_bits(&s->gb,8);
skip_bits1(&s->gb);
width = get_bits(&s->gb,14);
height = get_bits(&s->gb,14);
if ((s->width || s->height) && (s->width != width || s->height ... | static int decode_seq_header(AVSContext *h) {
MpegEncContext *s = &h->s;
int frame_rate_code;
h->profile = get_bits(&s->gb,8);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
skip_bits1(&s->gb);
s->width = get_bits(&s->gb,14);
s->height = get_bits(&s->gb,14);
skip_bits(&s->gb,2);
/* PL... | static int decode_seq_header(AVSContext *h) {
MpegEncContext *s = &h->s;
int frame_rate_code;
int width, height;
h->profile = get_bits(&s->gb,8);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
skip_bits1(&s->gb);
width = get_bits(&s->gb, 14);
height = get_bits(&s->gb, 14);
if ((s->wid... | static int decode_seq_header(AVSContext *h) {
MpegEncContext *s = &h->s;
int frame_rate_code;
+ int width, height;
h->profile = get_bits(&s->gb,8);
skip_bits1(&s->gb);
- s->width = get_bits(&s->gb,14);
- s->height = get_bits(&s->gb,14);
+ width = get_bits(&s->gb,14);
+ height = get_b... |
CVE-2012-2789 | FFmpeg | https://github.com/FFmpeg/FFmpeg | libavcodec/wmaprodec.c | decode_subframe | static int decode_subframe(WMAProDecodeCtx *s) {
int offset = s->samples_per_frame;
int subframe_len = s->samples_per_frame;
int i;
int total_samples = s->samples_per_frame * s->num_channels;
int transmit_coeffs = 0;
int cur_subwoofer_cutoff;
s->subframe_offset = get_bits_count(&s->gb);
... | static int decode_subframe(WMAProDecodeCtx *s) {
int offset = s->samples_per_frame;
int subframe_len = s->samples_per_frame;
int i;
int total_samples = s->samples_per_frame * s->num_channels;
int transmit_coeffs = 0;
int cur_subwoofer_cutoff;
s->subframe_offset = get_bits_count(&s->gb);
... | static int decode_subframe(WMAProDecodeCtx *s) {
int offset = s->samples_per_frame;
int subframe_len = s->samples_per_frame;
int i;
int total_samples = s->samples_per_frame * s->num_channels;
int transmit_coeffs = 0;
int cur_subwoofer_cutoff;
s->subframe_offset = get_bits_count(&s->gb);
... | static int decode_subframe(WMAProDecodeCtx *s) {
int offset = s->samples_per_frame;
int subframe_len = s->samples_per_frame;
int i;
int total_samples = s->samples_per_frame * s->num_channels;
int transmit_coeffs = 0;
int cur_subwoofer_cutoff;
s->subframe_offset = get_bits_count(&s->gb);
... | static int decode_subframe(WMAProDecodeCtx *s) {
int offset = s->samples_per_frame;
int subframe_len = s->samples_per_frame;
int total_samples = s->samples_per_frame * s->num_channels;
for (i = 0; i < s->num_channels; i++) {
if (offset > s->channel[i].decoded_samples) {
offset = s->c... | static int decode_subframe(WMAProDecodeCtx *s) {
int offset = s->samples_per_frame;
int subframe_len = s->samples_per_frame;
int total_samples = s->samples_per_frame * s->num_channels;
for (i = 0; i < s->num_channels; i++) {
if (offset > s->channel[i].decoded_samples) {
offset = s->c... | static int decode_subframe(WMAProDecodeCtx *s) {
int offset = s->samples_per_frame;
int subframe_len = s->samples_per_frame;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
int total_samples = s->samples_per_frame * s->num_channels;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
for (i = 0; i < s->... | static int decode_subframe(WMAProDecodeCtx *s) {
int offset = s->samples_per_frame;
int subframe_len = s->samples_per_frame;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
int total_samples = s->samples_per_frame * s->num_channels;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
for (i = 0; i < s->... | static int decode_subframe(WMAProDecodeCtx *s) {
int offset = s->samples_per_frame;
int subframe_len = s->samples_per_frame;
int total_samples = s->samples_per_frame * s->num_channels;
for (i = 0; i < s->num_channels; i++) {
if (offset > s->channel[i].decoded_samples) {
offset... |
CVE-2012-2793 | FFmpeg | https://github.com/FFmpeg/FFmpeg | libavcodec/lagarith.c | lag_decode_zero_run_line | static int lag_decode_zero_run_line(LagarithContext *l, uint8_t *dst, const uint8_t *src, const uint8_t *src_end, int width, int esc_count) {
int i = 0;
int count;
uint8_t zero_run = 0;
const uint8_t *src_start = src;
uint8_t mask1 = -(esc_count < 2);
uint8_t mask2 = -(esc_count < 3);
uint8_... | static int lag_decode_zero_run_line(LagarithContext *l, uint8_t *dst, const uint8_t *src, const uint8_t *src_end, int width, int esc_count) {
int i = 0;
int count;
uint8_t zero_run = 0;
const uint8_t *src_start = src;
uint8_t mask1 = -(esc_count < 2);
uint8_t mask2 = -(esc_count < 3);
uint8_... | static int lag_decode_zero_run_line(LagarithContext *l, uint8_t *dst, const uint8_t *src, int width, int esc_count) {
int i = 0;
int count;
uint8_t zero_run = 0;
const uint8_t *start = src;
uint8_t mask1 = -(esc_count < 2);
uint8_t mask2 = -(esc_count < 3);
uint8_t *end = dst + (width - 2);
... | static int lag_decode_zero_run_line(LagarithContext *l, uint8_t *dst, const uint8_t *src, int width, int esc_count) {
int i = 0;
int count;
uint8_t zero_run = 0;
const uint8_t *start = src;
uint8_t mask1 = -(esc_count < 2);
uint8_t mask2 = -(esc_count < 3);
uint8_t *end = dst + (width - 2);
... | static int lag_decode_zero_run_line(LagarithContext *l, uint8_t *dst, const uint8_t *src, const uint8_t *src_end, int width, int esc_count) {
int i = 0;
uint8_t *end = dst + (width - 2);
output_zeros:
if (l->zeros_rem) {
count = FFM(l->zeros_rem, width - i);
memset(dst, 0, count);
l-... | static int lag_decode_zero_run_line(LagarithContext *l, uint8_t *dst, const uint8_t *src, const uint8_t *src_end, int width, int esc_count) {
int i = 0;
uint8_t *end = dst + (width - 2);
output_zeros:
if (l->zeros_rem) {
count = FFM(l->zeros_rem, width - i);
if(end - dst < count) {
... | static int lag_decode_zero_run_line(LagarithContext *l, uint8_t *dst, const uint8_t *src, int width, int esc_count) {
int i = 0;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
uint8_t *end = dst + (width - 2);
output_zeros:
if (l->zeros_rem) {
count = FFM(l->zeros_rem, width - i);
memset(... | static int lag_decode_zero_run_line(LagarithContext *l, uint8_t *dst, const uint8_t *src, int width, int esc_count) {
int i = 0;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
uint8_t *end = dst + (width - 2);
output_zeros:
if (l->zeros_rem) {
count = FFM(l->zeros_rem, width - i);
if (end... | static int lag_decode_zero_run_line(LagarithContext *l, uint8_t *dst, const uint8_t *src, const uint8_t *src_end, int width, int esc_count) {
int i = 0;
uint8_t *end = dst + (width - 2);
output_zeros:
if (l->zeros_rem) {
count = FFM(l->zeros_rem, width - i);
+ if(end - dst < count) {
+ ... |
CVE-2012-2794 | FFmpeg | https://github.com/FFmpeg/FFmpeg | libavcodec/indeo5.c | decode_mb_info | static int decode_mb_info(IVI5DecContext *ctx, IVIBandDesc *band, IVITile *tile, AVCodecContext *avctx) {
int x, y, mv_x, mv_y, mv_delta, offs, mb_offset, mv_scale, blks_per_mb, s;
IVIMbInfo *mb, *ref_mb;
int row_offset = band->mb_size * band->pitch;
mb = tile->mbs;
ref_mb = tile->ref_mbs;
offs ... | static int decode_mb_info(IVI5DecContext *ctx, IVIBandDesc *band, IVITile *tile, AVCodecContext *avctx) {
int x, y, mv_x, mv_y, mv_delta, offs, mb_offset, mv_scale, blks_per_mb, s;
IVIMbInfo *mb, *ref_mb;
int row_offset = band->mb_size * band->pitch;
mb = tile->mbs;
ref_mb = tile->ref_mbs;
offs ... | static int decode_mb_info(IVI5DecContext *ctx, IVIBandDesc *band, IVITile *tile, AVCodecContext *avctx) {
int x, y, mv_x, mv_y, mv_delta, offs, mb_offset, mv_scale, blks_per_mb;
IVIMbInfo *mb, *ref_mb;
int row_offset = band->mb_size * band->pitch;
mb = tile->mbs;
ref_mb = tile->ref_mbs;
offs = t... | static int decode_mb_info(IVI5DecContext *ctx, IVIBandDesc *band, IVITile *tile, AVCodecContext *avctx) {
int x, y, mv_x, mv_y, mv_delta, offs, mb_offset, mv_scale, blks_per_mb;
IVIMbInfo *mb, *ref_mb;
int row_offset = band->mb_size * band->pitch;
mb = tile->mbs;
ref_mb = tile->ref_mbs;
offs = t... | static int decode_mb_info(IVI5DecContext *ctx, IVIBandDesc *band, IVITile *tile, AVCodecContext *avctx) {
int row_offset = band->mb_size * band->pitch;
if (!ref_mb && ((band->qdelta_present && band->inherit_qdelta) || band->inherit_mv)) {
return AVERROR_VALIDDATA;
}
mv_scale = (ctx->planes[0].ba... | static int decode_mb_info(IVI5DecContext *ctx, IVIBandDesc *band, IVITile *tile, AVCodecContext *avctx) {
int row_offset = band->mb_size * band->pitch;
if (!ref_mb && ((band->qdelta_present && band->inherit_qdelta) || band->inherit_mv)) {
return AVERROR_VALIDDATA;
}
if( tile->num_MBs != IVI_MBs_... | static int decode_mb_info(IVI5DecContext *ctx, IVIBandDesc *band, IVITile *tile, AVCodecContext *avctx) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
int row_offset = band->mb_size * band->pitch;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (!ref_mb && ((band->qdelta_present && band->inherit_qdelt... | static int decode_mb_info(IVI5DecContext *ctx, IVIBandDesc *band, IVITile *tile, AVCodecContext *avctx) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
int row_offset = band->mb_size * band->pitch;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (!ref_mb && ((band->qdelta_present && band->inherit_qdelt... | static int decode_mb_info(IVI5DecContext *ctx, IVIBandDesc *band, IVITile *tile, AVCodecContext *avctx) {
int row_offset = band->mb_size * band->pitch;
if (!ref_mb && ((band->qdelta_present && band->inherit_qdelta) || band->inherit_mv)) {
+ return AVERROR_VALIDDATA;
+ }
+ if( tile->num_MBs != IV... |
CVE-2012-2795 | FFmpeg | https://github.com/FFmpeg/FFmpeg | libavcodec/wmalosslessdec.c | decode_ac_filter | static void decode_ac_filter(WmallDecodeCtx *s) {
int i;
s->acfilter_order = get_bits(&s->gb, 4) + 1;
s->acfilter_scaling = get_bits(&s->gb, 4);
for (i = 0; i < s->acfilter_order; i++)
s->acfilter_coeffs[i] = get_bits(&s->gb, s->acfilter_scaling) + 1;
} | static void decode_ac_filter(WmallDecodeCtx *s) {
int i;
s->acfilter_order = get_bits(&s->gb, 4) + 1;
s->acfilter_scaling = get_bits(&s->gb, 4);
for (i = 0; i < s->acfilter_order; i++)
s->acfilter_coeffs[i] = (s->acfilter_scaling ? get_bits(&s->gb, s->acfilter_scaling) : 0) + 1;
} | static void decode_ac_filter(WmallDecodeCtx *s) {
int i;
s->acfilter_order = get_bits(&s->gb, 4) + 1;
s->acfilter_scaling = get_bits(&s->gb, 4);
for (i = 0; i < s->acfilter_order; i++)
s->acfilter_coeffs[i] = get_bits(&s->gb, s->acfilter_scaling) + 1;
} | static void decode_ac_filter(WmallDecodeCtx *s) {
int i;
s->acfilter_order = get_bits(&s->gb, 4) + 1;
s->acfilter_scaling = get_bits(&s->gb, 4);
for (i = 0; i < s->acfilter_order; i++)
s->acfilter_coeffs[i] = (s->acfilter_scaling ? get_bits(&s->gb, s->acfilter_scaling) : 0) + 1;
} | static void decode_ac_filter(WmallDecodeCtx *s) {
int i;
s->acfilter_order = get_bits(&s->gb, 4) + 1;
s->acfilter_scaling = get_bits(&s->gb, 4);
for (i = 0; i < s->acfilter_order; i++)
s->acfilter_coeffs[i] = get_bits(&s->gb, s->acfilter_scaling) + 1;
}
| static void decode_ac_filter(WmallDecodeCtx *s) {
int i;
s->acfilter_order = get_bits(&s->gb, 4) + 1;
s->acfilter_scaling = get_bits(&s->gb, 4);
for (i = 0; i < s->acfilter_order; i++)
s->acfilter_coeffs[i] = (s->acfilter_scaling ? get_bits(&s->gb, s->acfilter_scaling) : 0) + 1;
}
| static void decode_ac_filter(WmallDecodeCtx *s) {
int i;
s->acfilter_order = get_bits(&s->gb, 4) + 1;
s->acfilter_scaling = get_bits(&s->gb, 4);
for (i = 0; i < s->acfilter_order; i++)
s->acfilter_coeffs[i] = get_bits(&s->gb, s->acfilter_scaling) + 1;
}
| static void decode_ac_filter(WmallDecodeCtx *s) {
int i;
s->acfilter_order = get_bits(&s->gb, 4) + 1;
s->acfilter_scaling = get_bits(&s->gb, 4);
for (i = 0; i < s->acfilter_order; i++)
s->acfilter_coeffs[i] = (s->acfilter_scaling ? get_bits(&s->gb, s->acfilter_scaling) : 0) + 1;
} | static void decode_ac_filter(WmallDecodeCtx *s) {
int i;
s->acfilter_order = get_bits(&s->gb, 4) + 1;
s->acfilter_scaling = get_bits(&s->gb, 4);
for (i = 0; i < s->acfilter_order; i++)
- s->acfilter_coeffs[i] = get_bits(&s->gb, s->acfilter_scaling) + 1;
+ s->acfilter_coeffs[i] = (s->a... |
CVE-2012-2796 | FFmpeg | https://github.com/FFmpeg/FFmpeg | libavcodec/vc1dec.c | vc1_decode_frame | static int vc1_decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt) {
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size, n_slices = 0, i;
VC1Context *v = avctx->priv_data;
MpegEncContext *s = &v->s;
AVFrame *pict = data;
uint8_t *buf2 = NULL;
const uint... | static int vc1_decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt) {
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size, n_slices = 0, i;
VC1Context *v = avctx->priv_data;
MpegEncContext *s = &v->s;
AVFrame *pict = data;
uint8_t *buf2 = NULL;
const uint... | static int vc1_decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt) {
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size, n_slices = 0, i;
VC1Context *v = avctx->priv_data;
MpegEncContext *s = &v->s;
AVFrame *pict = data;
uint8_t *buf2 = NULL;
const uint... | static int vc1_decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt) {
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size, n_slices = 0, i;
VC1Context *v = avctx->priv_data;
MpegEncContext *s = &v->s;
AVFrame *pict = data;
uint8_t *buf2 = NULL;
const uint... | static int vc1_decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt) {
int buf_size = avpkt->size, n_slices = 0, i;
VC1Context *v = avctx->priv_data;
MpegEncContext *s = &v->s;
if (avctx->codec_id == CODEC_ID_VC1 || avctx->codec_id == CODEC_ID_VC1IMAGE) {
if (IS_MARKER... | static int vc1_decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt) {
int buf_size = avpkt->size, n_slices = 0, i;
VC1Context *v = avctx->priv_data;
MpegEncContext *s = &v->s;
if (avctx->codec_id == CODEC_ID_VC1 || avctx->codec_id == CODEC_ID_VC1IMAGE) {
if (IS_MARKER... | static int vc1_decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
int buf_size = avpkt->size, n_slices = 0, i;
VC1Context *v = avctx->priv_data;
MpegEncContext *s = &v->s;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
... | static int vc1_decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
int buf_size = avpkt->size, n_slices = 0, i;
VC1Context *v = avctx->priv_data;
MpegEncContext *s = &v->s;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
... | static int vc1_decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt) {
int buf_size = avpkt->size, n_slices = 0, i;
VC1Context *v = avctx->priv_data;
MpegEncContext *s = &v->s;
if (avctx->codec_id == CODEC_ID_VC1 || avctx->codec_id == CODEC_ID_VC1IMAGE) {
if (IS_... |
CVE-2012-2799 | FFmpeg | https://github.com/FFmpeg/FFmpeg | libavcodec/wmalosslessdec.c | decode_packet | static int decode_packet(AVCodecContext *avctx, void *data, int *got_frame_ptr, AVPacket* avpkt) {
WmallDecodeCtx *s = avctx->priv_data;
GetBitContext* gb = &s->pgb;
const uint8_t* buf = avpkt->data;
int buf_size = avpkt->size;
int num_bits_prev_frame, packet_sequence_number, seekable_frame_in_packe... | static int decode_packet(AVCodecContext *avctx, void *data, int *got_frame_ptr, AVPacket* avpkt) {
WmallDecodeCtx *s = avctx->priv_data;
GetBitContext* gb = &s->pgb;
const uint8_t* buf = avpkt->data;
int buf_size = avpkt->size;
int num_bits_prev_frame, packet_sequence_number, seekable_frame_in_packe... | static int decode_packet(AVCodecContext *avctx, void *data, int *got_frame_ptr, AVPacket* avpkt) {
WmallDecodeCtx *s = avctx->priv_data;
GetBitContext* gb = &s->pgb;
const uint8_t* buf = avpkt->data;
int buf_size = avpkt->size;
int num_bits_prev_frame, packet_sequence_number, spliced_packet;
s->... | static int decode_packet(AVCodecContext *avctx, void *data, int *got_frame_ptr, AVPacket* avpkt) {
WmallDecodeCtx *s = avctx->priv_data;
GetBitContext* gb = &s->pgb;
const uint8_t* buf = avpkt->data;
int buf_size = avpkt->size;
int num_bits_prev_frame, packet_sequence_number, spliced_packet;
s->... | static int decode_packet(AVCodecContext *avctx, void *data, int *got_frame_ptr, AVPacket* avpkt) {
WmallDecodeCtx *s = avctx->priv_data;
GetBitContext* gb = &s->pgb;
const uint8_t* buf = avpkt->data;
int buf_size = avpkt->size;
if (s->packet_done || s->packet_loss) {
if (buf_size < avctx->bl... | static int decode_packet(AVCodecContext *avctx, void *data, int *got_frame_ptr, AVPacket* avpkt) {
WmallDecodeCtx *s = avctx->priv_data;
GetBitContext* gb = &s->pgb;
const uint8_t* buf = avpkt->data;
int buf_size = avpkt->size;
if (s->packet_done || s->packet_loss) {
if (buf_size < avctx->bl... | static int decode_packet(AVCodecContext *avctx, void *data, int *got_frame_ptr, AVPacket* avpkt) {
WmallDecodeCtx *s = avctx->priv_data;
GetBitContext* gb = &s->pgb;
const uint8_t* buf = avpkt->data;
int buf_size = avpkt->size;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (s->packet_done || ... | static int decode_packet(AVCodecContext *avctx, void *data, int *got_frame_ptr, AVPacket* avpkt) {
WmallDecodeCtx *s = avctx->priv_data;
GetBitContext* gb = &s->pgb;
const uint8_t* buf = avpkt->data;
int buf_size = avpkt->size;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (s->packet_done || ... | static int decode_packet(AVCodecContext *avctx, void *data, int *got_frame_ptr, AVPacket* avpkt) {
WmallDecodeCtx *s = avctx->priv_data;
GetBitContext* gb = &s->pgb;
const uint8_t* buf = avpkt->data;
int buf_size = avpkt->size;
if (s->packet_done || s->packet_loss) {
if (buf_size < av... |
CVE-2012-2799 | FFmpeg | https://github.com/FFmpeg/FFmpeg | libavcodec/wmalosslessdec.c | flush | static void flush(AVCodecContext *avctx) {
WmallDecodeCtx *s = avctx->priv_data;
s->packet_loss = 1;
s->packet_done = 0;
s->num_saved_bits = 0;
s->frame_offset = 0;
s->next_packet_start = 0;
s->cdlms[0][0].order = 0;
s->frame.nb_samples = 0;
} | static void flush(AVCodecContext *avctx) {
WmallDecodeCtx *s = avctx->priv_data;
s->packet_loss = 1;
s->packet_done = 0;
s->num_saved_bits = 0;
init_put_bits(&s->pb, s->frame_data, MAX_FRAMESIZE);
s->frame_offset = 0;
s->next_packet_start = 0;
s->cdlms[0][0].order = 0;
s->frame.nb_sa... | static void flush(AVCodecContext *avctx) {
WmallDecodeCtx *s = avctx->priv_data;
s->packet_loss = 1;
s->packet_done = 0;
s->num_saved_bits = 0;
s->frame_offset = 0;
s->next_packet_start = 0;
s->cdlms[0][0].order = 0;
s->frame.nb_samples = 0;
} | static void flush(AVCodecContext *avctx) {
WmallDecodeCtx *s = avctx->priv_data;
s->packet_loss = 1;
s->packet_done = 0;
s->num_saved_bits = 0;
s->frame_offset = 0;
s->next_packet_start = 0;
s->cdlms[0][0].order = 0;
s->frame.nb_samples = 0;
init_put_bits(&s->pb, s->frame_data, MAX_F... | static void flush(AVCodecContext *avctx) {
WmallDecodeCtx *s = avctx->priv_data;
s->num_saved_bits = 0;
s->frame_offset = 0;
}
| static void flush(AVCodecContext *avctx) {
WmallDecodeCtx *s = avctx->priv_data;
s->num_saved_bits = 0;
init_put_bits(&s->pb, s->frame_data, MAX_FRAMESIZE);
s->frame_offset = 0;
}
| static void flush(AVCodecContext *avctx) {
WmallDecodeCtx *s = avctx->priv_data;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
s->num_saved_bits = 0;
s->frame_offset = 0;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
}
| static void flush(AVCodecContext *avctx) {
WmallDecodeCtx *s = avctx->priv_data;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
s->num_saved_bits = 0;
s->frame_offset = 0;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
init_put_bits(&s->pb, s->frame_data, MAX_FRAMESIZE);
} | static void flush(AVCodecContext *avctx) {
WmallDecodeCtx *s = avctx->priv_data;
s->num_saved_bits = 0;
+ init_put_bits(&s->pb, s->frame_data, MAX_FRAMESIZE);
s->frame_offset = 0;
} |
CVE-2012-3433 | xen | https://github.com/xen-project/xen | xen/arch/x86/mm/p2m.c | p2m_teardown | void p2m_teardown(struct domain *d) {
struct page_info *pg;
struct p2m_domain *p2m = d->arch.p2m;
unsigned long gfn;
p2m_type_t t;
mfn_t mfn;
p2m_lock(p2m);
for ( gfn=0; gfn < p2m->max_mapped_pfn; gfn++ ) {
mfn = p2m->get_entry(d, gfn, &t, p2m_query);
if ( mfn_valid(mfn) && (... | void p2m_teardown(struct domain *d) {
struct page_info *pg;
struct p2m_domain *p2m = d->arch.p2m;
unsigned long gfn;
p2m_type_t t;
mfn_t mfn;
p2m_lock(p2m);
for ( gfn=0; gfn < p2m->max_mapped_pfn; gfn++ ) {
if ( atomic_read(&d->shr_pages) == 0 ) {
break;
}
... | void p2m_teardown(struct p2m_domain *p2m) {
struct page_info *pg;
struct domain *d = p2m->domain;
unsigned long gfn;
p2m_type_t t;
p2m_access_t a;
mfn_t mfn;
p2m_lock(p2m);
for ( gfn=0; gfn < p2m->max_mapped_pfn; gfn++ ) {
mfn = p2m->get_entry(p2m, gfn, &t, &a, p2m_query);
... | void p2m_teardown(struct p2m_domain *p2m) {
struct page_info *pg;
struct domain *d = p2m->domain;
unsigned long gfn;
p2m_type_t t;
p2m_access_t a;
mfn_t mfn;
p2m_lock(p2m);
for ( gfn=0; gfn < p2m->max_mapped_pfn; gfn++ ) {
if ( atomic_read(&d->shr_pages) == 0 ) {
brea... | void p2m_teardown(struct domain *d) {
for ( gfn=0; gfn < p2m->max_mapped_pfn; gfn++ ) {
mfn = p2m->get_entry(d, gfn, &t, p2m_query);
}
d->arch.phys_table = pagetable_null();
}
| void p2m_teardown(struct domain *d) {
for ( gfn=0; gfn < p2m->max_mapped_pfn; gfn++ ) {
if ( atomic_read(&d->shr_pages) == 0 ) {
break;
}
mfn = p2m->get_entry(d, gfn, &t, p2m_query);
}
d->arch.phys_table = pagetable_null();
}
| void p2m_teardown(struct p2m_domain *p2m) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
for ( gfn=0; gfn < p2m->max_mapped_pfn; gfn++ ) {
mfn = p2m->get_entry(p2m, gfn, &t, &a, p2m_query);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
}
p2m->phys_table = pagetable_null();
/* PLACEHOLDE... | void p2m_teardown(struct p2m_domain *p2m) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
for ( gfn=0; gfn < p2m->max_mapped_pfn; gfn++ ) {
if ( atomic_read(&d->shr_pages) == 0 ) {
break;
}
mfn = p2m->get_entry(p2m, gfn, &t, &a, p2m_query);
/* PLACEHOLDER: DO NOT DELETE T... | void p2m_teardown(struct domain *d) {
for ( gfn=0; gfn < p2m->max_mapped_pfn; gfn++ ) {
+ if ( atomic_read(&d->shr_pages) == 0 ) {
+ break;
+ }
mfn = p2m->get_entry(d, gfn, &t, p2m_query);
}
d->arch.phys_table = pagetable_null();
} |
CVE-2012-3498 | xen | https://github.com/xen-project/xen | xen/arch/x86/physdev.c | physdev_hvm_map_pirq | static int physdev_hvm_map_pirq( struct domain *d, int type, int *index, int *pirq) {
int ret = 0;
spin_lock(&d->event_lock);
switch ( type ) {
case MAP_PIRQ_TYPE_GSI: {
struct hvm_irq_dpci *hvm_irq_dpci;
struct hvm_girq_dpci_mapping *girq;
uint32_t machine_gsi = 0;
hvm_i... | static int physdev_hvm_map_pirq( struct domain *d, int type, int *index, int *pirq) {
int ret = 0;
spin_lock(&d->event_lock);
switch ( type ) {
case MAP_PIRQ_TYPE_GSI: {
struct hvm_irq_dpci *hvm_irq_dpci;
struct hvm_girq_dpci_mapping *girq;
uint32_t machine_gsi = 0;
if ( ... | static int physdev_hvm_map_pirq( struct domain *d, struct physdev_map_pirq *map) {
int pirq, ret = 0;
spin_lock(&d->event_lock);
switch ( map->type ) {
case MAP_PIRQ_TYPE_GSI: {
struct hvm_irq_dpci *hvm_irq_dpci;
struct hvm_girq_dpci_mapping *girq;
uint32_t machine_gsi = 0;
... | static int physdev_hvm_map_pirq( struct domain *d, struct physdev_map_pirq *map) {
int pirq, ret = 0;
spin_lock(&d->event_lock);
switch ( map->type ) {
case MAP_PIRQ_TYPE_GSI: {
struct hvm_irq_dpci *hvm_irq_dpci;
struct hvm_girq_dpci_mapping *girq;
uint32_t machine_gsi = 0;
... | static int physdev_hvm_map_pirq( struct domain *d, int type, int *index, int *pirq) {
switch ( type ) {
case MAP_PIRQ_TYPE_GSI: {
uint32_t machine_gsi = 0;
hvm_irq_dpci = domain_get_irq_dpci(d);
if ( hvm_irq_dpci ) {
list_for_each_entry ( girq, &hvm_irq_dpci->girq[*index], li... | static int physdev_hvm_map_pirq( struct domain *d, int type, int *index, int *pirq) {
switch ( type ) {
case MAP_PIRQ_TYPE_GSI: {
uint32_t machine_gsi = 0;
if ( *index < 0 || *index >= NR_HVM_IRQS ) {
ret = -EVAL;
break;
}
hvm_irq_dpci = domain_get_irq_dpc... | static int physdev_hvm_map_pirq( struct domain *d, struct physdev_map_pirq *map) {
int pirq, ret = 0;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
switch ( map->type ) {
case MAP_PIRQ_TYPE_GSI: {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
uint32_t machine_gsi = 0;
hvm_irq_dpci = ... | static int physdev_hvm_map_pirq( struct domain *d, struct physdev_map_pirq *map) {
int pirq, ret = 0;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
switch ( map->type ) {
case MAP_PIRQ_TYPE_GSI: {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
uint32_t machine_gsi = 0;
if ( map->index... | static int physdev_hvm_map_pirq( struct domain *d, int type, int *index, int *pirq) {
switch ( type ) {
case MAP_PIRQ_TYPE_GSI: {
uint32_t machine_gsi = 0;
+ if ( *index < 0 || *index >= NR_HVM_IRQS ) {
+ ret = -EVAL;
+ break;
+ }
hvm_irq_dpci = domain_ge... |
CVE-2012-3515 | QEMU | https://github.com/qemu/qemu | console.c | console_putchar | static void console_putchar(TextConsole *s, int ch) {
TextCell *c;
int y1, i;
int x, y;
switch(s->state) {
case TTY_STATE_NORM:
switch(ch) {
case '\r':
s->x = 0;
break;
case '\n':
console_put_lf(s);
break;
case '\b':
... | static void console_putchar(TextConsole *s, int ch) {
TextCell *c;
int y1, i;
int x, y;
switch(s->state) {
case TTY_STATE_NORM:
switch(ch) {
case '\r':
s->x = 0;
break;
case '\n':
console_put_lf(s);
break;
case '\b':
... | static void console_putchar(TextConsole *s, int ch) {
TextCell *c;
int y1, i;
int x, y;
switch(s->state) {
case TTY_STATE_NORM:
switch(ch) {
case '\r':
s->x = 0;
break;
case '\n':
console_put_lf(s);
break;
case '\b':
... | static void console_putchar(TextConsole *s, int ch) {
TextCell *c;
int y1, i;
int x, y;
switch(s->state) {
case TTY_STATE_NORM:
switch(ch) {
case '\r':
s->x = 0;
break;
case '\n':
console_put_lf(s);
break;
case '\b':
... | static void console_putchar(TextConsole *s, int ch) {
switch(s->state) {
case TTY_STATE_CSI:
if (ch >= '0' && ch <= '9') {
} else {
s->nb_esc_params++;
fprintf(stderr, "escape sequence CSI%d;%d%c, %d parameters\n", s->esc_params[0], s->esc_params[1], ch, s->nb_esc_params)... | static void console_putchar(TextConsole *s, int ch) {
switch(s->state) {
case TTY_STATE_CSI:
if (ch >= '0' && ch <= '9') {
} else {
if (s->nb_esc_params < MAX_ESC_PARAMS) {
s->nb_esc_params++;
}
fprintf(stderr, "escape sequence CSI%d;%d%c, %d p... | static void console_putchar(TextConsole *s, int ch) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
switch(s->state) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
case TTY_STATE_CSI:
if (ch >= '0' && ch <= '9') {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
} else {
s-... | static void console_putchar(TextConsole *s, int ch) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
switch(s->state) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
case TTY_STATE_CSI:
if (ch >= '0' && ch <= '9') {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
} else {
if... | static void console_putchar(TextConsole *s, int ch) {
switch(s->state) {
case TTY_STATE_CSI:
if (ch >= '0' && ch <= '9') {
} else {
- s->nb_esc_params++;
+ if (s->nb_esc_params < MAX_ESC_PARAMS) {
+ s->nb_esc_params++;
+ }
fprintf... |
CVE-2012-4544 | xen | https://github.com/xen-project/xen | stubdom/grub/kexec.c | kexec | void kexec(void *kernel, long kernel_size, void *module, long module_size, char *cmdline, unsigned long flags) {
struct xc_dom_image *dom;
int rc;
domid_t domid = DOMID_SELF;
xen_pfn_t pfn;
xc_interface *xc_handle;
unsigned long i;
void *seg;
xen_pfn_t boot_page_mfn = virt_to_mfn(&_boot_... | void kexec(void *kernel, long kernel_size, void *module, long module_size, char *cmdline, unsigned long flags) {
struct xc_dom_image *dom;
int rc;
domid_t domid = DOMID_SELF;
xen_pfn_t pfn;
xc_interface *xc_handle;
unsigned long i;
void *seg;
xen_pfn_t boot_page_mfn = virt_to_mfn(&_boot_... | void kexec(void *kernel, long kernel_size, void *module, long module_size, char *cmdline, unsigned long flags) {
struct xc_dom_image *dom;
int rc;
domid_t domid = DOMID_SELF;
xen_pfn_t pfn;
xc_interface *xc_handle;
unsigned long i;
void *seg;
xen_pfn_t boot_page_mfn = virt_to_mfn(&_boot_... | void kexec(void *kernel, long kernel_size, void *module, long module_size, char *cmdline, unsigned long flags) {
struct xc_dom_image *dom;
int rc;
domid_t domid = DOMID_SELF;
xen_pfn_t pfn;
xc_interface *xc_handle;
unsigned long i;
void *seg;
xen_pfn_t boot_page_mfn = virt_to_mfn(&_boot_... | void kexec(void *kernel, long kernel_size, void *module, long module_size, char *cmdline, unsigned long flags) {
char features[] = "";
DEBUG("booting with cmdline %s\n", cmdline);
xc_handle = xc_interface_open(0,0,0);
dom = xc_dom_allocate(xc_handle, cmdline, features);
dom->kernel_blob = kernel;
... | void kexec(void *kernel, long kernel_size, void *module, long module_size, char *cmdline, unsigned long flags) {
char features[] = "";
DEBUG("booting with cmdline %s\n", cmdline);
xc_handle = xc_interface_open(0,0,0);
dom = xc_dom_allocate(xc_handle, cmdline, features);
xc_dom_kernel_max_size(dom, 0... | void kexec(void *kernel, long kernel_size, void *module, long module_size, char *cmdline, unsigned long flags) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
char features[] = "";
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
DEBUG("booting with cmdline %s\n", cmdline);
xc_handle = xc_interface_ope... | void kexec(void *kernel, long kernel_size, void *module, long module_size, char *cmdline, unsigned long flags) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
char features[] = "";
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
DEBUG("booting with cmdline %s\n", cmdline);
xc_handle = xc_interface_ope... | void kexec(void *kernel, long kernel_size, void *module, long module_size, char *cmdline, unsigned long flags) {
char features[] = "";
DEBUG("booting with cmdline %s\n", cmdline);
xc_handle = xc_interface_open(0,0,0);
dom = xc_dom_allocate(xc_handle, cmdline, features);
+ xc_dom_kernel_max_size(... |
CVE-2012-4544 | xen | https://github.com/xen-project/xen | tools/libxc/xc_dom_bzimageloader.c | _xc_try_lzma_decode | static int _xc_try_lzma_decode( struct xc_dom_image *dom, void **blob, size_t *size, lzma_stream *stream, const char *what) {
lzma_ret ret;
lzma_action action = LZMA_RUN;
unsigned char *out_buf;
unsigned char *tmp_buf;
int retval = -1;
int outsize;
const char *msg;
outsize = dom->kernel_... | static int _xc_try_lzma_decode( struct xc_dom_image *dom, void **blob, size_t *size, lzma_stream *stream, const char *what) {
lzma_ret ret;
lzma_action action = LZMA_RUN;
unsigned char *out_buf;
unsigned char *tmp_buf;
int retval = -1;
size_t outsize;
const char *msg;
if ( dom->kernel_si... | static int _xc_try_lzma_decode( struct xc_dom_image *dom, void **blob, size_t *size, lzma_stream *stream, const char *what) {
lzma_ret ret;
lzma_action action = LZMA_RUN;
unsigned char *out_buf;
unsigned char *tmp_buf;
int retval = -1;
int outsize;
const char *msg;
outsize = dom->kernel_... | static int _xc_try_lzma_decode( struct xc_dom_image *dom, void **blob, size_t *size, lzma_stream *stream, const char *what) {
lzma_ret ret;
lzma_action action = LZMA_RUN;
unsigned char *out_buf;
unsigned char *tmp_buf;
int retval = -1;
size_t outsize;
const char *msg;
if ( dom->kernel_si... | static int _xc_try_lzma_decode( struct xc_dom_image *dom, void **blob, size_t *size, lzma_stream *stream, const char *what) {
int retval = -1;
int outsize;
const char *msg;
outsize = dom->kernel_size;
out_buf = malloc(outsize);
if ( out_buf == NULL ) {
goto lzma_cleanup;
}
stream... | static int _xc_try_lzma_decode( struct xc_dom_image *dom, void **blob, size_t *size, lzma_stream *stream, const char *what) {
int retval = -1;
size_t outsize;
const char *msg;
if ( dom->kernel_size == 0) {
DOMPRTF("%s: Input is 0 size", what);
return -1;
}
outsize = dom->kernel_s... | static int _xc_try_lzma_decode( struct xc_dom_image *dom, void **blob, size_t *size, lzma_stream *stream, const char *what) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
int retval = -1;
int outsize;
const char *msg;
outsize = dom->kernel_size;
out_buf = malloc(outsize);
if ( out_buf == NU... | static int _xc_try_lzma_decode( struct xc_dom_image *dom, void **blob, size_t *size, lzma_stream *stream, const char *what) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
int retval = -1;
size_t outsize;
const char *msg;
if ( dom->kernel_size == 0) {
DOMPRTF("%s: Input is 0 size", what);
... | static int _xc_try_lzma_decode( struct xc_dom_image *dom, void **blob, size_t *size, lzma_stream *stream, const char *what) {
int retval = -1;
- int outsize;
+ size_t outsize;
const char *msg;
+ if ( dom->kernel_size == 0) {
+ DOMPRTF("%s: Input is 0 size", what);
+ return -1;
+ }
... |
CVE-2012-4544 | xen | https://github.com/xen-project/xen | tools/libxc/xc_dom_bzimageloader.c | xc_try_bzip2_decode | static int xc_try_bzip2_decode( struct xc_dom_image *dom, void **blob, size_t *size) {
bz_stream stream;
int ret;
char *out_buf;
char *tmp_buf;
int retval = -1;
int outsize;
uint64_t total;
stream.bzalloc = NULL;
stream.bzfree = NULL;
stream.opaque = NULL;
ret = BZ2_bzDecompr... | static int xc_try_bzip2_decode( struct xc_dom_image *dom, void **blob, size_t *size) {
bz_stream stream;
int ret;
char *out_buf;
char *tmp_buf;
int retval = -1;
unsigned int outsize;
uint64_t total;
stream.bzalloc = NULL;
stream.bzfree = NULL;
stream.opaque = NULL;
if ( dom->... | static int xc_try_bzip2_decode( struct xc_dom_image *dom, void **blob, size_t *size) {
bz_stream stream;
int ret;
char *out_buf;
char *tmp_buf;
int retval = -1;
int outsize;
uint64_t total;
stream.bzalloc = NULL;
stream.bzfree = NULL;
stream.opaque = NULL;
ret = BZ2_bzDecompr... | static int xc_try_bzip2_decode( struct xc_dom_image *dom, void **blob, size_t *size) {
bz_stream stream;
int ret;
char *out_buf;
char *tmp_buf;
int retval = -1;
unsigned int outsize;
uint64_t total;
stream.bzalloc = NULL;
stream.bzfree = NULL;
stream.opaque = NULL;
if ( dom->... | static int xc_try_bzip2_decode( struct xc_dom_image *dom, void **blob, size_t *size) {
int retval = -1;
int outsize;
uint64_t total;
stream.opaque = NULL;
ret = BZ2_bzDecompressInit(&stream, 0, 0);
outsize = dom->kernel_size;
out_buf = malloc(outsize);
if ( out_buf == NULL ) {
go... | static int xc_try_bzip2_decode( struct xc_dom_image *dom, void **blob, size_t *size) {
int retval = -1;
unsigned int outsize;
uint64_t total;
stream.opaque = NULL;
if ( dom->kernel_size == 0) {
DOMPRTF("BZIP2: Input is 0 size");
return -1;
}
ret = BZ2_bzDecompressInit(&stream... | static int xc_try_bzip2_decode( struct xc_dom_image *dom, void **blob, size_t *size) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
int retval = -1;
int outsize;
uint64_t total;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
stream.opaque = NULL;
ret = BZ2_bzDecompressInit(&stream, 0, 0);
... | static int xc_try_bzip2_decode( struct xc_dom_image *dom, void **blob, size_t *size) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
int retval = -1;
unsigned int outsize;
uint64_t total;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
stream.opaque = NULL;
if ( dom->kernel_size == 0) {
... | static int xc_try_bzip2_decode( struct xc_dom_image *dom, void **blob, size_t *size) {
int retval = -1;
- int outsize;
+ unsigned int outsize;
uint64_t total;
stream.opaque = NULL;
+ if ( dom->kernel_size == 0) {
+ DOMPRTF("BZIP2: Input is 0 size");
+ return -1;
+ }
ret = ... |
CVE-2012-4544 | xen | https://github.com/xen-project/xen | tools/libxc/xc_dom_bzimageloader.c | xc_try_lzo1x_decode | static int xc_try_lzo1x_decode( struct xc_dom_image *dom, void **blob, size_t *size) {
int ret;
const unsigned char *cur = dom->kernel_blob;
unsigned char *out_buf = NULL;
size_t left = dom->kernel_size;
const char *msg;
unsigned version;
static const unsigned char magic[] = {
0x89, ... | static int xc_try_lzo1x_decode( struct xc_dom_image *dom, void **blob, size_t *size) {
int ret;
const unsigned char *cur = dom->kernel_blob;
unsigned char *out_buf = NULL;
size_t left = dom->kernel_size;
const char *msg;
unsigned version;
static const unsigned char magic[] = {
0x89, ... | static int xc_try_lzo1x_decode( struct xc_dom_image *dom, void **blob, size_t *size) {
int ret;
const unsigned char *cur = dom->kernel_blob;
unsigned char *out_buf = NULL;
size_t left = dom->kernel_size;
const char *msg;
unsigned version;
static const unsigned char magic[] = {
0x89, ... | static int xc_try_lzo1x_decode( struct xc_dom_image *dom, void **blob, size_t *size) {
int ret;
const unsigned char *cur = dom->kernel_blob;
unsigned char *out_buf = NULL;
size_t left = dom->kernel_size;
const char *msg;
unsigned version;
static const unsigned char magic[] = {
0x89, ... | static int xc_try_lzo1x_decode( struct xc_dom_image *dom, void **blob, size_t *size) {
const unsigned char *cur = dom->kernel_blob;
size_t left = dom->kernel_size;
static const unsigned char magic[] = {
0x89, 0x4c, 0x5a, 0x4f, 0x00, 0x0d, 0x0a, 0x1a, 0x0a
};
ret = lzo_init();
if ( left <... | static int xc_try_lzo1x_decode( struct xc_dom_image *dom, void **blob, size_t *size) {
const unsigned char *cur = dom->kernel_blob;
size_t left = dom->kernel_size;
static const unsigned char magic[] = {
0x89, 0x4c, 0x5a, 0x4f, 0x00, 0x0d, 0x0a, 0x1a, 0x0a
};
XC_BUILD_BUG_ON(sizeof(lzo_uint) ... | static int xc_try_lzo1x_decode( struct xc_dom_image *dom, void **blob, size_t *size) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
const unsigned char *cur = dom->kernel_blob;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
size_t left = dom->kernel_size;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT *... | static int xc_try_lzo1x_decode( struct xc_dom_image *dom, void **blob, size_t *size) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
const unsigned char *cur = dom->kernel_blob;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
size_t left = dom->kernel_size;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT *... | static int xc_try_lzo1x_decode( struct xc_dom_image *dom, void **blob, size_t *size) {
const unsigned char *cur = dom->kernel_blob;
size_t left = dom->kernel_size;
static const unsigned char magic[] = {
0x89, 0x4c, 0x5a, 0x4f, 0x00, 0x0d, 0x0a, 0x1a, 0x0a
};
+ XC_BUILD_BUG_ON(sizeof(lzo... |
CVE-2012-4544 | xen | https://github.com/xen-project/xen | tools/libxc/xc_dom_core.c | xc_dom_allocate | struct xc_dom_image *xc_dom_allocate(xc_interface *xch, const char *cmdline, const char *features) {
struct xc_dom_image *dom;
xc_dom_printf(xch, "%s: cmdline=\"%s\", features=\"%s\"", __FUNCTION__, cmdline, features);
dom = malloc(sizeof(*dom));
if ( !dom ) {
goto err;
}
memset(dom, 0, ... | struct xc_dom_image *xc_dom_allocate(xc_interface *xch, const char *cmdline, const char *features) {
struct xc_dom_image *dom;
xc_dom_printf(xch, "%s: cmdline=\"%s\", features=\"%s\"", __FUNCTION__, cmdline, features);
dom = malloc(sizeof(*dom));
if ( !dom ) {
goto err;
}
memset(dom, 0, ... | struct xc_dom_image *xc_dom_allocate(xc_interface *xch, const char *cmdline, const char *features) {
struct xc_dom_image *dom;
xc_dom_printf(xch, "%s: cmdline=\"%s\", features=\"%s\"", __FUNCTION__, cmdline, features);
dom = malloc(sizeof(*dom));
if ( !dom ) {
goto err;
}
memset(dom, 0, ... | struct xc_dom_image *xc_dom_allocate(xc_interface *xch, const char *cmdline, const char *features) {
struct xc_dom_image *dom;
xc_dom_printf(xch, "%s: cmdline=\"%s\", features=\"%s\"", __FUNCTION__, cmdline, features);
dom = malloc(sizeof(*dom));
if ( !dom ) {
goto err;
}
memset(dom, 0, ... | struct xc_dom_image *xc_dom_allocate(xc_interface *xch, const char *cmdline, const char *features) {
dom->xch = xch;
if ( cmdline ) {
dom->cmdline = xc_dom_strdup(dom, cmdline);
}
if ( features ) {
elf_xen_parse_features(features, dom->f_requested, NULL);
}
dom->alloc_malloc += s... | struct xc_dom_image *xc_dom_allocate(xc_interface *xch, const char *cmdline, const char *features) {
dom->xch = xch;
dom->max_kernel_size = XC_DOM_DECOMPRESS_MAX;
dom->max_ramdisk_size = XC_DOM_DECOMPRESS_MAX;
if ( cmdline ) {
dom->cmdline = xc_dom_strdup(dom, cmdline);
}
if ( features )... | struct xc_dom_image *xc_dom_allocate(xc_interface *xch, const char *cmdline, const char *features) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
dom->xch = xch;
if ( cmdline ) {
dom->cmdline = xc_dom_strdup(dom, cmdline);
}
if ( features ) {
elf_xen_parse_features(features, dom->f_... | struct xc_dom_image *xc_dom_allocate(xc_interface *xch, const char *cmdline, const char *features) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
dom->xch = xch;
dom->max_kernel_size = XC_DOM_DECOMPRESS_MAX;
dom->max_ramdisk_size = XC_DOM_DECOMPRESS_MAX;
if ( cmdline ) {
dom->cmdline = xc_d... | struct xc_dom_image *xc_dom_allocate(xc_interface *xch, const char *cmdline, const char *features) {
dom->xch = xch;
+ dom->max_kernel_size = XC_DOM_DECOMPRESS_MAX;
+ dom->max_ramdisk_size = XC_DOM_DECOMPRESS_MAX;
if ( cmdline ) {
dom->cmdline = xc_dom_strdup(dom, cmdline);
}
if ( fe... |
CVE-2012-4544 | xen | https://github.com/xen-project/xen | tools/libxc/xc_dom_core.c | xc_dom_build_image | int xc_dom_build_image(struct xc_dom_image *dom) {
unsigned int page_size;
DOMPRTF_CALLED(dom->xch);
if ( dom->arch_hooks == NULL ) {
xc_dom_panic(dom->xch, XC_TERNAL_ERROR, "%s: arch hooks not set", __FUNCTION__);
goto err;
}
page_size = XC_DOM_PAGE_SIZE(dom);
if ( xc_dom_alloc_... | int xc_dom_build_image(struct xc_dom_image *dom) {
unsigned int page_size;
DOMPRTF_CALLED(dom->xch);
if ( dom->arch_hooks == NULL ) {
xc_dom_panic(dom->xch, XC_TERNAL_ERROR, "%s: arch hooks not set", __FUNCTION__);
goto err;
}
page_size = XC_DOM_PAGE_SIZE(dom);
if ( xc_dom_alloc_... | int xc_dom_build_image(struct xc_dom_image *dom) {
unsigned int page_size;
DOMPRTF_CALLED(dom->xch);
if ( dom->arch_hooks == NULL ) {
xc_dom_panic(dom->xch, XC_TERNAL_ERROR, "%s: arch hooks not set", __FUNCTION__);
goto err;
}
page_size = XC_DOM_PAGE_SIZE(dom);
if ( xc_dom_alloc_... | int xc_dom_build_image(struct xc_dom_image *dom) {
unsigned int page_size;
DOMPRTF_CALLED(dom->xch);
if ( dom->arch_hooks == NULL ) {
xc_dom_panic(dom->xch, XC_TERNAL_ERROR, "%s: arch hooks not set", __FUNCTION__);
goto err;
}
page_size = XC_DOM_PAGE_SIZE(dom);
if ( xc_dom_alloc_... | int xc_dom_build_image(struct xc_dom_image *dom) {
DOMPRTF_CALLED(dom->xch);
page_size = XC_DOM_PAGE_SIZE(dom);
if ( xc_dom_alloc_segment(dom, &dom->kernel_seg, "kernel", dom->kernel_seg.vstart, dom->kernel_seg.vend - dom->kernel_seg.vstart) != 0 ) {
goto err;
}
if ( dom->kernel_loader->load... | int xc_dom_build_image(struct xc_dom_image *dom) {
DOMPRTF_CALLED(dom->xch);
page_size = XC_DOM_PAGE_SIZE(dom);
if ( xc_dom_alloc_segment(dom, &dom->kernel_seg, "kernel", dom->kernel_seg.vstart, dom->kernel_seg.vend - dom->kernel_seg.vstart) != 0 ) {
goto err;
}
if ( dom->kernel_loader->load... | int xc_dom_build_image(struct xc_dom_image *dom) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
DOMPRTF_CALLED(dom->xch);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
page_size = XC_DOM_PAGE_SIZE(dom);
if ( xc_dom_alloc_segment(dom, &dom->kernel_seg, "kernel", dom->kernel_seg.vstart, dom->kernel_s... | int xc_dom_build_image(struct xc_dom_image *dom) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
DOMPRTF_CALLED(dom->xch);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
page_size = XC_DOM_PAGE_SIZE(dom);
if ( xc_dom_alloc_segment(dom, &dom->kernel_seg, "kernel", dom->kernel_seg.vstart, dom->kernel_s... | int xc_dom_build_image(struct xc_dom_image *dom) {
DOMPRTF_CALLED(dom->xch);
page_size = XC_DOM_PAGE_SIZE(dom);
if ( xc_dom_alloc_segment(dom, &dom->kernel_seg, "kernel", dom->kernel_seg.vstart, dom->kernel_seg.vend - dom->kernel_seg.vstart) != 0 ) {
goto err;
}
if ( dom->kernel_loade... |
CVE-2012-4544 | xen | https://github.com/xen-project/xen | tools/libxc/xc_dom_core.c | xc_dom_check_gzip | size_t xc_dom_check_gzip(xc_interface *xch, void *blob, size_t ziplen) {
unsigned char *gzlen;
size_t unziplen;
if ( strncmp(blob, "\037\213", 2) ) {
return 0;
}
gzlen = blob + ziplen - 4;
unziplen = gzlen[3] << 24 | gzlen[2] << 16 | gzlen[1] << 8 | gzlen[0];
if ( (unziplen < 0) || (... | size_t xc_dom_check_gzip(xc_interface *xch, void *blob, size_t ziplen) {
unsigned char *gzlen;
size_t unziplen;
if ( strncmp(blob, "\037\213", 2) ) {
return 0;
}
gzlen = blob + ziplen - 4;
unziplen = gzlen[3] << 24 | gzlen[2] << 16 | gzlen[1] << 8 | gzlen[0];
if ( (unziplen < 0) || (... | size_t xc_dom_check_gzip(xc_interface *xch, void *blob, size_t ziplen) {
unsigned char *gzlen;
size_t unziplen;
if ( strncmp(blob, "\037\213", 2) ) {
return 0;
}
gzlen = blob + ziplen - 4;
unziplen = gzlen[3] << 24 | gzlen[2] << 16 | gzlen[1] << 8 | gzlen[0];
if ( (unziplen < 0) || (... | size_t xc_dom_check_gzip(xc_interface *xch, void *blob, size_t ziplen) {
unsigned char *gzlen;
size_t unziplen;
if ( strncmp(blob, "\037\213", 2) ) {
return 0;
}
gzlen = blob + ziplen - 4;
unziplen = gzlen[3] << 24 | gzlen[2] << 16 | gzlen[1] << 8 | gzlen[0];
if ( (unziplen < 0) || (... | size_t xc_dom_check_gzip(xc_interface *xch, void *blob, size_t ziplen) {
if ( strncmp(blob, "\037\213", 2) ) {
return 0;
}
gzlen = blob + ziplen - 4;
unziplen = gzlen[3] << 24 | gzlen[2] << 16 | gzlen[1] << 8 | gzlen[0];
if ( (unziplen < 0) || (unziplen > (1024*1024*1024)) ) {
xc_dom... | size_t xc_dom_check_gzip(xc_interface *xch, void *blob, size_t ziplen) {
if ( strncmp(blob, "\037\213", 2) ) {
return 0;
}
gzlen = blob + ziplen - 4;
unziplen = gzlen[3] << 24 | gzlen[2] << 16 | gzlen[1] << 8 | gzlen[0];
if ( (unziplen < 0) || (unziplen > XC_DOM_DECOMPRESS_MAX) ) {
x... | size_t xc_dom_check_gzip(xc_interface *xch, void *blob, size_t ziplen) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if ( strncmp(blob, "\037\213", 2) ) {
return 0;
}
gzlen = blob + ziplen - 4;
unziplen = gzlen[3] << 24 | gzlen[2] << 16 | gzlen[1] << 8 | gzlen[0];
if ( (unziplen < 0) |... | size_t xc_dom_check_gzip(xc_interface *xch, void *blob, size_t ziplen) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if ( strncmp(blob, "\037\213", 2) ) {
return 0;
}
gzlen = blob + ziplen - 4;
unziplen = gzlen[3] << 24 | gzlen[2] << 16 | gzlen[1] << 8 | gzlen[0];
if ( (unziplen < 0) |... | size_t xc_dom_check_gzip(xc_interface *xch, void *blob, size_t ziplen) {
if ( strncmp(blob, "\037\213", 2) ) {
return 0;
}
gzlen = blob + ziplen - 4;
unziplen = gzlen[3] << 24 | gzlen[2] << 16 | gzlen[1] << 8 | gzlen[0];
- if ( (unziplen < 0) || (unziplen > (1024*1024*1024)) ) {
+ if... |
CVE-2012-4544 | xen | https://github.com/xen-project/xen | tools/libxc/xc_dom_core.c | xc_dom_kernel_file | int xc_dom_kernel_file(struct xc_dom_image *dom, const char *filename) {
DOMPRTF("%s: filename=\"%s\"", __FUNCTION__, filename);
dom->kernel_blob = xc_dom_malloc_filemap(dom, filename, &dom->kernel_size);
if ( dom->kernel_blob == NULL ) {
return -1;
}
return xc_dom_try_gunzip(dom, &dom->kern... | int xc_dom_kernel_file(struct xc_dom_image *dom, const char *filename) {
DOMPRTF("%s: filename=\"%s\"", __FUNCTION__, filename);
dom->kernel_blob = xc_dom_malloc_filemap(dom, filename, &dom->kernel_size, dom->max_kernel_size);
if ( dom->kernel_blob == NULL ) {
return -1;
}
return xc_dom_try_... | int xc_dom_kernel_file(struct xc_dom_image *dom, const char *filename) {
DOMPRTF("%s: filename=\"%s\"", __FUNCTION__, filename);
dom->kernel_blob = xc_dom_malloc_filemap(dom, filename, &dom->kernel_size);
if ( dom->kernel_blob == NULL ) {
return -1;
}
return xc_dom_try_gunzip(dom, &dom->kern... | int xc_dom_kernel_file(struct xc_dom_image *dom, const char *filename) {
DOMPRTF("%s: filename=\"%s\"", __FUNCTION__, filename);
dom->kernel_blob = xc_dom_malloc_filemap(dom, filename, &dom->kernel_size, dom->max_kernel_size);
if ( dom->kernel_blob == NULL ) {
return -1;
}
return xc_dom_try_... | int xc_dom_kernel_file(struct xc_dom_image *dom, const char *filename) {
DOMPRTF("%s: filename=\"%s\"", __FUNCTION__, filename);
dom->kernel_blob = xc_dom_malloc_filemap(dom, filename, &dom->kernel_size);
if ( dom->kernel_blob == NULL ) {
return -1;
}
return xc_dom_try_gunzip(dom, &dom->kern... | int xc_dom_kernel_file(struct xc_dom_image *dom, const char *filename) {
DOMPRTF("%s: filename=\"%s\"", __FUNCTION__, filename);
dom->kernel_blob = xc_dom_malloc_filemap(dom, filename, &dom->kernel_size, dom->max_kernel_size);
if ( dom->kernel_blob == NULL ) {
return -1;
}
return xc_dom_try_... | int xc_dom_kernel_file(struct xc_dom_image *dom, const char *filename) {
DOMPRTF("%s: filename=\"%s\"", __FUNCTION__, filename);
dom->kernel_blob = xc_dom_malloc_filemap(dom, filename, &dom->kernel_size);
if ( dom->kernel_blob == NULL ) {
return -1;
}
return xc_dom_try_gunzip(dom, &dom->kern... | int xc_dom_kernel_file(struct xc_dom_image *dom, const char *filename) {
DOMPRTF("%s: filename=\"%s\"", __FUNCTION__, filename);
dom->kernel_blob = xc_dom_malloc_filemap(dom, filename, &dom->kernel_size, dom->max_kernel_size);
if ( dom->kernel_blob == NULL ) {
return -1;
}
return xc_dom_try_... | int xc_dom_kernel_file(struct xc_dom_image *dom, const char *filename) {
DOMPRTF("%s: filename=\"%s\"", __FUNCTION__, filename);
- dom->kernel_blob = xc_dom_malloc_filemap(dom, filename, &dom->kernel_size);
+ dom->kernel_blob = xc_dom_malloc_filemap(dom, filename, &dom->kernel_size, dom->max_kernel_size);
... |
CVE-2012-4544 | xen | https://github.com/xen-project/xen | tools/libxc/xc_dom_core.c | xc_dom_malloc_filemap | void *xc_dom_malloc_filemap(struct xc_dom_image *dom, const char *filename, size_t * size) {
struct xc_dom_mem *block = NULL;
int fd = -1;
fd = open(filename, O_RDONLY);
if ( fd == -1 ) {
goto err;
}
lseek(fd, 0, SEEK_SET);
*size = lseek(fd, 0, SEEK_END);
block = malloc(sizeof(*b... | void *xc_dom_malloc_filemap(struct xc_dom_image *dom, const char *filename, size_t * size, const size_t max_size) {
struct xc_dom_mem *block = NULL;
int fd = -1;
fd = open(filename, O_RDONLY);
if ( fd == -1 ) {
goto err;
}
lseek(fd, 0, SEEK_SET);
*size = lseek(fd, 0, SEEK_END);
i... | void *xc_dom_malloc_filemap(struct xc_dom_image *dom, const char *filename, size_t * size) {
struct xc_dom_mem *block = NULL;
int fd = -1;
fd = open(filename, O_RDONLY);
if ( fd == -1 ) {
goto err;
}
lseek(fd, 0, SEEK_SET);
*size = lseek(fd, 0, SEEK_END);
block = malloc(sizeof(*b... | void *xc_dom_malloc_filemap(struct xc_dom_image *dom, const char *filename, size_t * size, const size_t max_size) {
struct xc_dom_mem *block = NULL;
int fd = -1;
fd = open(filename, O_RDONLY);
if ( fd == -1 ) {
goto err;
}
lseek(fd, 0, SEEK_SET);
*size = lseek(fd, 0, SEEK_END);
i... | void *xc_dom_malloc_filemap(struct xc_dom_image *dom, const char *filename, size_t * size) {
fd = open(filename, O_RDONLY);
if ( fd == -1 ) {
goto err;
}
lseek(fd, 0, SEEK_SET);
*size = lseek(fd, 0, SEEK_END);
block = malloc(sizeof(*block));
block->mmap_len = *size;
block->mmap_p... | void *xc_dom_malloc_filemap(struct xc_dom_image *dom, const char *filename, size_t * size, const size_t max_size) {
fd = open(filename, O_RDONLY);
if ( fd == -1 ) {
goto err;
}
lseek(fd, 0, SEEK_SET);
*size = lseek(fd, 0, SEEK_END);
if ( max_size && *size > max_size ) {
xc_dom_pa... | void *xc_dom_malloc_filemap(struct xc_dom_image *dom, const char *filename, size_t * size) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
fd = open(filename, O_RDONLY);
if ( fd == -1 ) {
goto err;
}
lseek(fd, 0, SEEK_SET);
*size = lseek(fd, 0, SEEK_END);
block = malloc(sizeof(*block... | void *xc_dom_malloc_filemap(struct xc_dom_image *dom, const char *filename, size_t * size, const size_t max_size) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
fd = open(filename, O_RDONLY);
if ( fd == -1 ) {
goto err;
}
lseek(fd, 0, SEEK_SET);
*size = lseek(fd, 0, SEEK_END);
if ( ... | -void *xc_dom_malloc_filemap(struct xc_dom_image *dom, const char *filename, size_t * size) {
+void *xc_dom_malloc_filemap(struct xc_dom_image *dom, const char *filename, size_t * size, const size_t max_size) {
fd = open(filename, O_RDONLY);
if ( fd == -1 ) {
goto err;
}
lseek(fd, 0, SEEK_S... |
CVE-2012-4544 | xen | https://github.com/xen-project/xen | tools/libxc/xc_dom_core.c | xc_dom_ramdisk_file | int xc_dom_ramdisk_file(struct xc_dom_image *dom, const char *filename) {
DOMPRTF("%s: filename=\"%s\"", __FUNCTION__, filename);
dom->ramdisk_blob = xc_dom_malloc_filemap(dom, filename, &dom->ramdisk_size);
if ( dom->ramdisk_blob == NULL ) {
return -1;
}
return 0;
} | int xc_dom_ramdisk_file(struct xc_dom_image *dom, const char *filename) {
DOMPRTF("%s: filename=\"%s\"", __FUNCTION__, filename);
dom->ramdisk_blob = xc_dom_malloc_filemap(dom, filename, &dom->ramdisk_size, dom->max_ramdisk_size);
if ( dom->ramdisk_blob == NULL ) {
return -1;
}
return 0;
} | int xc_dom_ramdisk_file(struct xc_dom_image *dom, const char *filename) {
DOMPRTF("%s: filename=\"%s\"", __FUNCTION__, filename);
dom->ramdisk_blob = xc_dom_malloc_filemap(dom, filename, &dom->ramdisk_size);
if ( dom->ramdisk_blob == NULL ) {
return -1;
}
return 0;
} | int xc_dom_ramdisk_file(struct xc_dom_image *dom, const char *filename) {
DOMPRTF("%s: filename=\"%s\"", __FUNCTION__, filename);
dom->ramdisk_blob = xc_dom_malloc_filemap(dom, filename, &dom->ramdisk_size, dom->max_ramdisk_size);
if ( dom->ramdisk_blob == NULL ) {
return -1;
}
return 0;
} | int xc_dom_ramdisk_file(struct xc_dom_image *dom, const char *filename) {
DOMPRTF("%s: filename=\"%s\"", __FUNCTION__, filename);
dom->ramdisk_blob = xc_dom_malloc_filemap(dom, filename, &dom->ramdisk_size);
if ( dom->ramdisk_blob == NULL ) {
return -1;
}
return 0;
}
| int xc_dom_ramdisk_file(struct xc_dom_image *dom, const char *filename) {
DOMPRTF("%s: filename=\"%s\"", __FUNCTION__, filename);
dom->ramdisk_blob = xc_dom_malloc_filemap(dom, filename, &dom->ramdisk_size, dom->max_ramdisk_size);
if ( dom->ramdisk_blob == NULL ) {
return -1;
}
return 0;
}
| int xc_dom_ramdisk_file(struct xc_dom_image *dom, const char *filename) {
DOMPRTF("%s: filename=\"%s\"", __FUNCTION__, filename);
dom->ramdisk_blob = xc_dom_malloc_filemap(dom, filename, &dom->ramdisk_size);
if ( dom->ramdisk_blob == NULL ) {
return -1;
}
return 0;
}
| int xc_dom_ramdisk_file(struct xc_dom_image *dom, const char *filename) {
DOMPRTF("%s: filename=\"%s\"", __FUNCTION__, filename);
dom->ramdisk_blob = xc_dom_malloc_filemap(dom, filename, &dom->ramdisk_size, dom->max_ramdisk_size);
if ( dom->ramdisk_blob == NULL ) {
return -1;
}
return 0;
} | int xc_dom_ramdisk_file(struct xc_dom_image *dom, const char *filename) {
DOMPRTF("%s: filename=\"%s\"", __FUNCTION__, filename);
- dom->ramdisk_blob = xc_dom_malloc_filemap(dom, filename, &dom->ramdisk_size);
+ dom->ramdisk_blob = xc_dom_malloc_filemap(dom, filename, &dom->ramdisk_size, dom->max_ramdisk_si... |
CVE-2012-4544 | xen | https://github.com/xen-project/xen | tools/libxc/xc_dom_core.c | xc_dom_try_gunzip | int xc_dom_try_gunzip(struct xc_dom_image *dom, void **blob, size_t * size) {
void *unzip;
size_t unziplen;
unziplen = xc_dom_check_gzip(dom->xch, *blob, *size);
if ( unziplen == 0 ) {
return 0;
}
unzip = xc_dom_malloc(dom, unziplen);
if ( unzip == NULL ) {
return -1;
}
... | int xc_dom_try_gunzip(struct xc_dom_image *dom, void **blob, size_t * size) {
void *unzip;
size_t unziplen;
unziplen = xc_dom_check_gzip(dom->xch, *blob, *size);
if ( unziplen == 0 ) {
return 0;
}
if ( xc_dom_kernel_check_size(dom, unziplen) ) {
return 0;
}
unzip = xc_dom... | int xc_dom_try_gunzip(struct xc_dom_image *dom, void **blob, size_t * size) {
void *unzip;
size_t unziplen;
unziplen = xc_dom_check_gzip(dom->xch, *blob, *size);
if ( unziplen == 0 ) {
return 0;
}
unzip = xc_dom_malloc(dom, unziplen);
if ( unzip == NULL ) {
return -1;
}
... | int xc_dom_try_gunzip(struct xc_dom_image *dom, void **blob, size_t * size) {
void *unzip;
size_t unziplen;
unziplen = xc_dom_check_gzip(dom->xch, *blob, *size);
if ( unziplen == 0 ) {
return 0;
}
if ( xc_dom_kernel_check_size(dom, unziplen) ) {
return 0;
}
unzip = xc_dom... | int xc_dom_try_gunzip(struct xc_dom_image *dom, void **blob, size_t * size) {
unziplen = xc_dom_check_gzip(dom->xch, *blob, *size);
if ( unziplen == 0 ) {
return 0;
}
unzip = xc_dom_malloc(dom, unziplen);
if ( unzip == NULL ) {
return -1;
}
if ( xc_dom_do_gunzip(dom->xch, *bl... | int xc_dom_try_gunzip(struct xc_dom_image *dom, void **blob, size_t * size) {
unziplen = xc_dom_check_gzip(dom->xch, *blob, *size);
if ( unziplen == 0 ) {
return 0;
}
if ( xc_dom_kernel_check_size(dom, unziplen) ) {
return 0;
}
unzip = xc_dom_malloc(dom, unziplen);
if ( unzip... | int xc_dom_try_gunzip(struct xc_dom_image *dom, void **blob, size_t * size) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
unziplen = xc_dom_check_gzip(dom->xch, *blob, *size);
if ( unziplen == 0 ) {
return 0;
}
unzip = xc_dom_malloc(dom, unziplen);
if ( unzip == NULL ) {
return... | int xc_dom_try_gunzip(struct xc_dom_image *dom, void **blob, size_t * size) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
unziplen = xc_dom_check_gzip(dom->xch, *blob, *size);
if ( unziplen == 0 ) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
}
if ( xc_dom_kernel_check_size(dom, unziplen... | int xc_dom_try_gunzip(struct xc_dom_image *dom, void **blob, size_t * size) {
unziplen = xc_dom_check_gzip(dom->xch, *blob, *size);
if ( unziplen == 0 ) {
+ return 0;
+ }
+ if ( xc_dom_kernel_check_size(dom, unziplen) ) {
return 0;
}
unzip = xc_dom_malloc(dom, unziplen);
... |
CVE-2012-5515 | xen | https://github.com/xen-project/xen | xen/common/memory.c | decrease_reservation | static void decrease_reservation(struct memop_args *a) {
unsigned long i, j;
xen_pfn_t gmfn;
if ( !guest_handle_subrange_okay(a->extent_list, a->nr_done, a->nr_extents-1) ) {
return;
}
for ( i = a->nr_done; i < a->nr_extents; i++ ) {
if ( hypercall_preempt_check() ) {
a->... | static void decrease_reservation(struct memop_args *a) {
unsigned long i, j;
xen_pfn_t gmfn;
if ( !guest_handle_subrange_okay(a->extent_list, a->nr_done, a->nr_extents-1) || a->extent_order > MAX_ORDER ) {
return;
}
for ( i = a->nr_done; i < a->nr_extents; i++ ) {
if ( hypercall_pree... | static void decrease_reservation(struct memop_args *a) {
unsigned long i, j;
xen_pfn_t gmfn;
if ( !guest_handle_subrange_okay(a->extent_list, a->nr_done, a->nr_extents-1) ) {
return;
}
for ( i = a->nr_done; i < a->nr_extents; i++ ) {
if ( hypercall_preempt_check() ) {
a->... | static void decrease_reservation(struct memop_args *a) {
unsigned long i, j;
xen_pfn_t gmfn;
if ( !guest_handle_subrange_okay(a->extent_list, a->nr_done, a->nr_extents-1) || a->extent_order > MAX_ORDER ) {
return;
}
for ( i = a->nr_done; i < a->nr_extents; i++ ) {
if ( hypercall_pree... | static void decrease_reservation(struct memop_args *a) {
xen_pfn_t gmfn;
if ( !guest_handle_subrange_okay(a->extent_list, a->nr_done, a->nr_extents-1) ) {
return;
}
for ( i = a->nr_done; i < a->nr_extents; i++ ) {
if ( unlikely(__copy_from_guest_offset(&gmfn, a->extent_list, i, 1)) ) {
... | static void decrease_reservation(struct memop_args *a) {
xen_pfn_t gmfn;
if ( !guest_handle_subrange_okay(a->extent_list, a->nr_done, a->nr_extents-1) || a->extent_order > MAX_ORDER ) {
return;
}
for ( i = a->nr_done; i < a->nr_extents; i++ ) {
if ( unlikely(__copy_from_guest_offset(&gmf... | static void decrease_reservation(struct memop_args *a) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
xen_pfn_t gmfn;
if ( !guest_handle_subrange_okay(a->extent_list, a->nr_done, a->nr_extents-1) ) {
return;
}
for ( i = a->nr_done; i < a->nr_extents; i++ ) {
/* PLACEHOLDER: DO NOT DELET... | static void decrease_reservation(struct memop_args *a) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
xen_pfn_t gmfn;
if ( !guest_handle_subrange_okay(a->extent_list, a->nr_done, a->nr_extents-1) || a->extent_order > MAX_ORDER ) {
return;
}
for ( i = a->nr_done; i < a->nr_extents; i++ ) {
... | static void decrease_reservation(struct memop_args *a) {
xen_pfn_t gmfn;
- if ( !guest_handle_subrange_okay(a->extent_list, a->nr_done, a->nr_extents-1) ) {
+ if ( !guest_handle_subrange_okay(a->extent_list, a->nr_done, a->nr_extents-1) || a->extent_order > MAX_ORDER ) {
return;
}
for ( i... |
CVE-2012-5515 | xen | https://github.com/xen-project/xen | xen/common/memory.c | populate_physmap | static void populate_physmap(struct memop_args *a) {
struct page_info *page;
unsigned long i, j;
xen_pfn_t gpfn, mfn;
struct domain *d = a->domain;
if ( !guest_handle_subrange_okay(a->extent_list, a->nr_done, a->nr_extents-1) ) {
return;
}
if ( !multipage_allocation_permitted(current... | static void populate_physmap(struct memop_args *a) {
struct page_info *page;
unsigned long i, j;
xen_pfn_t gpfn, mfn;
struct domain *d = a->domain;
if ( !guest_handle_subrange_okay(a->extent_list, a->nr_done, a->nr_extents-1) ) {
return;
}
if ( !multipage_allocation_permitted(current... | static void populate_physmap(struct memop_args *a) {
struct page_info *page;
unsigned long i, j;
xen_pfn_t gpfn, mfn;
struct domain *d = a->domain;
if ( !guest_handle_subrange_okay(a->extent_list, a->nr_done, a->nr_extents-1) ) {
return;
}
if ( !multipage_allocation_permitted(current... | static void populate_physmap(struct memop_args *a) {
struct page_info *page;
unsigned long i, j;
xen_pfn_t gpfn, mfn;
struct domain *d = a->domain;
if ( !guest_handle_subrange_okay(a->extent_list, a->nr_done, a->nr_extents-1) ) {
return;
}
if ( !multipage_allocation_permitted(current... | static void populate_physmap(struct memop_args *a) {
struct domain *d = a->domain;
if ( !multipage_allocation_permitted(current->domain, a->extent_order) ) {
return;
}
for ( i = a->nr_done; i < a->nr_extents; i++ ) {
if ( a->memflags & MEMF_populate_on_demand ) {
if ( guest_p... | static void populate_physmap(struct memop_args *a) {
struct domain *d = a->domain;
if ( !multipage_allocation_permitted(current->domain, a->extent_order) ) {
return;
}
for ( i = a->nr_done; i < a->nr_extents; i++ ) {
if ( a->memflags & MEMF_populate_on_demand ) {
if ( a->exte... | static void populate_physmap(struct memop_args *a) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct domain *d = a->domain;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if ( !multipage_allocation_permitted(current->domain, a->extent_order) ) {
return;
}
for ( i = a->nr_done; i < a-... | static void populate_physmap(struct memop_args *a) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct domain *d = a->domain;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if ( !multipage_allocation_permitted(current->domain, a->extent_order) ) {
return;
}
for ( i = a->nr_done; i < a-... | static void populate_physmap(struct memop_args *a) {
struct domain *d = a->domain;
if ( !multipage_allocation_permitted(current->domain, a->extent_order) ) {
return;
}
for ( i = a->nr_done; i < a->nr_extents; i++ ) {
if ( a->memflags & MEMF_populate_on_demand ) {
- if (... |
CVE-2012-5634 | xen | https://github.com/xen-project/xen | xen/drivers/passthrough/vtd/intremap.c | set_msi_source_id | static void set_msi_source_id(struct pci_dev *pdev, struct iremap_entry *ire) {
u16 seg;
u8 bus, devfn, secbus;
int ret;
if ( !pdev || !ire ) {
return;
}
seg = pdev->seg;
bus = pdev->bus;
devfn = pdev->devfn;
switch ( pdev->type ) {
unsigned int sq;
case DEV_TYPE_... | static void set_msi_source_id(struct pci_dev *pdev, struct iremap_entry *ire) {
u16 seg;
u8 bus, devfn, secbus;
int ret;
if ( !pdev || !ire ) {
return;
}
seg = pdev->seg;
bus = pdev->bus;
devfn = pdev->devfn;
switch ( pdev->type ) {
unsigned int sq;
case DEV_TYPE_... | static void set_msi_source_id(struct pci_dev *pdev, struct iremap_entry *ire) {
int type;
u8 bus, devfn, secbus;
int ret;
if ( !pdev || !ire ) {
return;
}
bus = pdev->bus;
devfn = pdev->devfn;
type = pdev_type(bus, devfn);
switch ( type ) {
case DEV_TYPE_PCIe_BRIDGE:
... | static void set_msi_source_id(struct pci_dev *pdev, struct iremap_entry *ire) {
int type;
u8 bus, devfn, secbus;
int ret;
if ( !pdev || !ire ) {
return;
}
bus = pdev->bus;
devfn = pdev->devfn;
type = pdev_type(bus, devfn);
switch ( type ) {
case DEV_TYPE_PCIe_BRIDGE:
... | static void set_msi_source_id(struct pci_dev *pdev, struct iremap_entry *ire) {
if ( !pdev || !ire ) {
return;
}
seg = pdev->seg;
bus = pdev->bus;
devfn = pdev->devfn;
switch ( pdev->type ) {
case DEV_TYPE_PCI:
ret = find_upstream_bridge(seg, &bus, &devfn, &secbus);
i... | static void set_msi_source_id(struct pci_dev *pdev, struct iremap_entry *ire) {
if ( !pdev || !ire ) {
return;
}
seg = pdev->seg;
bus = pdev->bus;
devfn = pdev->devfn;
switch ( pdev->type ) {
case DEV_TYPE_PCI:
ret = find_upstream_bridge(seg, &bus, &devfn, &secbus);
i... | static void set_msi_source_id(struct pci_dev *pdev, struct iremap_entry *ire) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if ( !pdev || !ire ) {
return;
}
bus = pdev->bus;
devfn = pdev->devfn;
type = pdev_type(bus, devfn);
switch ( type ) {
/* PLACEHOLDER: DO NOT DELETE THIS ... | static void set_msi_source_id(struct pci_dev *pdev, struct iremap_entry *ire) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if ( !pdev || !ire ) {
return;
}
bus = pdev->bus;
devfn = pdev->devfn;
type = pdev_type(bus, devfn);
switch ( type ) {
/* PLACEHOLDER: DO NOT DELETE THIS ... | static void set_msi_source_id(struct pci_dev *pdev, struct iremap_entry *ire) {
if ( !pdev || !ire ) {
return;
}
seg = pdev->seg;
bus = pdev->bus;
devfn = pdev->devfn;
switch ( pdev->type ) {
case DEV_TYPE_PCI:
ret = find_upstream_bridge(seg, &bus, &devfn, &secbus);... |
CVE-2012-6075 | QEMU | https://github.com/qemu/qemu | hw/e1000.c | e1000_receive | static ssize_t e1000_receive(NetClientState *nc, const uint8_t *buf, size_t size) {
E1000State *s = DO_UPCAST(NICState, nc, nc)->opaque;
struct e1000_rx_desc desc;
dma_addr_t base;
unsigned int n, rdt;
uint32_t rdh_start;
uint16_t vlan_special = 0;
uint8_t vlan_status = 0, vlan_offset = 0;
... | static ssize_t e1000_receive(NetClientState *nc, const uint8_t *buf, size_t size) {
E1000State *s = DO_UPCAST(NICState, nc, nc)->opaque;
struct e1000_rx_desc desc;
dma_addr_t base;
unsigned int n, rdt;
uint32_t rdh_start;
uint16_t vlan_special = 0;
uint8_t vlan_status = 0, vlan_offset = 0;
... | static ssize_t e1000_receive(NetClientState *nc, const uint8_t *buf, size_t size) {
E1000State *s = DO_UPCAST(NICState, nc, nc)->opaque;
struct e1000_rx_desc desc;
dma_addr_t base;
unsigned int n, rdt;
uint32_t rdh_start;
uint16_t vlan_special = 0;
uint8_t vlan_status = 0, vlan_offset = 0;
... | static ssize_t e1000_receive(NetClientState *nc, const uint8_t *buf, size_t size) {
E1000State *s = DO_UPCAST(NICState, nc, nc)->opaque;
struct e1000_rx_desc desc;
dma_addr_t base;
unsigned int n, rdt;
uint32_t rdh_start;
uint16_t vlan_special = 0;
uint8_t vlan_status = 0, vlan_offset = 0;
... | static ssize_t e1000_receive(NetClientState *nc, const uint8_t *buf, size_t size) {
if (!(s->mac_reg[RCTL] & E1000_RCTL_EN)) {
return -1;
}
if (size < sizeof(min_buf)) {
size = sizeof(min_buf);
}
if (!receive_filter(s, buf, size)) {
return size;
}
if (vlan_enabled(s) ... | static ssize_t e1000_receive(NetClientState *nc, const uint8_t *buf, size_t size) {
if (!(s->mac_reg[RCTL] & E1000_RCTL_EN)) {
return -1;
}
if (size < sizeof(min_buf)) {
size = sizeof(min_buf);
}
if (size > MAXIMUM_ETHERNET_VLAN_SIZE && !(s->mac_reg[RCTL] & E1000_RCTL_LPE) && !(s->ma... | static ssize_t e1000_receive(NetClientState *nc, const uint8_t *buf, size_t size) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (!(s->mac_reg[RCTL] & E1000_RCTL_EN)) {
return -1;
}
if (size < sizeof(min_buf)) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
size = sizeof(min_buf)... | static ssize_t e1000_receive(NetClientState *nc, const uint8_t *buf, size_t size) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (!(s->mac_reg[RCTL] & E1000_RCTL_EN)) {
return -1;
}
if (size < sizeof(min_buf)) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
size = sizeof(min_buf)... | static ssize_t e1000_receive(NetClientState *nc, const uint8_t *buf, size_t size) {
if (!(s->mac_reg[RCTL] & E1000_RCTL_EN)) {
return -1;
}
if (size < sizeof(min_buf)) {
size = sizeof(min_buf);
+ }
+ if (size > MAXIMUM_ETHERNET_VLAN_SIZE && !(s->mac_reg[RCTL] & E1000_RCTL_LPE) &&... |
CVE-2012-6615 | FFmpeg | https://github.com/FFmpeg/FFmpeg | libavcodec/ass_split.c | ff_ass_split_override_codes | int ff_ass_split_override_codes(const ASSCodesCallbacks *callbacks, void *priv, const char *buf) {
const char *text = NULL;
char new_line[2];
int text_len = 0;
while (*buf) {
if (text && callbacks->text && (sscanf(buf, "\\%1[nN]", new_line) == 1 || !strncmp(buf, "{\\", 2))) {
callbac... | int ff_ass_split_override_codes(const ASSCodesCallbacks *callbacks, void *priv, const char *buf) {
const char *text = NULL;
char new_line[2];
int text_len = 0;
while (buf && *buf) {
if (text && callbacks->text && (sscanf(buf, "\\%1[nN]", new_line) == 1 || !strncmp(buf, "{\\", 2))) {
... | int ff_ass_split_override_codes(const ASSCodesCallbacks *callbacks, void *priv, const char *buf) {
const char *text = NULL;
char new_line[2];
int text_len = 0;
while (*buf) {
if (text && callbacks->text && (sscanf(buf, "\\%1[nN]", new_line) == 1 || !strncmp(buf, "{\\", 2))) {
callbac... | int ff_ass_split_override_codes(const ASSCodesCallbacks *callbacks, void *priv, const char *buf) {
const char *text = NULL;
char new_line[2];
int text_len = 0;
while (buf && *buf) {
if (text && callbacks->text && (sscanf(buf, "\\%1[nN]", new_line) == 1 || !strncmp(buf, "{\\", 2))) {
... | int ff_ass_split_override_codes(const ASSCodesCallbacks *callbacks, void *priv, const char *buf) {
int text_len = 0;
while (*buf) {
if (text && callbacks->text && (sscanf(buf, "\\%1[nN]", new_line) == 1 || !strncmp(buf, "{\\", 2))) {
callbacks->text(priv, text, text_len);
text = ... | int ff_ass_split_override_codes(const ASSCodesCallbacks *callbacks, void *priv, const char *buf) {
int text_len = 0;
while (buf && *buf) {
if (text && callbacks->text && (sscanf(buf, "\\%1[nN]", new_line) == 1 || !strncmp(buf, "{\\", 2))) {
callbacks->text(priv, text, text_len);
... | int ff_ass_split_override_codes(const ASSCodesCallbacks *callbacks, void *priv, const char *buf) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
int text_len = 0;
while (*buf) {
if (text && callbacks->text && (sscanf(buf, "\\%1[nN]", new_line) == 1 || !strncmp(buf, "{\\", 2))) {
callback... | int ff_ass_split_override_codes(const ASSCodesCallbacks *callbacks, void *priv, const char *buf) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
int text_len = 0;
while (buf && *buf) {
if (text && callbacks->text && (sscanf(buf, "\\%1[nN]", new_line) == 1 || !strncmp(buf, "{\\", 2))) {
c... | int ff_ass_split_override_codes(const ASSCodesCallbacks *callbacks, void *priv, const char *buf) {
int text_len = 0;
- while (*buf) {
+ while (buf && *buf) {
if (text && callbacks->text && (sscanf(buf, "\\%1[nN]", new_line) == 1 || !strncmp(buf, "{\\", 2))) {
callbacks->text(priv, text... |
CVE-2012-6616 | FFmpeg | https://github.com/FFmpeg/FFmpeg | libavcodec/movtextdec.c | mov_text_decode_frame | static int mov_text_decode_frame(AVCodecContext *avctx, void *data, int *got_sub_ptr, AVPacket *avpkt) {
AVSubtitle *sub = data;
int ts_start, ts_end;
AVBPrint buf;
const char *ptr = avpkt->data;
const char *end;
if (!ptr || avpkt->size < 2) {
return AVERROR_VALIDDATA;
}
if (avpk... | static int mov_text_decode_frame(AVCodecContext *avctx, void *data, int *got_sub_ptr, AVPacket *avpkt) {
AVSubtitle *sub = data;
int ts_start, ts_end;
AVBPrint buf;
const char *ptr = avpkt->data;
const char *end;
if (!ptr || avpkt->size < 2) {
return AVERROR_VALIDDATA;
}
if (avpk... | static int mov_text_decode_frame(AVCodecContext *avctx, void *data, int *got_sub_ptr, AVPacket *avpkt) {
AVSubtitle *sub = data;
int ts_start, ts_end;
AVBPrint buf;
const char *ptr = avpkt->data;
const char *end;
if (!ptr || avpkt->size < 2) {
return AVERROR_VALIDDATA;
}
if (avpk... | static int mov_text_decode_frame(AVCodecContext *avctx, void *data, int *got_sub_ptr, AVPacket *avpkt) {
AVSubtitle *sub = data;
int ts_start, ts_end;
AVBPrint buf;
const char *ptr = avpkt->data;
const char *end;
if (!ptr || avpkt->size < 2) {
return AVERROR_VALIDDATA;
}
if (avpk... | static int mov_text_decode_frame(AVCodecContext *avctx, void *data, int *got_sub_ptr, AVPacket *avpkt) {
const char *ptr = avpkt->data;
if (!ptr || avpkt->size < 2) {
return AVERROR_VALIDDATA;
}
if (avpkt->size == 2) {
return AV_RB16(ptr) == 0 ? 0 : AVERROR_VALIDDATA;
}
end = ptr... | static int mov_text_decode_frame(AVCodecContext *avctx, void *data, int *got_sub_ptr, AVPacket *avpkt) {
const char *ptr = avpkt->data;
if (!ptr || avpkt->size < 2) {
return AVERROR_VALIDDATA;
}
if (avpkt->size == 2) {
return AV_RB16(ptr) == 0 ? 0 : AVERROR_VALIDDATA;
}
end = ptr... | static int mov_text_decode_frame(AVCodecContext *avctx, void *data, int *got_sub_ptr, AVPacket *avpkt) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
const char *ptr = avpkt->data;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (!ptr || avpkt->size < 2) {
return AVERROR_VALIDDATA;
}
i... | static int mov_text_decode_frame(AVCodecContext *avctx, void *data, int *got_sub_ptr, AVPacket *avpkt) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
const char *ptr = avpkt->data;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (!ptr || avpkt->size < 2) {
return AVERROR_VALIDDATA;
}
i... | static int mov_text_decode_frame(AVCodecContext *avctx, void *data, int *got_sub_ptr, AVPacket *avpkt) {
const char *ptr = avpkt->data;
if (!ptr || avpkt->size < 2) {
return AVERROR_VALIDDATA;
}
if (avpkt->size == 2) {
return AV_RB16(ptr) == 0 ? 0 : AVERROR_VALIDDATA;
}
- ... |
CVE-2012-6618 | FFmpeg | https://github.com/FFmpeg/FFmpeg | libavformat/utils.c | av_probe_input_buffer | int av_probe_input_buffer(AVIOContext *pb, AVInputFormat **fmt, const char *filename, void *logctx, unsigned int offset, unsigned int max_probe_size) {
AVProbeData pd = { filename ? filename : "", NULL, -offset };
unsigned char *buf = NULL;
int ret = 0, probe_size;
if (!max_probe_size) {
max_pro... | int av_probe_input_buffer(AVIOContext *pb, AVInputFormat **fmt, const char *filename, void *logctx, unsigned int offset, unsigned int max_probe_size) {
AVProbeData pd = { filename ? filename : "", NULL, -offset };
unsigned char *buf = NULL;
int ret = 0, probe_size, buf_offset = 0;
if (!max_probe_size) {... | int av_probe_input_buffer(AVIOContext *pb, AVInputFormat **fmt, const char *filename, void *logctx, unsigned int offset, unsigned int max_probe_size) {
AVProbeData pd = { filename ? filename : "", NULL, -offset };
unsigned char *buf = NULL;
int ret = 0, probe_size;
if (!max_probe_size) {
max_pro... | int av_probe_input_buffer(AVIOContext *pb, AVInputFormat **fmt, const char *filename, void *logctx, unsigned int offset, unsigned int max_probe_size) {
AVProbeData pd = { filename ? filename : "", NULL, -offset };
unsigned char *buf = NULL;
int ret = 0, probe_size, buf_offset = 0;
if (!max_probe_size) {... | int av_probe_input_buffer(AVIOContext *pb, AVInputFormat **fmt, const char *filename, void *logctx, unsigned int offset, unsigned int max_probe_size) {
AVProbeData pd = { filename ? filename : "", NULL, -offset };
unsigned char *buf = NULL;
int ret = 0, probe_size;
if (!max_probe_size) {
max_pro... | int av_probe_input_buffer(AVIOContext *pb, AVInputFormat **fmt, const char *filename, void *logctx, unsigned int offset, unsigned int max_probe_size) {
AVProbeData pd = { filename ? filename : "", NULL, -offset };
unsigned char *buf = NULL;
int ret = 0, probe_size, buf_offset = 0;
if (!max_probe_size) {... | int av_probe_input_buffer(AVIOContext *pb, AVInputFormat **fmt, const char *filename, void *logctx, unsigned int offset, unsigned int max_probe_size) {
AVProbeData pd = { filename ? filename : "", NULL, -offset };
unsigned char *buf = NULL;
int ret = 0, probe_size;
if (!max_probe_size) {
max_pro... | int av_probe_input_buffer(AVIOContext *pb, AVInputFormat **fmt, const char *filename, void *logctx, unsigned int offset, unsigned int max_probe_size) {
AVProbeData pd = { filename ? filename : "", NULL, -offset };
unsigned char *buf = NULL;
int ret = 0, probe_size, buf_offset = 0;
if (!max_probe_size) {... | int av_probe_input_buffer(AVIOContext *pb, AVInputFormat **fmt, const char *filename, void *logctx, unsigned int offset, unsigned int max_probe_size) {
AVProbeData pd = { filename ? filename : "", NULL, -offset };
unsigned char *buf = NULL;
- int ret = 0, probe_size;
+ int ret = 0, probe_size, buf_offs... |
CVE-2013-0154 | xen | https://github.com/xen-project/xen | xen/arch/x86/mm.c | get_page_type | int get_page_type(struct page_info *page, unsigned long type) {
int rc = __get_page_type(page, type, 0);
if ( likely(rc == 0) ) {
return 1;
}
ASSERT(rc == -EVAL);
return 0;
} | int get_page_type(struct page_info *page, unsigned long type) {
int rc = __get_page_type(page, type, 0);
if ( likely(rc == 0) ) {
return 1;
}
ASSERT(rc != -ETR && rc != -EAGA);
return 0;
} | int get_page_type(struct page_info *page, unsigned long type) {
int rc = __get_page_type(page, type, 0);
if ( likely(rc == 0) ) {
return 1;
}
ASSERT(rc == -EVAL);
return 0;
} | int get_page_type(struct page_info *page, unsigned long type) {
int rc = __get_page_type(page, type, 0);
if ( likely(rc == 0) ) {
return 1;
}
ASSERT(rc != -ETR && rc != -EAGA);
return 0;
} | int get_page_type(struct page_info *page, unsigned long type) {
int rc = __get_page_type(page, type, 0);
if ( likely(rc == 0) ) {
return 1;
}
ASSERT(rc == -EVAL);
return 0;
}
| int get_page_type(struct page_info *page, unsigned long type) {
int rc = __get_page_type(page, type, 0);
if ( likely(rc == 0) ) {
return 1;
}
ASSERT(rc != -ETR && rc != -EAGA);
return 0;
}
| int get_page_type(struct page_info *page, unsigned long type) {
int rc = __get_page_type(page, type, 0);
if ( likely(rc == 0) ) {
return 1;
}
ASSERT(rc == -EVAL);
return 0;
}
| int get_page_type(struct page_info *page, unsigned long type) {
int rc = __get_page_type(page, type, 0);
if ( likely(rc == 0) ) {
return 1;
}
ASSERT(rc != -ETR && rc != -EAGA);
return 0;
} | int get_page_type(struct page_info *page, unsigned long type) {
int rc = __get_page_type(page, type, 0);
if ( likely(rc == 0) ) {
return 1;
}
- ASSERT(rc == -EVAL);
+ ASSERT(rc != -ETR && rc != -EAGA);
return 0;
} |
CVE-2013-0166 | OpenSSL | https://github.com/openssl/openssl | crypto/asn1/a_verify.c | ASN1_item_verify | int ASN1_item_verify(const ASN1_ITEM *it, X509_ALGOR *a, ASN1_BIT_STRG *signature, void *asn, EVP_PKEY *pkey) {
EVP_MD_CTX ctx;
unsigned char *buf_in=NULL;
int ret= -1,inl;
int mdnid, pknid;
EVP_MD_CTX_init(&ctx);
if (!OBJ_find_sigid_algs(OBJ_obj2nid(a->algorithm), &mdnid, &pknid)) {
ASN... | int ASN1_item_verify(const ASN1_ITEM *it, X509_ALGOR *a, ASN1_BIT_STRG *signature, void *asn, EVP_PKEY *pkey) {
EVP_MD_CTX ctx;
unsigned char *buf_in=NULL;
int ret= -1,inl;
int mdnid, pknid;
if (!pkey) {
ASN1err(ASN1_F_ASN1_ITEM_VERIFY, ERR_R_PASSED_NULL_PARAMETER);
return -1;
}
... | int ASN1_item_verify(const ASN1_ITEM *it, X509_ALGOR *a, ASN1_BIT_STRG *signature, void *asn, EVP_PKEY *pkey) {
EVP_MD_CTX ctx;
unsigned char *buf_in=NULL;
int ret= -1,inl;
int mdnid, pknid;
EVP_MD_CTX_init(&ctx);
if (!OBJ_find_sigid_algs(OBJ_obj2nid(a->algorithm), &mdnid, &pknid)) {
ASN... | int ASN1_item_verify(const ASN1_ITEM *it, X509_ALGOR *a, ASN1_BIT_STRG *signature, void *asn, EVP_PKEY *pkey) {
EVP_MD_CTX ctx;
unsigned char *buf_in=NULL;
int ret= -1,inl;
int mdnid, pknid;
if (!pkey) {
ASN1err(ASN1_F_ASN1_ITEM_VERIFY, ERR_R_PASSED_NULL_PARAMETER);
return -1;
}
... | int ASN1_item_verify(const ASN1_ITEM *it, X509_ALGOR *a, ASN1_BIT_STRG *signature, void *asn, EVP_PKEY *pkey) {
int ret= -1,inl;
int mdnid, pknid;
EVP_MD_CTX_init(&ctx);
if (mdnid == NID_undef) {
if (!pkey->ameth || !pkey->ameth->item_verify) {
goto err;
}
ret = pkey-... | int ASN1_item_verify(const ASN1_ITEM *it, X509_ALGOR *a, ASN1_BIT_STRG *signature, void *asn, EVP_PKEY *pkey) {
int ret= -1,inl;
int mdnid, pknid;
if (!pkey) {
ASN1err(ASN1_F_ASN1_ITEM_VERIFY, ERR_R_PASSED_NULL_PARAMETER);
return -1;
}
EVP_MD_CTX_init(&ctx);
if (mdnid == NID_unde... | int ASN1_item_verify(const ASN1_ITEM *it, X509_ALGOR *a, ASN1_BIT_STRG *signature, void *asn, EVP_PKEY *pkey) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
int ret= -1,inl;
int mdnid, pknid;
EVP_MD_CTX_init(&ctx);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (mdnid == NID_undef) {
... | int ASN1_item_verify(const ASN1_ITEM *it, X509_ALGOR *a, ASN1_BIT_STRG *signature, void *asn, EVP_PKEY *pkey) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
int ret= -1,inl;
int mdnid, pknid;
if (!pkey) {
ASN1err(ASN1_F_ASN1_ITEM_VERIFY, ERR_R_PASSED_NULL_PARAMETER);
return -1;
}
... | int ASN1_item_verify(const ASN1_ITEM *it, X509_ALGOR *a, ASN1_BIT_STRG *signature, void *asn, EVP_PKEY *pkey) {
int ret= -1,inl;
int mdnid, pknid;
+ if (!pkey) {
+ ASN1err(ASN1_F_ASN1_ITEM_VERIFY, ERR_R_PASSED_NULL_PARAMETER);
+ return -1;
+ }
EVP_MD_CTX_init(&ctx);
if (mdnid ==... |
CVE-2013-0844 | FFmpeg | https://github.com/FFmpeg/FFmpeg | libavcodec/adpcm.c | adpcm_decode_frame | static int adpcm_decode_frame(AVCodecContext *avctx, void *data, int *got_frame_ptr, AVPacket *avpkt) {
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
ADPCMDecodeContext *c = avctx->priv_data;
ADPCMChannelStatus *cs;
int n, m, channel, i;
short *samples;
int16_t **samples_p;
... | static int adpcm_decode_frame(AVCodecContext *avctx, void *data, int *got_frame_ptr, AVPacket *avpkt) {
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
ADPCMDecodeContext *c = avctx->priv_data;
ADPCMChannelStatus *cs;
int n, m, channel, i;
short *samples;
int16_t **samples_p;
... | static int adpcm_decode_frame(AVCodecContext *avctx, void *data, int *got_frame_ptr, AVPacket *avpkt) {
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
ADPCMDecodeContext *c = avctx->priv_data;
ADPCMChannelStatus *cs;
int n, m, channel, i;
short *samples;
int st;
int count1... | static int adpcm_decode_frame(AVCodecContext *avctx, void *data, int *got_frame_ptr, AVPacket *avpkt) {
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
ADPCMDecodeContext *c = avctx->priv_data;
ADPCMChannelStatus *cs;
int n, m, channel, i;
short *samples;
int st;
int count1... | static int adpcm_decode_frame(AVCodecContext *avctx, void *data, int *got_frame_ptr, AVPacket *avpkt) {
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
ADPCMDecodeContext *c = avctx->priv_data;
bytestream2_init(&gb, buf, buf_size);
nb_samples = get_nb_samples(avctx, &gb, buf_size, &cod... | static int adpcm_decode_frame(AVCodecContext *avctx, void *data, int *got_frame_ptr, AVPacket *avpkt) {
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
ADPCMDecodeContext *c = avctx->priv_data;
bytestream2_init(&gb, buf, buf_size);
nb_samples = get_nb_samples(avctx, &gb, buf_size, &cod... | static int adpcm_decode_frame(AVCodecContext *avctx, void *data, int *got_frame_ptr, AVPacket *avpkt) {
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
ADPCMDecodeContext *c = avctx->priv_data;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
bytestream2_init(&gb, buf, buf_size);
nb_s... | static int adpcm_decode_frame(AVCodecContext *avctx, void *data, int *got_frame_ptr, AVPacket *avpkt) {
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
ADPCMDecodeContext *c = avctx->priv_data;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
bytestream2_init(&gb, buf, buf_size);
nb_s... | static int adpcm_decode_frame(AVCodecContext *avctx, void *data, int *got_frame_ptr, AVPacket *avpkt) {
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
ADPCMDecodeContext *c = avctx->priv_data;
bytestream2_init(&gb, buf, buf_size);
nb_samples = get_nb_samples(avctx, &gb, buf_size... |
CVE-2013-0846 | FFmpeg | https://github.com/FFmpeg/FFmpeg | libavcodec/qdm2.c | qdm2_decode_super_block | static void qdm2_decode_super_block (QDM2Context *q) {
GetBitContext gb;
QDM2SubPacket header, *packet;
int i, packet_bytes, sub_packet_size, sub_packets_D;
unsigned int next_index = 0;
memset(q->tone_level_idx_hi1, 0, sizeof(q->tone_level_idx_hi1));
memset(q->tone_level_idx_mid, 0, sizeof(q->to... | static void qdm2_decode_super_block (QDM2Context *q) {
GetBitContext gb;
QDM2SubPacket header, *packet;
int i, packet_bytes, sub_packet_size, sub_packets_D;
unsigned int next_index = 0;
memset(q->tone_level_idx_hi1, 0, sizeof(q->tone_level_idx_hi1));
memset(q->tone_level_idx_mid, 0, sizeof(q->to... | static void qdm2_decode_super_block (QDM2Context *q) {
GetBitContext gb;
QDM2SubPacket header, *packet;
int i, packet_bytes, sub_packet_size, sub_packets_D;
unsigned int next_index = 0;
memset(q->tone_level_idx_hi1, 0, sizeof(q->tone_level_idx_hi1));
memset(q->tone_level_idx_mid, 0, sizeof(q->to... | static void qdm2_decode_super_block (QDM2Context *q) {
GetBitContext gb;
QDM2SubPacket header, *packet;
int i, packet_bytes, sub_packet_size, sub_packets_D;
unsigned int next_index = 0;
memset(q->tone_level_idx_hi1, 0, sizeof(q->tone_level_idx_hi1));
memset(q->tone_level_idx_mid, 0, sizeof(q->to... | static void qdm2_decode_super_block (QDM2Context *q) {
average_quantized_coeffs(q);
init_get_bits(&gb, q->compressed_data, q->compressed_size*8);
packet_bytes = (q->compressed_size - get_bits_count(&gb) / 8);
for (i = 0; packet_bytes > 0; i++) {
int j;
q->sub_packet_list_A[i].next = NULL... | static void qdm2_decode_super_block (QDM2Context *q) {
average_quantized_coeffs(q);
init_get_bits(&gb, q->compressed_data, q->compressed_size*8);
packet_bytes = (q->compressed_size - get_bits_count(&gb) / 8);
for (i = 0; packet_bytes > 0; i++) {
int j;
if (i>=FF_ARRAY_ELEMS(q->sub_packet... | static void qdm2_decode_super_block (QDM2Context *q) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
average_quantized_coeffs(q);
init_get_bits(&gb, q->compressed_data, q->compressed_size*8);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
packet_bytes = (q->compressed_size - get_bits_count(&gb) / 8);... | static void qdm2_decode_super_block (QDM2Context *q) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
average_quantized_coeffs(q);
init_get_bits(&gb, q->compressed_data, q->compressed_size*8);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
packet_bytes = (q->compressed_size - get_bits_count(&gb) / 8);... | static void qdm2_decode_super_block (QDM2Context *q) {
average_quantized_coeffs(q);
init_get_bits(&gb, q->compressed_data, q->compressed_size*8);
packet_bytes = (q->compressed_size - get_bits_count(&gb) / 8);
for (i = 0; packet_bytes > 0; i++) {
int j;
+ if (i>=FF_ARRAY_ELEMS(q->sub... |
CVE-2013-0850 | FFmpeg | https://github.com/FFmpeg/FFmpeg | libavcodec/h264.c | decode_slice_header | static int decode_slice_header(H264Context *h, H264Context *h0) {
MpegEncContext *const s = &h->s;
MpegEncContext *const s0 = &h0->s;
unsigned int first_mb_in_slice;
unsigned int pps_id;
int num_ref_idx_active_override_flag;
unsigned int slice_type, tmp, i, j;
int default_ref_list_done = 0;
... | static int decode_slice_header(H264Context *h, H264Context *h0) {
MpegEncContext *const s = &h->s;
MpegEncContext *const s0 = &h0->s;
unsigned int first_mb_in_slice;
unsigned int pps_id;
int num_ref_idx_active_override_flag;
unsigned int slice_type, tmp, i, j;
int default_ref_list_done = 0;
... | static int decode_slice_header(H264Context *h, H264Context *h0) {
MpegEncContext *const s = &h->s;
MpegEncContext *const s0 = &h0->s;
unsigned int first_mb_in_slice;
unsigned int pps_id;
int num_ref_idx_active_override_flag;
unsigned int slice_type, tmp, i, j;
int default_ref_list_done = 0;
... | static int decode_slice_header(H264Context *h, H264Context *h0) {
MpegEncContext *const s = &h->s;
MpegEncContext *const s0 = &h0->s;
unsigned int first_mb_in_slice;
unsigned int pps_id;
int num_ref_idx_active_override_flag;
unsigned int slice_type, tmp, i, j;
int default_ref_list_done = 0;
... | static int decode_slice_header(H264Context *h, H264Context *h0) {
if (h->slice_type_nos != AV_PICTURE_TYPE_I) {
if (num_ref_idx_active_override_flag) {
if (h->slice_type_nos == AV_PICTURE_TYPE_B) {
} else {
max[1] = 31;
}
}
if (h->ref_count... | static int decode_slice_header(H264Context *h, H264Context *h0) {
if (h->slice_type_nos != AV_PICTURE_TYPE_I) {
if (num_ref_idx_active_override_flag) {
if (h->slice_type_nos == AV_PICTURE_TYPE_B) {
} else {
h->ref_count[1] = 1;
}
}
if (h->r... | static int decode_slice_header(H264Context *h, H264Context *h0) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (h->slice_type_nos != AV_PICTURE_TYPE_I) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (num_ref_idx_active_override_flag) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
... | static int decode_slice_header(H264Context *h, H264Context *h0) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (h->slice_type_nos != AV_PICTURE_TYPE_I) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (num_ref_idx_active_override_flag) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
... | static int decode_slice_header(H264Context *h, H264Context *h0) {
if (h->slice_type_nos != AV_PICTURE_TYPE_I) {
if (num_ref_idx_active_override_flag) {
if (h->slice_type_nos == AV_PICTURE_TYPE_B) {
} else {
- max[1] = 31;
+ h->ref_count[1] = 1;
... |
CVE-2013-0851 | FFmpeg | https://github.com/FFmpeg/FFmpeg | libavcodec/eamad.c | decode_frame | static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt) {
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
const uint8_t *buf_end = buf+buf_size;
MadContext *s = avctx->priv_data;
int width, height;
int chunk_type;
int inter;
if (buf_size ... | static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt) {
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
const uint8_t *buf_end = buf+buf_size;
MadContext *s = avctx->priv_data;
int width, height;
int chunk_type;
int inter;
if (buf_size ... | static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt) {
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
const uint8_t *buf_end = buf+buf_size;
MadContext *t = avctx->priv_data;
MpegEncContext *s = &t->s;
int chunk_type;
int inter;
if (b... | static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt) {
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
const uint8_t *buf_end = buf+buf_size;
MadContext *t = avctx->priv_data;
MpegEncContext *s = &t->s;
int chunk_type;
int inter;
if (b... | static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt) {
int buf_size = avpkt->size;
MadContext *s = avctx->priv_data;
int inter;
if (buf_size < 17) {
av_log(avctx, AV_LOG_ERROR, "Input buffer too small\n");
return -1;
}
chunk_type = AV_RL32(&... | static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt) {
int buf_size = avpkt->size;
MadContext *s = avctx->priv_data;
int inter;
if (buf_size < 26) {
av_log(avctx, AV_LOG_ERROR, "Input buffer too small\n");
return -1;
}
chunk_type = AV_RL32(&... | static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
int buf_size = avpkt->size;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
MadContext *t = avctx->priv_data;
MpegEncContext *s = &t->s;
/* PLACEHOLDER: DO NO... | static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
int buf_size = avpkt->size;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
MadContext *t = avctx->priv_data;
MpegEncContext *s = &t->s;
/* PLACEHOLDER: DO NO... | static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt) {
int buf_size = avpkt->size;
MadContext *s = avctx->priv_data;
int inter;
- if (buf_size < 17) {
+ if (buf_size < 26) {
av_log(avctx, AV_LOG_ERROR, "Input buffer too small\n");
return -1;... |
CVE-2013-0853 | FFmpeg | https://github.com/FFmpeg/FFmpeg | libavcodec/wavpack.c | wavpack_decode_frame | static int wavpack_decode_frame(AVCodecContext *avctx, void *data, int *got_frame_ptr, AVPacket *avpkt) {
WavpackContext *s = avctx->priv_data;
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
int frame_size, ret, frame_flags;
int samplecount = 0;
s->block = 0;
s->ch_offset = 0;... | static int wavpack_decode_frame(AVCodecContext *avctx, void *data, int *got_frame_ptr, AVPacket *avpkt) {
WavpackContext *s = avctx->priv_data;
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
int frame_size, ret, frame_flags;
int samplecount = 0;
s->block = 0;
s->ch_offset = 0;... | static int wavpack_decode_frame(AVCodecContext *avctx, void *data, int *got_frame_ptr, AVPacket *avpkt) {
WavpackContext *s = avctx->priv_data;
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
int frame_size, ret, frame_flags;
int samplecount = 0;
s->block = 0;
s->ch_offset = 0;... | static int wavpack_decode_frame(AVCodecContext *avctx, void *data, int *got_frame_ptr, AVPacket *avpkt) {
WavpackContext *s = avctx->priv_data;
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
int frame_size, ret, frame_flags;
int samplecount = 0;
s->block = 0;
s->ch_offset = 0;... | static int wavpack_decode_frame(AVCodecContext *avctx, void *data, int *got_frame_ptr, AVPacket *avpkt) {
WavpackContext *s = avctx->priv_data;
const uint8_t *buf = avpkt->data;
if (s->mkv_mode) {
s->samples = AV_RL32(buf); buf += 4;
} else {
if (s->multichannel) {
s->samples... | static int wavpack_decode_frame(AVCodecContext *avctx, void *data, int *got_frame_ptr, AVPacket *avpkt) {
WavpackContext *s = avctx->priv_data;
const uint8_t *buf = avpkt->data;
if (s->mkv_mode) {
s->samples = AV_RL32(buf); buf += 4;
} else {
if (s->multichannel) {
s->samples... | static int wavpack_decode_frame(AVCodecContext *avctx, void *data, int *got_frame_ptr, AVPacket *avpkt) {
WavpackContext *s = avctx->priv_data;
const uint8_t *buf = avpkt->data;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (s->mkv_mode) {
s->samples = AV_RL32(buf); buf += 4;
/* PLACEHOLD... | static int wavpack_decode_frame(AVCodecContext *avctx, void *data, int *got_frame_ptr, AVPacket *avpkt) {
WavpackContext *s = avctx->priv_data;
const uint8_t *buf = avpkt->data;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (s->mkv_mode) {
s->samples = AV_RL32(buf); buf += 4;
/* PLACEHOLD... | static int wavpack_decode_frame(AVCodecContext *avctx, void *data, int *got_frame_ptr, AVPacket *avpkt) {
WavpackContext *s = avctx->priv_data;
const uint8_t *buf = avpkt->data;
if (s->mkv_mode) {
s->samples = AV_RL32(buf); buf += 4;
} else {
if (s->multichannel) {
s-... |
CVE-2013-0854 | FFmpeg | https://github.com/FFmpeg/FFmpeg | libavcodec/mjpegdec.c | mjpeg_decode_scan_progressive_ac | static int mjpeg_decode_scan_progressive_ac(MJpegDecodeContext *s, int ss, int se, int Ah, int Al) {
int mb_x, mb_y;
int EOBRUN = 0;
int c = s->comp_index[0];
uint8_t *data = s->picture.data[c];
int linesize = s->linesize[c];
int last_scan = 0;
int16_t *quant_matrix = s->quant_matrixes[s->qu... | static int mjpeg_decode_scan_progressive_ac(MJpegDecodeContext *s, int ss, int se, int Ah, int Al) {
int mb_x, mb_y;
int EOBRUN = 0;
int c = s->comp_index[0];
uint8_t *data = s->picture.data[c];
int linesize = s->linesize[c];
int last_scan = 0;
int16_t *quant_matrix = s->quant_matrixes[s->qu... | static int mjpeg_decode_scan_progressive_ac(MJpegDecodeContext *s, int ss, int se, int Ah, int Al) {
int mb_x, mb_y;
int EOBRUN = 0;
int c = s->comp_index[0];
uint8_t *data = s->picture.data[c];
int linesize = s->linesize[c];
int last_scan = 0;
int16_t *quant_matrix = s->quant_matrixes[s->qu... | static int mjpeg_decode_scan_progressive_ac(MJpegDecodeContext *s, int ss, int se, int Ah, int Al) {
int mb_x, mb_y;
int EOBRUN = 0;
int c = s->comp_index[0];
uint8_t *data = s->picture.data[c];
int linesize = s->linesize[c];
int last_scan = 0;
int16_t *quant_matrix = s->quant_matrixes[s->qu... | static int mjpeg_decode_scan_progressive_ac(MJpegDecodeContext *s, int ss, int se, int Ah, int Al) {
int16_t *quant_matrix = s->quant_matrixes[s->quant_index[c]];
if (!Al) {
s->coefs_finished[c] |= (1LL << (se + 1)) - (1LL << ss);
last_scan = !~s->coefs_finished[c];
}
for (mb_y = 0; mb_y... | static int mjpeg_decode_scan_progressive_ac(MJpegDecodeContext *s, int ss, int se, int Ah, int Al) {
int16_t *quant_matrix = s->quant_matrixes[s->quant_index[c]];
if (se > 63) {
av_log(s->avctx, AV_LOG_ERROR, "SE %d is too large\n", se);
return AVERROR_VALIDDATA;
}
if (!Al) {
s->... | static int mjpeg_decode_scan_progressive_ac(MJpegDecodeContext *s, int ss, int se, int Ah, int Al) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
int16_t *quant_matrix = s->quant_matrixes[s->quant_index[c]];
if (!Al) {
s->coefs_finished[c] |= (1LL << (se + 1)) - (1LL << ss);
last_scan = !~s... | static int mjpeg_decode_scan_progressive_ac(MJpegDecodeContext *s, int ss, int se, int Ah, int Al) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
int16_t *quant_matrix = s->quant_matrixes[s->quant_index[c]];
if (se > 63) {
av_log(s->avctx, AV_LOG_ERROR, "SE %d is too large\n", se);
return A... | static int mjpeg_decode_scan_progressive_ac(MJpegDecodeContext *s, int ss, int se, int Ah, int Al) {
int16_t *quant_matrix = s->quant_matrixes[s->quant_index[c]];
+ if (se > 63) {
+ av_log(s->avctx, AV_LOG_ERROR, "SE %d is too large\n", se);
+ return AVERROR_VALIDDATA;
+ }
if (!Al) {
... |
CVE-2013-0855 | FFmpeg | https://github.com/FFmpeg/FFmpeg | libavcodec/alac.c | allocate_buffers | static int allocate_buffers(ALACContext *alac) {
int ch;
int buf_size = alac->max_samples_per_frame * sizeof(int32_t);
for (ch = 0; ch < FFM(alac->channels, 2); ch++) {
FF_ALLOC_OR_GOTO(alac->avctx, alac->predict_error_buffer[ch], buf_size, buf_alloc_fail);
alac->direct_output = alac->sample... | static int allocate_buffers(ALACContext *alac) {
int ch;
int buf_size;
if (alac->max_samples_per_frame > T_MAX / sizeof(int32_t)) {
goto buf_alloc_fail;
}
buf_size = alac->max_samples_per_frame * sizeof(int32_t);
for (ch = 0; ch < FFM(alac->channels, 2); ch++) {
FF_ALLOC_OR_GOTO(... | static int allocate_buffers(ALACContext *alac) {
int ch;
int buf_size = alac->max_samples_per_frame * sizeof(int32_t);
for (ch = 0; ch < FFM(alac->channels, 2); ch++) {
FF_ALLOC_OR_GOTO(alac->avctx, alac->predict_error_buffer[ch], buf_size, buf_alloc_fail);
alac->direct_output = alac->sample... | static int allocate_buffers(ALACContext *alac) {
int ch;
int buf_size;
if (alac->max_samples_per_frame > T_MAX / sizeof(int32_t)) {
goto buf_alloc_fail;
}
buf_size = alac->max_samples_per_frame * sizeof(int32_t);
for (ch = 0; ch < FFM(alac->channels, 2); ch++) {
FF_ALLOC_OR_GOTO(... | static int allocate_buffers(ALACContext *alac) {
int ch;
int buf_size = alac->max_samples_per_frame * sizeof(int32_t);
for (ch = 0; ch < FFM(alac->channels, 2); ch++) {
FF_ALLOC_OR_GOTO(alac->avctx, alac->predict_error_buffer[ch], buf_size, buf_alloc_fail);
if (!alac->direct_output) {
... | static int allocate_buffers(ALACContext *alac) {
int ch;
int buf_size;
if (alac->max_samples_per_frame > T_MAX / sizeof(int32_t)) {
goto buf_alloc_fail;
}
buf_size = alac->max_samples_per_frame * sizeof(int32_t);
for (ch = 0; ch < FFM(alac->channels, 2); ch++) {
FF_ALLOC_OR_GOTO(... | static int allocate_buffers(ALACContext *alac) {
int ch;
int buf_size = alac->max_samples_per_frame * sizeof(int32_t);
for (ch = 0; ch < FFM(alac->channels, 2); ch++) {
FF_ALLOC_OR_GOTO(alac->avctx, alac->predict_error_buffer[ch], buf_size, buf_alloc_fail);
/* PLACEHOLDER: DO NOT DELETE THIS COM... | static int allocate_buffers(ALACContext *alac) {
int ch;
int buf_size;
if (alac->max_samples_per_frame > T_MAX / sizeof(int32_t)) {
goto buf_alloc_fail;
}
buf_size = alac->max_samples_per_frame * sizeof(int32_t);
for (ch = 0; ch < FFM(alac->channels, 2); ch++) {
FF_ALLOC_OR_GOTO(... | static int allocate_buffers(ALACContext *alac) {
int ch;
- int buf_size = alac->max_samples_per_frame * sizeof(int32_t);
+ int buf_size;
+ if (alac->max_samples_per_frame > T_MAX / sizeof(int32_t)) {
+ goto buf_alloc_fail;
+ }
+ buf_size = alac->max_samples_per_frame * sizeof(int32_t);
... |
CVE-2013-0856 | FFmpeg | https://github.com/FFmpeg/FFmpeg | libavcodec/alac.c | lpc_prediction | static void lpc_prediction(int32_t *error_buffer, int32_t *buffer_out, int nb_samples, int bps, int16_t *lpc_coefs, int lpc_order, int lpc_quant) {
int i;
int32_t *pred = buffer_out;
*buffer_out = *error_buffer;
if (nb_samples <= 1) {
return;
}
if (!lpc_order) {
memcpy(&buffer_ou... | static void lpc_prediction(int32_t *error_buffer, int32_t *buffer_out, int nb_samples, int bps, int16_t *lpc_coefs, int lpc_order, int lpc_quant) {
int i;
int32_t *pred = buffer_out;
*buffer_out = *error_buffer;
if (nb_samples <= 1) {
return;
}
if (!lpc_order) {
memcpy(&buffer_ou... | static void lpc_prediction(int32_t *error_buffer, int32_t *buffer_out, int nb_samples, int bps, int16_t *lpc_coefs, int lpc_order, int lpc_quant) {
int i;
int32_t *pred = buffer_out;
*buffer_out = *error_buffer;
if (nb_samples <= 1) {
return;
}
if (!lpc_order) {
memcpy(&buffer_ou... | static void lpc_prediction(int32_t *error_buffer, int32_t *buffer_out, int nb_samples, int bps, int16_t *lpc_coefs, int lpc_order, int lpc_quant) {
int i;
int32_t *pred = buffer_out;
*buffer_out = *error_buffer;
if (nb_samples <= 1) {
return;
}
if (!lpc_order) {
memcpy(&buffer_ou... | static void lpc_prediction(int32_t *error_buffer, int32_t *buffer_out, int nb_samples, int bps, int16_t *lpc_coefs, int lpc_order, int lpc_quant) {
if (nb_samples <= 1) {
return;
}
if (!lpc_order) {
return;
}
if (lpc_order == 31) {
return;
}
for (i = 1; i <= lpc_order... | static void lpc_prediction(int32_t *error_buffer, int32_t *buffer_out, int nb_samples, int bps, int16_t *lpc_coefs, int lpc_order, int lpc_quant) {
if (nb_samples <= 1) {
return;
}
if (!lpc_order) {
return;
}
if (lpc_order == 31) {
return;
}
for (i = 1; i <= lpc_order... | static void lpc_prediction(int32_t *error_buffer, int32_t *buffer_out, int nb_samples, int bps, int16_t *lpc_coefs, int lpc_order, int lpc_quant) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (nb_samples <= 1) {
return;
}
if (!lpc_order) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
... | static void lpc_prediction(int32_t *error_buffer, int32_t *buffer_out, int nb_samples, int bps, int16_t *lpc_coefs, int lpc_order, int lpc_quant) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (nb_samples <= 1) {
return;
}
if (!lpc_order) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
... | static void lpc_prediction(int32_t *error_buffer, int32_t *buffer_out, int nb_samples, int bps, int16_t *lpc_coefs, int lpc_order, int lpc_quant) {
if (nb_samples <= 1) {
return;
}
if (!lpc_order) {
return;
}
if (lpc_order == 31) {
return;
}
- for (i = 1; i <... |
CVE-2013-0857 | FFmpeg | https://github.com/FFmpeg/FFmpeg | libavcodec/iff.c | decode_frame_ilbm | static int decode_frame_ilbm(AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt) {
IffContext *s = avctx->priv_data;
const uint8_t *buf = avpkt->size >= 2 ? avpkt->data + AV_RB16(avpkt->data) : NULL;
const int buf_size = avpkt->size >= 2 ? avpkt->size - AV_RB16(avpkt->data) : 0;
const ui... | static int decode_frame_ilbm(AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt) {
IffContext *s = avctx->priv_data;
const uint8_t *buf = avpkt->size >= 2 ? avpkt->data + AV_RB16(avpkt->data) : NULL;
const int buf_size = avpkt->size >= 2 ? avpkt->size - AV_RB16(avpkt->data) : 0;
const ui... | static int decode_frame_ilbm(AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt) {
IffContext *s = avctx->priv_data;
const uint8_t *buf = avpkt->size >= 2 ? avpkt->data + AV_RB16(avpkt->data) : NULL;
const int buf_size = avpkt->size >= 2 ? avpkt->size - AV_RB16(avpkt->data) : 0;
const ui... | static int decode_frame_ilbm(AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt) {
IffContext *s = avctx->priv_data;
const uint8_t *buf = avpkt->size >= 2 ? avpkt->data + AV_RB16(avpkt->data) : NULL;
const int buf_size = avpkt->size >= 2 ? avpkt->size - AV_RB16(avpkt->data) : 0;
const ui... | static int decode_frame_ilbm(AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt) {
IffContext *s = avctx->priv_data;
const uint8_t *buf = avpkt->size >= 2 ? avpkt->data + AV_RB16(avpkt->data) : NULL;
const int buf_size = avpkt->size >= 2 ? avpkt->size - AV_RB16(avpkt->data) : 0;
const ui... | static int decode_frame_ilbm(AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt) {
IffContext *s = avctx->priv_data;
const uint8_t *buf = avpkt->size >= 2 ? avpkt->data + AV_RB16(avpkt->data) : NULL;
const int buf_size = avpkt->size >= 2 ? avpkt->size - AV_RB16(avpkt->data) : 0;
const ui... | static int decode_frame_ilbm(AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt) {
IffContext *s = avctx->priv_data;
const uint8_t *buf = avpkt->size >= 2 ? avpkt->data + AV_RB16(avpkt->data) : NULL;
const int buf_size = avpkt->size >= 2 ? avpkt->size - AV_RB16(avpkt->data) : 0;
const ui... | static int decode_frame_ilbm(AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt) {
IffContext *s = avctx->priv_data;
const uint8_t *buf = avpkt->size >= 2 ? avpkt->data + AV_RB16(avpkt->data) : NULL;
const int buf_size = avpkt->size >= 2 ? avpkt->size - AV_RB16(avpkt->data) : 0;
const ui... | static int decode_frame_ilbm(AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt) {
IffContext *s = avctx->priv_data;
const uint8_t *buf = avpkt->size >= 2 ? avpkt->data + AV_RB16(avpkt->data) : NULL;
const int buf_size = avpkt->size >= 2 ? avpkt->size - AV_RB16(avpkt->data) : 0;
con... |
CVE-2013-0859 | FFmpeg | https://github.com/FFmpeg/FFmpeg | libavcodec/tiff.c | add_doubles_metadata | static int add_doubles_metadata(int count, const char *name, const char *sep, TiffContext *s) {
char *ap;
int i;
double *dp;
if (count >= T_MAX / sizeof(int64_t)) {
return AVERROR_VALIDDATA;
}
if (bytestream2_get_bytes_left(&s->gb) < count * sizeof(int64_t)) {
return AVERROR_VALI... | static int add_doubles_metadata(int count, const char *name, const char *sep, TiffContext *s) {
char *ap;
int i;
double *dp;
if (count >= T_MAX / sizeof(int64_t) || count <= 0) {
return AVERROR_VALIDDATA;
}
if (bytestream2_get_bytes_left(&s->gb) < count * sizeof(int64_t)) {
retur... | static int add_doubles_metadata(int count, const char *name, const char *sep, TiffContext *s) {
char *ap;
int i;
double *dp;
if (count >= T_MAX / sizeof(int64_t)) {
return AVERROR_VALIDDATA;
}
if (bytestream2_get_bytes_left(&s->gb) < count * sizeof(int64_t)) {
return AVERROR_VALI... | static int add_doubles_metadata(int count, const char *name, const char *sep, TiffContext *s) {
char *ap;
int i;
double *dp;
if (count >= T_MAX / sizeof(int64_t) || count <= 0) {
return AVERROR_VALIDDATA;
}
if (bytestream2_get_bytes_left(&s->gb) < count * sizeof(int64_t)) {
retur... | static int add_doubles_metadata(int count, const char *name, const char *sep, TiffContext *s) {
double *dp;
if (count >= T_MAX / sizeof(int64_t)) {
return AVERROR_VALIDDATA;
}
if (bytestream2_get_bytes_left(&s->gb) < count * sizeof(int64_t)) {
return AVERROR_VALIDDATA;
}
dp = av_... | static int add_doubles_metadata(int count, const char *name, const char *sep, TiffContext *s) {
double *dp;
if (count >= T_MAX / sizeof(int64_t) || count <= 0) {
return AVERROR_VALIDDATA;
}
if (bytestream2_get_bytes_left(&s->gb) < count * sizeof(int64_t)) {
return AVERROR_VALIDDATA;
... | static int add_doubles_metadata(int count, const char *name, const char *sep, TiffContext *s) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
double *dp;
if (count >= T_MAX / sizeof(int64_t)) {
return AVERROR_VALIDDATA;
}
if (bytestream2_get_bytes_left(&s->gb) < count * sizeof(int64_t)) {
... | static int add_doubles_metadata(int count, const char *name, const char *sep, TiffContext *s) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
double *dp;
if (count >= T_MAX / sizeof(int64_t) || count <= 0) {
return AVERROR_VALIDDATA;
}
if (bytestream2_get_bytes_left(&s->gb) < count * sizeof(... | static int add_doubles_metadata(int count, const char *name, const char *sep, TiffContext *s) {
double *dp;
- if (count >= T_MAX / sizeof(int64_t)) {
+ if (count >= T_MAX / sizeof(int64_t) || count <= 0) {
return AVERROR_VALIDDATA;
}
if (bytestream2_get_bytes_left(&s->gb) < count * sizeof... |
CVE-2013-0859 | FFmpeg | https://github.com/FFmpeg/FFmpeg | libavcodec/tiff.c | add_shorts_metadata | static int add_shorts_metadata(int count, const char *name, const char *sep, TiffContext *s) {
char *ap;
int i;
int16_t *sp;
if (count >= T_MAX / sizeof(int16_t)) {
return AVERROR_VALIDDATA;
}
if (bytestream2_get_bytes_left(&s->gb) < count * sizeof(int16_t)) {
return AVERROR_VALI... | static int add_shorts_metadata(int count, const char *name, const char *sep, TiffContext *s) {
char *ap;
int i;
int16_t *sp;
if (count >= T_MAX / sizeof(int16_t) || count <= 0) {
return AVERROR_VALIDDATA;
}
if (bytestream2_get_bytes_left(&s->gb) < count * sizeof(int16_t)) {
retur... | static int add_shorts_metadata(int count, const char *name, const char *sep, TiffContext *s) {
char *ap;
int i;
int16_t *sp;
if (count >= T_MAX / sizeof(int16_t)) {
return AVERROR_VALIDDATA;
}
if (bytestream2_get_bytes_left(&s->gb) < count * sizeof(int16_t)) {
return AVERROR_VALI... | static int add_shorts_metadata(int count, const char *name, const char *sep, TiffContext *s) {
char *ap;
int i;
int16_t *sp;
if (count >= T_MAX / sizeof(int16_t) || count <= 0) {
return AVERROR_VALIDDATA;
}
if (bytestream2_get_bytes_left(&s->gb) < count * sizeof(int16_t)) {
retur... | static int add_shorts_metadata(int count, const char *name, const char *sep, TiffContext *s) {
int16_t *sp;
if (count >= T_MAX / sizeof(int16_t)) {
return AVERROR_VALIDDATA;
}
if (bytestream2_get_bytes_left(&s->gb) < count * sizeof(int16_t)) {
return AVERROR_VALIDDATA;
}
sp = av_... | static int add_shorts_metadata(int count, const char *name, const char *sep, TiffContext *s) {
int16_t *sp;
if (count >= T_MAX / sizeof(int16_t) || count <= 0) {
return AVERROR_VALIDDATA;
}
if (bytestream2_get_bytes_left(&s->gb) < count * sizeof(int16_t)) {
return AVERROR_VALIDDATA;
... | static int add_shorts_metadata(int count, const char *name, const char *sep, TiffContext *s) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
int16_t *sp;
if (count >= T_MAX / sizeof(int16_t)) {
return AVERROR_VALIDDATA;
}
if (bytestream2_get_bytes_left(&s->gb) < count * sizeof(int16_t)) {
... | static int add_shorts_metadata(int count, const char *name, const char *sep, TiffContext *s) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
int16_t *sp;
if (count >= T_MAX / sizeof(int16_t) || count <= 0) {
return AVERROR_VALIDDATA;
}
if (bytestream2_get_bytes_left(&s->gb) < count * sizeof(... | static int add_shorts_metadata(int count, const char *name, const char *sep, TiffContext *s) {
int16_t *sp;
- if (count >= T_MAX / sizeof(int16_t)) {
+ if (count >= T_MAX / sizeof(int16_t) || count <= 0) {
return AVERROR_VALIDDATA;
}
if (bytestream2_get_bytes_left(&s->gb) < count * sizeof... |
CVE-2013-0860 | FFmpeg | https://github.com/FFmpeg/FFmpeg | libavcodec/error_resilience.c | ff_er_frame_end | void ff_er_frame_end(MpegEncContext *s) {
int i, mb_x, mb_y, error, error_type, dc_error, mv_error, ac_error;
int distance;
int threshold_part[4] = { 100, 100, 100 };
int threshold = 50;
int is_intra_likely;
int size = s->b8_stride * 2 * s->mb_height;
Picture *pic = s->current_picture_ptr;
... | void ff_er_frame_end(MpegEncContext *s) {
int i, mb_x, mb_y, error, error_type, dc_error, mv_error, ac_error;
int distance;
int threshold_part[4] = { 100, 100, 100 };
int threshold = 50;
int is_intra_likely;
int size = s->b8_stride * 2 * s->mb_height;
Picture *pic = s->current_picture_ptr;
... | void ff_er_frame_end(MpegEncContext *s) {
int i, mb_x, mb_y, error, error_type, dc_error, mv_error, ac_error;
int distance;
int threshold_part[4] = { 100, 100, 100 };
int threshold = 50;
int is_intra_likely;
int size = s->b8_stride * 2 * s->mb_height;
Picture *pic = s->current_picture_ptr;
... | void ff_er_frame_end(MpegEncContext *s) {
int i, mb_x, mb_y, error, error_type, dc_error, mv_error, ac_error;
int distance;
int threshold_part[4] = { 100, 100, 100 };
int threshold = 50;
int is_intra_likely;
int size = s->b8_stride * 2 * s->mb_height;
Picture *pic = s->current_picture_ptr;
... | void ff_er_frame_end(MpegEncContext *s) {
if (!s->err_recognition || s->error_count == 0 || s->avctx->lowres || s->avctx->hwaccel || s->avctx->codec->capabilities&CODEC_CAP_HWACCEL_VDPAU || s->picture_structure != PICT_FRAME
|| s->error_count == 3 * s->mb_width * (s->avctx->skip_top + s->avctx->skip_bot... | void ff_er_frame_end(MpegEncContext *s) {
if (!s->err_recognition || s->error_count == 0 || s->avctx->lowres || s->avctx->hwaccel || s->avctx->codec->capabilities&CODEC_CAP_HWACCEL_VDPAU || s->picture_structure != PICT_FRAME
|| s->error_count == 3 * s->mb_width * (s->avctx->skip_top + s->avctx->skip_bot... | void ff_er_frame_end(MpegEncContext *s) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (!s->err_recognition || s->error_count == 0 || s->avctx->lowres || s->avctx->hwaccel || s->avctx->codec->capabilities&CODEC_CAP_HWACCEL_VDPAU || s->picture_structure != PICT_FRAME
|| s->error_count == 3 * s->m... | void ff_er_frame_end(MpegEncContext *s) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (!s->err_recognition || s->error_count == 0 || s->avctx->lowres || s->avctx->hwaccel || s->avctx->codec->capabilities&CODEC_CAP_HWACCEL_VDPAU || s->picture_structure != PICT_FRAME
|| s->error_count == 3 * s->m... | void ff_er_frame_end(MpegEncContext *s) {
if (!s->err_recognition || s->error_count == 0 || s->avctx->lowres || s->avctx->hwaccel || s->avctx->codec->capabilities&CODEC_CAP_HWACCEL_VDPAU || s->picture_structure != PICT_FRAME
|| s->error_count == 3 * s->mb_width * (s->avctx->skip_top + s->avctx->skip_... |
CVE-2013-0863 | FFmpeg | https://github.com/FFmpeg/FFmpeg | libavcodec/sanm.c | old_codec47 | static int old_codec47(SANMVideoContext *ctx, int top, int left, int width, int height) {
int i, j, seq, compr, new_rot, tbl_pos, skip;
int stride = ctx->pitch;
uint8_t *dst = ((uint8_t*)ctx->frm0) + left + top * stride;
uint8_t *prev1 = (uint8_t*)ctx->frm1;
uint8_t *prev2 = (uint8_t*)ctx->frm2;
... | static int old_codec47(SANMVideoContext *ctx, int top, int left, int width, int height) {
int i, j, seq, compr, new_rot, tbl_pos, skip;
int stride = ctx->pitch;
uint8_t *dst = ((uint8_t*)ctx->frm0) + left + top * stride;
uint8_t *prev1 = (uint8_t*)ctx->frm1;
uint8_t *prev2 = (uint8_t*)ctx->frm2;
... | static int old_codec47(SANMVideoContext *ctx, int top, int left, int width, int height) {
int i, j, seq, compr, new_rot, tbl_pos, skip;
int stride = ctx->pitch;
uint8_t *dst = ((uint8_t*)ctx->frm0) + left + top * stride;
uint8_t *prev1 = (uint8_t*)ctx->frm1;
uint8_t *prev2 = (uint8_t*)ctx->frm2;
... | static int old_codec47(SANMVideoContext *ctx, int top, int left, int width, int height) {
int i, j, seq, compr, new_rot, tbl_pos, skip;
int stride = ctx->pitch;
uint8_t *dst = ((uint8_t*)ctx->frm0) + left + top * stride;
uint8_t *prev1 = (uint8_t*)ctx->frm1;
uint8_t *prev2 = (uint8_t*)ctx->frm2;
... | static int old_codec47(SANMVideoContext *ctx, int top, int left, int width, int height) {
int stride = ctx->pitch;
uint8_t *dst = ((uint8_t*)ctx->frm0) + left + top * stride;
decoded_size = bytestream2_get_le32(&ctx->gb);
bytestream2_skip(&ctx->gb, 8);
if (!seq) {
memset(prev1, 0, ctx->heigh... | static int old_codec47(SANMVideoContext *ctx, int top, int left, int width, int height) {
int stride = ctx->pitch;
uint8_t *dst = ((uint8_t*)ctx->frm0) + left + top * stride;
decoded_size = bytestream2_get_le32(&ctx->gb);
bytestream2_skip(&ctx->gb, 8);
if (decoded_size > height * stride - left - top... | static int old_codec47(SANMVideoContext *ctx, int top, int left, int width, int height) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
int stride = ctx->pitch;
uint8_t *dst = ((uint8_t*)ctx->frm0) + left + top * stride;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
decoded_size = bytestream2_get_le... | static int old_codec47(SANMVideoContext *ctx, int top, int left, int width, int height) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
int stride = ctx->pitch;
uint8_t *dst = ((uint8_t*)ctx->frm0) + left + top * stride;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
decoded_size = bytestream2_get_le... | static int old_codec47(SANMVideoContext *ctx, int top, int left, int width, int height) {
int stride = ctx->pitch;
uint8_t *dst = ((uint8_t*)ctx->frm0) + left + top * stride;
decoded_size = bytestream2_get_le32(&ctx->gb);
bytestream2_skip(&ctx->gb, 8);
+ if (decoded_size > height * stride - left... |
CVE-2013-0864 | FFmpeg | https://github.com/FFmpeg/FFmpeg | libavcodec/gifdec.c | gif_copy_img_rect | static void gif_copy_img_rect(const uint32_t *src, uint32_t *dst, int linesize, int l, int t, int w, int h) {
const int y_start = t * linesize;
const uint32_t *src_px, *src_pr, *src_py = src + y_start, *dst_py = dst + y_start;
const uint32_t *src_pb = src_py + t * linesize;
uint32_t *dst_px;
for (; ... | static void gif_copy_img_rect(const uint32_t *src, uint32_t *dst, int linesize, int l, int t, int w, int h) {
const int y_start = t * linesize;
const uint32_t *src_px, *src_pr, *src_py = src + y_start, *dst_py = dst + y_start;
const uint32_t *src_pb = src_py + h * linesize;
uint32_t *dst_px;
for (; ... | static void gif_copy_img_rect(const uint32_t *src, uint32_t *dst, int linesize, int l, int t, int w, int h) {
const int y_start = t * linesize;
const uint32_t *src_px, *src_pr, *src_py = src + y_start, *dst_py = dst + y_start;
const uint32_t *src_pb = src_py + t * linesize;
uint32_t *dst_px;
for (; ... | static void gif_copy_img_rect(const uint32_t *src, uint32_t *dst, int linesize, int l, int t, int w, int h) {
const int y_start = t * linesize;
const uint32_t *src_px, *src_pr, *src_py = src + y_start, *dst_py = dst + y_start;
const uint32_t *src_pb = src_py + h * linesize;
uint32_t *dst_px;
for (; ... | static void gif_copy_img_rect(const uint32_t *src, uint32_t *dst, int linesize, int l, int t, int w, int h) {
const int y_start = t * linesize;
const uint32_t *src_px, *src_pr, *src_py = src + y_start, *dst_py = dst + y_start;
const uint32_t *src_pb = src_py + t * linesize;
uint32_t *dst_px;
for (; ... | static void gif_copy_img_rect(const uint32_t *src, uint32_t *dst, int linesize, int l, int t, int w, int h) {
const int y_start = t * linesize;
const uint32_t *src_px, *src_pr, *src_py = src + y_start, *dst_py = dst + y_start;
const uint32_t *src_pb = src_py + h * linesize;
uint32_t *dst_px;
for (; ... | static void gif_copy_img_rect(const uint32_t *src, uint32_t *dst, int linesize, int l, int t, int w, int h) {
const int y_start = t * linesize;
const uint32_t *src_px, *src_pr, *src_py = src + y_start, *dst_py = dst + y_start;
const uint32_t *src_pb = src_py + t * linesize;
uint32_t *dst_px;
for (; ... | static void gif_copy_img_rect(const uint32_t *src, uint32_t *dst, int linesize, int l, int t, int w, int h) {
const int y_start = t * linesize;
const uint32_t *src_px, *src_pr, *src_py = src + y_start, *dst_py = dst + y_start;
const uint32_t *src_pb = src_py + h * linesize;
uint32_t *dst_px;
for (; ... | static void gif_copy_img_rect(const uint32_t *src, uint32_t *dst, int linesize, int l, int t, int w, int h) {
const int y_start = t * linesize;
const uint32_t *src_px, *src_pr, *src_py = src + y_start, *dst_py = dst + y_start;
- const uint32_t *src_pb = src_py + t * linesize;
+ const uint32_t *src_pb =... |
CVE-2013-0865 | FFmpeg | https://github.com/FFmpeg/FFmpeg | libavcodec/vqavideo.c | vqa_decode_chunk | static int vqa_decode_chunk(VqaContext *s) {
unsigned int chunk_type;
unsigned int chunk_size;
int byte_skip;
unsigned int index = 0;
int i;
unsigned char r, g, b;
int index_shift;
int res;
int cbf0_chunk = -1;
int cbfz_chunk = -1;
int cbp0_chunk = -1;
int cbpz_chunk = -1... | static int vqa_decode_chunk(VqaContext *s) {
unsigned int chunk_type;
unsigned int chunk_size;
int byte_skip;
unsigned int index = 0;
int i;
unsigned char r, g, b;
int index_shift;
int res;
int cbf0_chunk = -1;
int cbfz_chunk = -1;
int cbp0_chunk = -1;
int cbpz_chunk = -1... | static int vqa_decode_chunk(VqaContext *s) {
unsigned int chunk_type;
unsigned int chunk_size;
int byte_skip;
unsigned int index = 0;
int i;
unsigned char r, g, b;
int index_shift;
int res;
int cbf0_chunk = -1;
int cbfz_chunk = -1;
int cbp0_chunk = -1;
int cbpz_chunk = -1... | static int vqa_decode_chunk(VqaContext *s) {
unsigned int chunk_type;
unsigned int chunk_size;
int byte_skip;
unsigned int index = 0;
int i;
unsigned char r, g, b;
int index_shift;
int res;
int cbf0_chunk = -1;
int cbfz_chunk = -1;
int cbp0_chunk = -1;
int cbpz_chunk = -1... | static int vqa_decode_chunk(VqaContext *s) {
int hibytes = s->decode_buffer_size / 2;
while (bytestream2_get_bytes_left(&s->gb) >= 8) {
chunk_type = bytestream2_get_be32u(&s->gb);
index = bytestream2_tell(&s->gb);
chunk_size = bytestream2_get_be32u(&s->gb);
switch (chunk_type) {
... | static int vqa_decode_chunk(VqaContext *s) {
int hibytes = s->decode_buffer_size / 2;
while (bytestream2_get_bytes_left(&s->gb) >= 8) {
chunk_type = bytestream2_get_be32u(&s->gb);
index = bytestream2_tell(&s->gb);
chunk_size = bytestream2_get_be32u(&s->gb);
switch (chunk_type) {
... | static int vqa_decode_chunk(VqaContext *s) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
int hibytes = s->decode_buffer_size / 2;
while (bytestream2_get_bytes_left(&s->gb) >= 8) {
chunk_type = bytestream2_get_be32u(&s->gb);
index = bytestream2_tell(&s->gb);
chunk_size = bytestream2... | static int vqa_decode_chunk(VqaContext *s) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
int hibytes = s->decode_buffer_size / 2;
while (bytestream2_get_bytes_left(&s->gb) >= 8) {
chunk_type = bytestream2_get_be32u(&s->gb);
index = bytestream2_tell(&s->gb);
chunk_size = bytestream2... | static int vqa_decode_chunk(VqaContext *s) {
int hibytes = s->decode_buffer_size / 2;
while (bytestream2_get_bytes_left(&s->gb) >= 8) {
chunk_type = bytestream2_get_be32u(&s->gb);
index = bytestream2_tell(&s->gb);
chunk_size = bytestream2_get_be32u(&s->gb);
switch (chunk_t... |
CVE-2013-0867 | FFmpeg | https://github.com/FFmpeg/FFmpeg | libavcodec/h264.c | decode_slice_header | static int decode_slice_header(H264Context *h, H264Context *h0) {
MpegEncContext *const s = &h->s;
MpegEncContext *const s0 = &h0->s;
unsigned int first_mb_in_slice;
unsigned int pps_id;
int num_ref_idx_active_override_flag, ret;
unsigned int slice_type, tmp, i, j;
int default_ref_list_done ... | static int decode_slice_header(H264Context *h, H264Context *h0) {
MpegEncContext *const s = &h->s;
MpegEncContext *const s0 = &h0->s;
unsigned int first_mb_in_slice;
unsigned int pps_id;
int num_ref_idx_active_override_flag, ret;
unsigned int slice_type, tmp, i, j;
int default_ref_list_done ... | static int decode_slice_header(H264Context *h, H264Context *h0) {
MpegEncContext *const s = &h->s;
MpegEncContext *const s0 = &h0->s;
unsigned int first_mb_in_slice;
unsigned int pps_id;
int num_ref_idx_active_override_flag, ret;
unsigned int slice_type, tmp, i, j;
int default_ref_list_done ... | static int decode_slice_header(H264Context *h, H264Context *h0) {
MpegEncContext *const s = &h->s;
MpegEncContext *const s0 = &h0->s;
unsigned int first_mb_in_slice;
unsigned int pps_id;
int num_ref_idx_active_override_flag, ret;
unsigned int slice_type, tmp, i, j;
int default_ref_list_done ... | static int decode_slice_header(H264Context *h, H264Context *h0) {
must_reinit = (s->context_initialized && ( 16*h->sps.mb_width != s->avctx->coded_width || 16*h->sps.mb_height * (2 - h->sps.frame_mbs_only_flag) != s->avctx->coded_height
|| s->avctx->bits_per_raw_sample != h->sps.bit_depth_luma ||... | static int decode_slice_header(H264Context *h, H264Context *h0) {
must_reinit = (s->context_initialized && ( 16*h->sps.mb_width != s->avctx->coded_width || 16*h->sps.mb_height * (2 - h->sps.frame_mbs_only_flag) != s->avctx->coded_height
|| s->avctx->bits_per_raw_sample != h->sps.bit_depth_luma ||... | static int decode_slice_header(H264Context *h, H264Context *h0) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
must_reinit = (s->context_initialized && ( 16*h->sps.mb_width != s->avctx->coded_width || 16*h->sps.mb_height * (2 - h->sps.frame_mbs_only_flag) != s->avctx->coded_height
|| s->avct... | static int decode_slice_header(H264Context *h, H264Context *h0) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
must_reinit = (s->context_initialized && ( 16*h->sps.mb_width != s->avctx->coded_width || 16*h->sps.mb_height * (2 - h->sps.frame_mbs_only_flag) != s->avctx->coded_height
|| s->avct... | static int decode_slice_header(H264Context *h, H264Context *h0) {
must_reinit = (s->context_initialized && ( 16*h->sps.mb_width != s->avctx->coded_width || 16*h->sps.mb_height * (2 - h->sps.frame_mbs_only_flag) != s->avctx->coded_height
|| s->avctx->bits_per_raw_sample != h->sps.bit_depth_luma... |
CVE-2013-0873 | FFmpeg | https://github.com/FFmpeg/FFmpeg | libavcodec/shorten.c | read_header | static int read_header(ShortenContext *s) {
int i, ret;
int maxnlpc = 0;
if (get_bits_long(&s->gb, 32) != AV_RB32("ajkg")) {
av_log(s->avctx, AV_LOG_ERROR, "missing shorten magic 'ajkg'\n");
return AVERROR_VALIDDATA;
}
s->lpcqoffset = 0;
s->blocksize = DEFAULT_BLOCK_SIZE;
s->... | static int read_header(ShortenContext *s) {
int i, ret;
int maxnlpc = 0;
if (get_bits_long(&s->gb, 32) != AV_RB32("ajkg")) {
av_log(s->avctx, AV_LOG_ERROR, "missing shorten magic 'ajkg'\n");
return AVERROR_VALIDDATA;
}
s->lpcqoffset = 0;
s->blocksize = DEFAULT_BLOCK_SIZE;
s->... | static int read_header(ShortenContext *s) {
int i, ret;
int maxnlpc = 0;
if (get_bits_long(&s->gb, 32) != AV_RB32("ajkg")) {
av_log(s->avctx, AV_LOG_ERROR, "missing shorten magic 'ajkg'\n");
return -1;
}
s->lpcqoffset = 0;
s->blocksize = DEFAULT_BLOCK_SIZE;
s->nmean = -1;
... | static int read_header(ShortenContext *s) {
int i, ret;
int maxnlpc = 0;
if (get_bits_long(&s->gb, 32) != AV_RB32("ajkg")) {
av_log(s->avctx, AV_LOG_ERROR, "missing shorten magic 'ajkg'\n");
return -1;
}
s->lpcqoffset = 0;
s->blocksize = DEFAULT_BLOCK_SIZE;
s->nmean = -1;
... | static int read_header(ShortenContext *s) {
if (s->channels <= 0 || s->channels > MAX_CHANNELS) {
av_log(s->avctx, AV_LOG_ERROR, "too many channels: %d\n", s->channels);
return AVERROR_VALIDDATA;
}
}
| static int read_header(ShortenContext *s) {
if (s->channels <= 0 || s->channels > MAX_CHANNELS) {
av_log(s->avctx, AV_LOG_ERROR, "too many channels: %d\n", s->channels);
s->channels = 0;
return AVERROR_VALIDDATA;
}
}
| static int read_header(ShortenContext *s) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (s->channels > MAX_CHANNELS) {
av_log(s->avctx, AV_LOG_ERROR, "too many channels: %d\n", s->channels);
return -1;
}
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
}
| static int read_header(ShortenContext *s) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (s->channels > MAX_CHANNELS) {
av_log(s->avctx, AV_LOG_ERROR, "too many channels: %d\n", s->channels);
s->channels = 0;
return -1;
}
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
} | static int read_header(ShortenContext *s) {
if (s->channels <= 0 || s->channels > MAX_CHANNELS) {
av_log(s->avctx, AV_LOG_ERROR, "too many channels: %d\n", s->channels);
+ s->channels = 0;
return AVERROR_VALIDDATA;
}
} |
CVE-2013-0874 | FFmpeg | https://github.com/FFmpeg/FFmpeg | libavcodec/tiff.c | doubles2str | static char *doubles2str(double *dp, int count, const char *sep) {
int i;
char *ap, *ap0;
int component_len;
if (!sep) {
sep = ", ";
}
component_len = 15 + strlen(sep);
ap = av_malloc(component_len * count);
if (!ap) {
return NULL;
}
ap0 = ap;
ap[0] = '\0';
... | static char *doubles2str(double *dp, int count, const char *sep) {
int i;
char *ap, *ap0;
uint64_t component_len;
if (!sep) {
sep = ", ";
}
component_len = 15LL + strlen(sep);
if (count >= (T_MAX - 1)/component_len) {
return NULL;
}
ap = av_malloc(component_len * coun... | static char *doubles2str(double *dp, int count, const char *sep) {
int i;
char *ap, *ap0;
int component_len = 15 + strlen(sep);
if (!sep) {
sep = ", ";
}
ap = av_malloc(component_len * count);
if (!ap) {
return NULL;
}
ap0 = ap;
ap[0] = '\0';
for (i = 0; i < c... | static char *doubles2str(double *dp, int count, const char *sep) {
int i;
char *ap, *ap0;
uint64_t component_len = 15LL + strlen(sep);
if (!sep) {
sep = ", ";
}
if (count >= (T_MAX - 1)/component_len) {
return NULL;
}
ap = av_malloc(component_len * count + 1);
if (!ap... | static char *doubles2str(double *dp, int count, const char *sep) {
char *ap, *ap0;
int component_len;
if (!sep) {
sep = ", ";
}
component_len = 15 + strlen(sep);
ap = av_malloc(component_len * count);
if (!ap) {
return NULL;
}
ap0 = ap;
for (i = 0; i < count; i++)... | static char *doubles2str(double *dp, int count, const char *sep) {
char *ap, *ap0;
uint64_t component_len;
if (!sep) {
sep = ", ";
}
component_len = 15LL + strlen(sep);
if (count >= (T_MAX - 1)/component_len) {
return NULL;
}
ap = av_malloc(component_len * count + 1);
... | static char *doubles2str(double *dp, int count, const char *sep) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
char *ap, *ap0;
int component_len = 15 + strlen(sep);
if (!sep) {
sep = ", ";
}
ap = av_malloc(component_len * count);
if (!ap) {
return NULL;
}
ap0 = ap;
... | static char *doubles2str(double *dp, int count, const char *sep) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
char *ap, *ap0;
uint64_t component_len = 15LL + strlen(sep);
if (!sep) {
sep = ", ";
}
if (count >= (T_MAX - 1)/component_len) {
return NULL;
}
ap = av_malloc(... | static char *doubles2str(double *dp, int count, const char *sep) {
char *ap, *ap0;
- int component_len;
+ uint64_t component_len;
if (!sep) {
sep = ", ";
}
- component_len = 15 + strlen(sep);
- ap = av_malloc(component_len * count);
+ component_len = 15LL + strlen(sep);
+ if (... |
CVE-2013-0874 | FFmpeg | https://github.com/FFmpeg/FFmpeg | libavcodec/tiff.c | shorts2str | static char *shorts2str(int16_t *sp, int count, const char *sep) {
int i;
char *ap, *ap0;
if (!sep) {
sep = ", ";
}
ap = av_malloc((5 + strlen(sep)) * count);
if (!ap) {
return NULL;
}
ap0 = ap;
ap[0] = '\0';
for (i = 0; i < count; i++) {
int l = snprintf(... | static char *shorts2str(int16_t *sp, int count, const char *sep) {
int i;
char *ap, *ap0;
uint64_t component_len;
if (!sep) {
sep = ", ";
}
component_len = 7LL + strlen(sep);
if (count >= (T_MAX - 1)/component_len) {
return NULL;
}
ap = av_malloc(component_len * count... | static char *shorts2str(int16_t *sp, int count, const char *sep) {
int i;
char *ap, *ap0;
if (!sep) {
sep = ", ";
}
ap = av_malloc((5 + strlen(sep)) * count);
if (!ap) {
return NULL;
}
ap0 = ap;
ap[0] = '\0';
for (i = 0; i < count; i++) {
int l = snprintf(... | static char *shorts2str(int16_t *sp, int count, const char *sep) {
int i;
char *ap, *ap0;
uint64_t component_len;
if (!sep) {
sep = ", ";
}
component_len = 7LL + strlen(sep);
if (count >= (T_MAX - 1)/component_len) {
return NULL;
}
ap = av_malloc(component_len * count... | static char *shorts2str(int16_t *sp, int count, const char *sep) {
char *ap, *ap0;
if (!sep) {
sep = ", ";
}
ap = av_malloc((5 + strlen(sep)) * count);
if (!ap) {
return NULL;
}
ap0 = ap;
for (i = 0; i < count; i++) {
int l = snprintf(ap, 5 + strlen(sep), "%d%s", ... | static char *shorts2str(int16_t *sp, int count, const char *sep) {
char *ap, *ap0;
uint64_t component_len;
if (!sep) {
sep = ", ";
}
component_len = 7LL + strlen(sep);
if (count >= (T_MAX - 1)/component_len) {
return NULL;
}
ap = av_malloc(component_len * count + 1);
... | static char *shorts2str(int16_t *sp, int count, const char *sep) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
char *ap, *ap0;
if (!sep) {
sep = ", ";
}
ap = av_malloc((5 + strlen(sep)) * count);
if (!ap) {
return NULL;
}
ap0 = ap;
/* PLACEHOLDER: DO NOT DELETE THIS... | static char *shorts2str(int16_t *sp, int count, const char *sep) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
char *ap, *ap0;
uint64_t component_len;
if (!sep) {
sep = ", ";
}
component_len = 7LL + strlen(sep);
if (count >= (T_MAX - 1)/component_len) {
return NULL;
}
... | static char *shorts2str(int16_t *sp, int count, const char *sep) {
char *ap, *ap0;
+ uint64_t component_len;
if (!sep) {
sep = ", ";
}
- ap = av_malloc((5 + strlen(sep)) * count);
+ component_len = 7LL + strlen(sep);
+ if (count >= (T_MAX - 1)/component_len) {
+ return NULL;
... |
CVE-2013-0876 | FFmpeg | https://github.com/FFmpeg/FFmpeg | libavcodec/sanm.c | old_codec37 | static int old_codec37(SANMVideoContext *ctx, int top, int left, int width, int height) {
int stride = ctx->pitch;
int i, j, k, t;
int skip_run = 0;
int compr, mvoff, seq, flags;
uint32_t decoded_size;
uint8_t *dst, *prev;
compr = bytestream2_get_byte(&ctx->gb);
mvoff = bytestream2_get_b... | static int old_codec37(SANMVideoContext *ctx, int top, int left, int width, int height) {
int stride = ctx->pitch;
int i, j, k, t;
int skip_run = 0;
int compr, mvoff, seq, flags;
uint32_t decoded_size;
uint8_t *dst, *prev;
compr = bytestream2_get_byte(&ctx->gb);
mvoff = bytestream2_get_b... | static int old_codec37(SANMVideoContext *ctx, int top, int left, int width, int height) {
int stride = ctx->pitch;
int i, j, k, t;
int skip_run = 0;
int compr, mvoff, seq, flags;
uint32_t decoded_size;
uint8_t *dst, *prev;
compr = bytestream2_get_byte(&ctx->gb);
mvoff = bytestream2_get_b... | static int old_codec37(SANMVideoContext *ctx, int top, int left, int width, int height) {
int stride = ctx->pitch;
int i, j, k, t;
int skip_run = 0;
int compr, mvoff, seq, flags;
uint32_t decoded_size;
uint8_t *dst, *prev;
compr = bytestream2_get_byte(&ctx->gb);
mvoff = bytestream2_get_b... | static int old_codec37(SANMVideoContext *ctx, int top, int left, int width, int height) {
int stride = ctx->pitch;
decoded_size = bytestream2_get_le32(&ctx->gb);
bytestream2_skip(&ctx->gb, 3);
if (decoded_size > height * stride - left - top * stride) {
decoded_size = height * stride - left - top... | static int old_codec37(SANMVideoContext *ctx, int top, int left, int width, int height) {
int stride = ctx->pitch;
decoded_size = bytestream2_get_le32(&ctx->gb);
bytestream2_skip(&ctx->gb, 3);
if (decoded_size > ctx->height * stride - left - top * stride) {
decoded_size = ctx->height * stride - ... | static int old_codec37(SANMVideoContext *ctx, int top, int left, int width, int height) {
int stride = ctx->pitch;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
decoded_size = bytestream2_get_le32(&ctx->gb);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
bytestream2_skip(&ctx->gb, 3);
if (decoded... | static int old_codec37(SANMVideoContext *ctx, int top, int left, int width, int height) {
int stride = ctx->pitch;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
decoded_size = bytestream2_get_le32(&ctx->gb);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
bytestream2_skip(&ctx->gb, 3);
if (decoded... | static int old_codec37(SANMVideoContext *ctx, int top, int left, int width, int height) {
int stride = ctx->pitch;
decoded_size = bytestream2_get_le32(&ctx->gb);
bytestream2_skip(&ctx->gb, 3);
- if (decoded_size > height * stride - left - top * stride) {
- decoded_size = height * stride - left... |
CVE-2013-0876 | FFmpeg | https://github.com/FFmpeg/FFmpeg | libavcodec/sanm.c | old_codec47 | static int old_codec47(SANMVideoContext *ctx, int top, int left, int width, int height) {
int i, j, seq, compr, new_rot, tbl_pos, skip;
int stride = ctx->pitch;
uint8_t *dst = ((uint8_t*)ctx->frm0) + left + top * stride;
uint8_t *prev1 = (uint8_t*)ctx->frm1;
uint8_t *prev2 = (uint8_t*)ctx->frm2;
... | static int old_codec47(SANMVideoContext *ctx, int top, int left, int width, int height) {
int i, j, seq, compr, new_rot, tbl_pos, skip;
int stride = ctx->pitch;
uint8_t *dst = ((uint8_t*)ctx->frm0) + left + top * stride;
uint8_t *prev1 = (uint8_t*)ctx->frm1;
uint8_t *prev2 = (uint8_t*)ctx->frm2;
... | static int old_codec47(SANMVideoContext *ctx, int top, int left, int width, int height) {
int i, j, seq, compr, new_rot, tbl_pos, skip;
int stride = ctx->pitch;
uint8_t *dst = ((uint8_t*)ctx->frm0) + left + top * stride;
uint8_t *prev1 = (uint8_t*)ctx->frm1;
uint8_t *prev2 = (uint8_t*)ctx->frm2;
... | static int old_codec47(SANMVideoContext *ctx, int top, int left, int width, int height) {
int i, j, seq, compr, new_rot, tbl_pos, skip;
int stride = ctx->pitch;
uint8_t *dst = ((uint8_t*)ctx->frm0) + left + top * stride;
uint8_t *prev1 = (uint8_t*)ctx->frm1;
uint8_t *prev2 = (uint8_t*)ctx->frm2;
... | static int old_codec47(SANMVideoContext *ctx, int top, int left, int width, int height) {
int stride = ctx->pitch;
uint8_t *dst = ((uint8_t*)ctx->frm0) + left + top * stride;
decoded_size = bytestream2_get_le32(&ctx->gb);
bytestream2_skip(&ctx->gb, 8);
if (decoded_size > height * stride - left - top... | static int old_codec47(SANMVideoContext *ctx, int top, int left, int width, int height) {
int stride = ctx->pitch;
uint8_t *dst = ((uint8_t*)ctx->frm0) + left + top * stride;
decoded_size = bytestream2_get_le32(&ctx->gb);
bytestream2_skip(&ctx->gb, 8);
if (decoded_size > ctx->height * stride - left ... | static int old_codec47(SANMVideoContext *ctx, int top, int left, int width, int height) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
int stride = ctx->pitch;
uint8_t *dst = ((uint8_t*)ctx->frm0) + left + top * stride;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
decoded_size = bytestream2_get_le... | static int old_codec47(SANMVideoContext *ctx, int top, int left, int width, int height) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
int stride = ctx->pitch;
uint8_t *dst = ((uint8_t*)ctx->frm0) + left + top * stride;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
decoded_size = bytestream2_get_le... | static int old_codec47(SANMVideoContext *ctx, int top, int left, int width, int height) {
int stride = ctx->pitch;
uint8_t *dst = ((uint8_t*)ctx->frm0) + left + top * stride;
decoded_size = bytestream2_get_le32(&ctx->gb);
bytestream2_skip(&ctx->gb, 8);
- if (decoded_size > height * stride - left... |
CVE-2013-0877 | FFmpeg | https://github.com/FFmpeg/FFmpeg | libavcodec/sanm.c | old_codec37 | static int old_codec37(SANMVideoContext *ctx, int top, int left, int width, int height) {
int stride = ctx->pitch;
int i, j, k, t;
int skip_run = 0;
int compr, mvoff, seq, flags;
uint32_t decoded_size;
uint8_t *dst, *prev;
compr = bytestream2_get_byte(&ctx->gb);
mvoff = bytestream2_get_b... | static int old_codec37(SANMVideoContext *ctx, int top, int left, int width, int height) {
int stride = ctx->pitch;
int i, j, k, t;
int skip_run = 0;
int compr, mvoff, seq, flags;
uint32_t decoded_size;
uint8_t *dst, *prev;
compr = bytestream2_get_byte(&ctx->gb);
mvoff = bytestream2_get_b... | static int old_codec37(SANMVideoContext *ctx, int top, int left, int width, int height) {
int stride = ctx->pitch;
int i, j, k, t;
int skip_run = 0;
int compr, mvoff, seq, flags;
uint32_t decoded_size;
uint8_t *dst, *prev;
compr = bytestream2_get_byte(&ctx->gb);
mvoff = bytestream2_get_b... | static int old_codec37(SANMVideoContext *ctx, int top, int left, int width, int height) {
int stride = ctx->pitch;
int i, j, k, t;
int skip_run = 0;
int compr, mvoff, seq, flags;
uint32_t decoded_size;
uint8_t *dst, *prev;
compr = bytestream2_get_byte(&ctx->gb);
mvoff = bytestream2_get_b... | static int old_codec37(SANMVideoContext *ctx, int top, int left, int width, int height) {
int stride = ctx->pitch;
decoded_size = bytestream2_get_le32(&ctx->gb);
bytestream2_skip(&ctx->gb, 3);
ctx->rotate_code = 0;
if (((seq & 1) || !(flags & 1)) && (compr && compr != 2)) {
rotate_bufs(ctx, ... | static int old_codec37(SANMVideoContext *ctx, int top, int left, int width, int height) {
int stride = ctx->pitch;
decoded_size = bytestream2_get_le32(&ctx->gb);
bytestream2_skip(&ctx->gb, 3);
if (decoded_size > height * stride - left - top * stride) {
decoded_size = height * stride - left - top... | static int old_codec37(SANMVideoContext *ctx, int top, int left, int width, int height) {
int stride = ctx->pitch;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
decoded_size = bytestream2_get_le32(&ctx->gb);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
bytestream2_skip(&ctx->gb, 3);
ctx->rotate... | static int old_codec37(SANMVideoContext *ctx, int top, int left, int width, int height) {
int stride = ctx->pitch;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
decoded_size = bytestream2_get_le32(&ctx->gb);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
bytestream2_skip(&ctx->gb, 3);
if (decoded... | static int old_codec37(SANMVideoContext *ctx, int top, int left, int width, int height) {
int stride = ctx->pitch;
decoded_size = bytestream2_get_le32(&ctx->gb);
bytestream2_skip(&ctx->gb, 3);
+ if (decoded_size > height * stride - left - top * stride) {
+ decoded_size = height * stride - left... |
CVE-2013-0878 | FFmpeg | https://github.com/FFmpeg/FFmpeg | libavcodec/targa.c | advance_line | static uint8_t *advance_line(uint8_t *start, uint8_t *line, int stride, int *y, int h, int interleave) {
*y += interleave;
if (*y < h) {
return line + interleave * stride;
} else {
*y = (*y + 1) & (interleave - 1);
if (*y) {
return start + *y * stride;
} else {
... | static uint8_t *advance_line(uint8_t *start, uint8_t *line, int stride, int *y, int h, int interleave) {
*y += interleave;
if (*y < h) {
return line + interleave * stride;
} else {
*y = (*y + 1) & (interleave - 1);
if (*y && *y < h) {
return start + *y * stride;
}... | static uint8_t *advance_line(uint8_t *start, uint8_t *line, int stride, int *y, int h, int interleave) {
*y += interleave;
if (*y < h) {
return line + interleave * stride;
} else {
*y = (*y + 1) & (interleave - 1);
if (*y) {
return start + *y * stride;
} else {
... | static uint8_t *advance_line(uint8_t *start, uint8_t *line, int stride, int *y, int h, int interleave) {
*y += interleave;
if (*y < h) {
return line + interleave * stride;
} else {
*y = (*y + 1) & (interleave - 1);
if (*y && *y < h) {
return start + *y * stride;
}... | static uint8_t *advance_line(uint8_t *start, uint8_t *line, int stride, int *y, int h, int interleave) {
*y += interleave;
if (*y < h) {
return line + interleave * stride;
} else {
*y = (*y + 1) & (interleave - 1);
if (*y) {
return start + *y * stride;
} else {
... | static uint8_t *advance_line(uint8_t *start, uint8_t *line, int stride, int *y, int h, int interleave) {
*y += interleave;
if (*y < h) {
return line + interleave * stride;
} else {
*y = (*y + 1) & (interleave - 1);
if (*y && *y < h) {
return start + *y * stride;
}... | static uint8_t *advance_line(uint8_t *start, uint8_t *line, int stride, int *y, int h, int interleave) {
*y += interleave;
if (*y < h) {
return line + interleave * stride;
} else {
*y = (*y + 1) & (interleave - 1);
if (*y) {
return start + *y * stride;
} else {
... | static uint8_t *advance_line(uint8_t *start, uint8_t *line, int stride, int *y, int h, int interleave) {
*y += interleave;
if (*y < h) {
return line + interleave * stride;
} else {
*y = (*y + 1) & (interleave - 1);
if (*y && *y < h) {
return start + *y * stride;
}... | static uint8_t *advance_line(uint8_t *start, uint8_t *line, int stride, int *y, int h, int interleave) {
*y += interleave;
if (*y < h) {
return line + interleave * stride;
} else {
*y = (*y + 1) & (interleave - 1);
- if (*y) {
+ if (*y && *y < h) {
return sta... |
CVE-2013-0894 | FFmpeg | https://github.com/FFmpeg/FFmpeg | libavcodec/vorbisdec.c | vorbis_parse_setup_hdr_floors | static int vorbis_parse_setup_hdr_floors(vorbis_context *vc) {
GetBitContext *gb = &vc->gb;
int i,j,k;
vc->floor_count = get_bits(gb, 6) + 1;
vc->floors = av_mallocz(vc->floor_count * sizeof(*vc->floors));
for (i = 0; i < vc->floor_count; ++i) {
vorbis_floor *floor_setup = &vc->floors[i];
... | static int vorbis_parse_setup_hdr_floors(vorbis_context *vc) {
GetBitContext *gb = &vc->gb;
int i,j,k;
vc->floor_count = get_bits(gb, 6) + 1;
vc->floors = av_mallocz(vc->floor_count * sizeof(*vc->floors));
for (i = 0; i < vc->floor_count; ++i) {
vorbis_floor *floor_setup = &vc->floors[i];
... | static int vorbis_parse_setup_hdr_floors(vorbis_context *vc) {
GetBitContext *gb = &vc->gb;
int i,j,k;
vc->floor_count = get_bits(gb, 6) + 1;
vc->floors = av_mallocz(vc->floor_count * sizeof(*vc->floors));
for (i = 0; i < vc->floor_count; ++i) {
vorbis_floor *floor_setup = &vc->floors[i];
... | static int vorbis_parse_setup_hdr_floors(vorbis_context *vc) {
GetBitContext *gb = &vc->gb;
int i,j,k;
vc->floor_count = get_bits(gb, 6) + 1;
vc->floors = av_mallocz(vc->floor_count * sizeof(*vc->floors));
for (i = 0; i < vc->floor_count; ++i) {
vorbis_floor *floor_setup = &vc->floors[i];
... | static int vorbis_parse_setup_hdr_floors(vorbis_context *vc) {
GetBitContext *gb = &vc->gb;
vc->floor_count = get_bits(gb, 6) + 1;
for (i = 0; i < vc->floor_count; ++i) {
floor_setup->floor_type = get_bits(gb, 16);
if (floor_setup->floor_type == 1) {
floor_setup->data.t1.x_list_d... | static int vorbis_parse_setup_hdr_floors(vorbis_context *vc) {
GetBitContext *gb = &vc->gb;
vc->floor_count = get_bits(gb, 6) + 1;
for (i = 0; i < vc->floor_count; ++i) {
floor_setup->floor_type = get_bits(gb, 16);
if (floor_setup->floor_type == 1) {
floor_setup->data.t1.x_list_d... | static int vorbis_parse_setup_hdr_floors(vorbis_context *vc) {
GetBitContext *gb = &vc->gb;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
vc->floor_count = get_bits(gb, 6) + 1;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
for (i = 0; i < vc->floor_count; ++i) {
/* PLACEHOLDER: DO NOT DELETE THI... | static int vorbis_parse_setup_hdr_floors(vorbis_context *vc) {
GetBitContext *gb = &vc->gb;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
vc->floor_count = get_bits(gb, 6) + 1;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
for (i = 0; i < vc->floor_count; ++i) {
/* PLACEHOLDER: DO NOT DELETE THI... | static int vorbis_parse_setup_hdr_floors(vorbis_context *vc) {
GetBitContext *gb = &vc->gb;
vc->floor_count = get_bits(gb, 6) + 1;
for (i = 0; i < vc->floor_count; ++i) {
floor_setup->floor_type = get_bits(gb, 16);
if (floor_setup->floor_type == 1) {
floor_setup->data.t1.x... |
CVE-2013-1914 | glibc | https://github.com/bminor/glibc | sysdeps/posix/getaddrinfo.c | getaddrinfo | int getaddrinfo (const char *name, const char *service, const struct addrinfo *hints, struct addrinfo **pai) {
int i = 0, last_i = 0;
int nresults = 0;
struct addrinfo *p = NULL;
struct gaih_service gaih_service, *pservice;
struct addrinfo local_hints;
if (name != NULL && name[0] == '*' && name[... | int getaddrinfo (const char *name, const char *service, const struct addrinfo *hints, struct addrinfo **pai) {
int i = 0, last_i = 0;
int nresults = 0;
struct addrinfo *p = NULL;
struct gaih_service gaih_service, *pservice;
struct addrinfo local_hints;
if (name != NULL && name[0] == '*' && name[... | int getaddrinfo (const char *name, const char *service, const struct addrinfo *hints, struct addrinfo **pai) {
int i = 0, last_i = 0;
int nresults = 0;
struct addrinfo *p = NULL;
struct gaih_service gaih_service, *pservice;
struct addrinfo local_hints;
if (name != NULL && name[0] == '*' && name[... | int getaddrinfo (const char *name, const char *service, const struct addrinfo *hints, struct addrinfo **pai) {
int i = 0, last_i = 0;
int nresults = 0;
struct addrinfo *p = NULL;
struct gaih_service gaih_service, *pservice;
struct addrinfo local_hints;
if (name != NULL && name[0] == '*' && name[... | int getaddrinfo (const char *name, const char *service, const struct addrinfo *hints, struct addrinfo **pai) {
int nresults = 0;
if (name != NULL && name[0] == '*' && name[1] == 0) {
name = NULL;
}
if (service != NULL && service[0] == '*' && service[1] == 0) {
service = NULL;
}
i... | int getaddrinfo (const char *name, const char *service, const struct addrinfo *hints, struct addrinfo **pai) {
int nresults = 0;
if (name != NULL && name[0] == '*' && name[1] == 0) {
name = NULL;
}
if (service != NULL && service[0] == '*' && service[1] == 0) {
service = NULL;
}
i... | int getaddrinfo (const char *name, const char *service, const struct addrinfo *hints, struct addrinfo **pai) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
int nresults = 0;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (name != NULL && name[0] == '*' && name[1] == 0) {
name = NULL;
}
... | int getaddrinfo (const char *name, const char *service, const struct addrinfo *hints, struct addrinfo **pai) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
int nresults = 0;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (name != NULL && name[0] == '*' && name[1] == 0) {
name = NULL;
}
... | int getaddrinfo (const char *name, const char *service, const struct addrinfo *hints, struct addrinfo **pai) {
int nresults = 0;
if (name != NULL && name[0] == '*' && name[1] == 0) {
name = NULL;
}
if (service != NULL && service[0] == '*' && service[1] == 0) {
service = NULL;
... |
CVE-2013-2007 | QEMU | https://github.com/qemu/qemu | qga/commands-posix.c | qmp_guest_file_open | int64_t qmp_guest_file_open(const char *path, bool has_mode, const char *mode, Error **err) {
FILE *fh;
int fd;
int64_t ret = -1, handle;
if (!has_mode) {
mode = "r";
}
slog("guest-file-open called, filepath: %s, mode: %s", path, mode);
fh = fopen(path, mode);
if (!fh) {
... | int64_t qmp_guest_file_open(const char *path, bool has_mode, const char *mode, Error **err) {
FILE *fh;
Error *local_err = NULL;
int fd;
int64_t ret = -1, handle;
if (!has_mode) {
mode = "r";
}
slog("guest-file-open called, filepath: %s, mode: %s", path, mode);
fh = safe_open_or_... | int64_t qmp_guest_file_open(const char *path, bool has_mode, const char *mode, Error **err) {
FILE *fh;
int fd;
int64_t ret = -1, handle;
if (!has_mode) {
mode = "r";
}
slog("guest-file-open called, filepath: %s, mode: %s", path, mode);
fh = fopen(path, mode);
if (!fh) {
... | int64_t qmp_guest_file_open(const char *path, bool has_mode, const char *mode, Error **err) {
FILE *fh;
Error *local_err = NULL;
int fd;
int64_t ret = -1, handle;
if (!has_mode) {
mode = "r";
}
slog("guest-file-open called, filepath: %s, mode: %s", path, mode);
fh = safe_open_or_... | int64_t qmp_guest_file_open(const char *path, bool has_mode, const char *mode, Error **err) {
FILE *fh;
int fd;
int64_t ret = -1, handle;
if (!has_mode) {
mode = "r";
}
slog("guest-file-open called, filepath: %s, mode: %s", path, mode);
fh = fopen(path, mode);
if (!fh) {
... | int64_t qmp_guest_file_open(const char *path, bool has_mode, const char *mode, Error **err) {
FILE *fh;
Error *local_err = NULL;
int fd;
int64_t ret = -1, handle;
if (!has_mode) {
mode = "r";
}
slog("guest-file-open called, filepath: %s, mode: %s", path, mode);
fh = safe_open_or_... | int64_t qmp_guest_file_open(const char *path, bool has_mode, const char *mode, Error **err) {
FILE *fh;
int fd;
int64_t ret = -1, handle;
if (!has_mode) {
mode = "r";
}
slog("guest-file-open called, filepath: %s, mode: %s", path, mode);
fh = fopen(path, mode);
if (!fh) {
... | int64_t qmp_guest_file_open(const char *path, bool has_mode, const char *mode, Error **err) {
FILE *fh;
Error *local_err = NULL;
int fd;
int64_t ret = -1, handle;
if (!has_mode) {
mode = "r";
}
slog("guest-file-open called, filepath: %s, mode: %s", path, mode);
fh = safe_open_or_... | int64_t qmp_guest_file_open(const char *path, bool has_mode, const char *mode, Error **err) {
FILE *fh;
+ Error *local_err = NULL;
int fd;
int64_t ret = -1, handle;
if (!has_mode) {
mode = "r";
}
slog("guest-file-open called, filepath: %s, mode: %s", path, mode);
- fh = fop... |
CVE-2013-2277 | FFmpeg | https://github.com/FFmpeg/FFmpeg | libavcodec/h264_ps.c | ff_h264_decode_seq_parameter_set | int ff_h264_decode_seq_parameter_set(H264Context *h) {
int profile_idc, level_idc, constraint_set_flags = 0;
unsigned int sps_id;
int i, log2_max_frame_num_minus4;
SPS *sps;
profile_idc= get_bits(&h->gb, 8);
constraint_set_flags |= get_bits1(&h->gb) << 0;
constraint_set_flags |= get_bits1(&h... | int ff_h264_decode_seq_parameter_set(H264Context *h) {
int profile_idc, level_idc, constraint_set_flags = 0;
unsigned int sps_id;
int i, log2_max_frame_num_minus4;
SPS *sps;
profile_idc= get_bits(&h->gb, 8);
constraint_set_flags |= get_bits1(&h->gb) << 0;
constraint_set_flags |= get_bits1(&h... | int ff_h264_decode_seq_parameter_set(H264Context *h) {
MpegEncContext * const s = &h->s;
int profile_idc, level_idc, constraint_set_flags = 0;
unsigned int sps_id;
int i;
SPS *sps;
profile_idc= get_bits(&s->gb, 8);
constraint_set_flags |= get_bits1(&s->gb) << 0;
constraint_set_flags |= g... | int ff_h264_decode_seq_parameter_set(H264Context *h) {
MpegEncContext * const s = &h->s;
int profile_idc, level_idc, constraint_set_flags = 0;
unsigned int sps_id;
int i;
SPS *sps;
profile_idc= get_bits(&s->gb, 8);
constraint_set_flags |= get_bits1(&s->gb) << 0;
constraint_set_flags |= g... | int ff_h264_decode_seq_parameter_set(H264Context *h) {
sps= av_mallocz(sizeof(SPS));
if(sps == NULL) {
return -1;
}
if (sps->profile_idc == 100 || sps->profile_idc == 110 || sps->profile_idc == 122 || sps->profile_idc == 244 || sps->profile_idc == 44 || sps->profile_idc == 83 || sps->profile_idc... | int ff_h264_decode_seq_parameter_set(H264Context *h) {
sps= av_mallocz(sizeof(SPS));
if(sps == NULL) {
return -1;
}
if (sps->profile_idc == 100 || sps->profile_idc == 110 || sps->profile_idc == 122 || sps->profile_idc == 244 || sps->profile_idc == 44 || sps->profile_idc == 83 || sps->profile_idc... | int ff_h264_decode_seq_parameter_set(H264Context *h) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
sps= av_mallocz(sizeof(SPS));
if(sps == NULL) {
return -1;
}
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if(sps->profile_idc == 100 || sps->profile_idc == 110 || sps->profile_idc == 122... | int ff_h264_decode_seq_parameter_set(H264Context *h) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
sps= av_mallocz(sizeof(SPS));
if(sps == NULL) {
return -1;
}
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if(sps->profile_idc == 100 || sps->profile_idc == 110 || sps->profile_idc == 122... | int ff_h264_decode_seq_parameter_set(H264Context *h) {
sps= av_mallocz(sizeof(SPS));
if(sps == NULL) {
return -1;
}
if (sps->profile_idc == 100 || sps->profile_idc == 110 || sps->profile_idc == 122 || sps->profile_idc == 244 || sps->profile_idc == 44 || sps->profile_idc == 83 || sps->profi... |
CVE-2013-2495 | FFmpeg | https://github.com/FFmpeg/FFmpeg | libavformat/iff.c | iff_read_header | static int iff_read_header(AVFormatContext *s) {
IffDemuxContext *iff = s->priv_data;
AVIOContext *pb = s->pb;
AVStream *st;
uint8_t *buf;
uint32_t chunk_id, data_size;
uint32_t screenmode = 0, num, den;
unsigned transparency = 0;
unsigned masking = 0;
uint8_t fmt[16];
int fmt_si... | static int iff_read_header(AVFormatContext *s) {
IffDemuxContext *iff = s->priv_data;
AVIOContext *pb = s->pb;
AVStream *st;
uint8_t *buf;
uint32_t chunk_id, data_size;
uint32_t screenmode = 0, num, den;
unsigned transparency = 0;
unsigned masking = 0;
uint8_t fmt[16];
int fmt_si... | static int iff_read_header(AVFormatContext *s) {
IffDemuxContext *iff = s->priv_data;
AVIOContext *pb = s->pb;
AVStream *st;
uint8_t *buf;
uint32_t chunk_id, data_size;
uint32_t screenmode = 0;
unsigned transparency = 0;
unsigned masking = 0;
uint8_t fmt[16];
int fmt_size;
st... | static int iff_read_header(AVFormatContext *s) {
IffDemuxContext *iff = s->priv_data;
AVIOContext *pb = s->pb;
AVStream *st;
uint8_t *buf;
uint32_t chunk_id, data_size;
uint32_t screenmode = 0;
unsigned transparency = 0;
unsigned masking = 0;
uint8_t fmt[16];
int fmt_size;
st... | static int iff_read_header(AVFormatContext *s) {
AVIOContext *pb = s->pb;
avio_skip(pb, 8);
st->codec->codec_tag = avio_rl32(pb);
while(!url_feof(pb)) {
uint64_t orig_pos;
int res;
const char *metadata_tag = NULL;
chunk_id = avio_rl32(pb);
data_size = avio_rb32(pb... | static int iff_read_header(AVFormatContext *s) {
AVIOContext *pb = s->pb;
avio_skip(pb, 8);
st->codec->codec_tag = avio_rl32(pb);
while(!url_feof(pb)) {
uint64_t orig_pos;
int res;
const char *metadata_tag = NULL;
chunk_id = avio_rl32(pb);
data_size = avio_rb32(pb... | static int iff_read_header(AVFormatContext *s) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
AVIOContext *pb = s->pb;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
avio_skip(pb, 8);
st->codec->codec_tag = avio_rl32(pb);
while(!url_feof(pb)) {
uint64_t orig_pos;
int res;
... | static int iff_read_header(AVFormatContext *s) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
AVIOContext *pb = s->pb;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
avio_skip(pb, 8);
st->codec->codec_tag = avio_rl32(pb);
while(!url_feof(pb)) {
uint64_t orig_pos;
int res;
... | static int iff_read_header(AVFormatContext *s) {
AVIOContext *pb = s->pb;
avio_skip(pb, 8);
st->codec->codec_tag = avio_rl32(pb);
while(!url_feof(pb)) {
uint64_t orig_pos;
int res;
const char *metadata_tag = NULL;
chunk_id = avio_rl32(pb);
data_size = av... |
CVE-2013-2496 | FFmpeg | https://github.com/FFmpeg/FFmpeg | libavcodec/msrledec.c | msrle_decode_8_16_24_32 | static int msrle_decode_8_16_24_32(AVCodecContext *avctx, AVPicture *pic, int depth, GetByteContext *gb) {
uint8_t *output, *output_end;
int p1, p2, line=avctx->height - 1, pos=0, i;
uint16_t pix16;
uint32_t pix32;
unsigned int width= FFABS(pic->linesize[0]) / (depth >> 3);
output = pic->data[0]... | static int msrle_decode_8_16_24_32(AVCodecContext *avctx, AVPicture *pic, int depth, GetByteContext *gb) {
uint8_t *output, *output_end;
int p1, p2, line=avctx->height - 1, pos=0, i;
uint16_t pix16;
uint32_t pix32;
unsigned int width= FFABS(pic->linesize[0]) / (depth >> 3);
output = pic->data[0]... | static int msrle_decode_8_16_24_32(AVCodecContext *avctx, AVPicture *pic, int depth, GetByteContext *gb) {
uint8_t *output, *output_end;
int p1, p2, line=avctx->height - 1, pos=0, i;
uint16_t pix16;
uint32_t pix32;
unsigned int width= FFABS(pic->linesize[0]) / (depth >> 3);
output = pic->data[0]... | static int msrle_decode_8_16_24_32(AVCodecContext *avctx, AVPicture *pic, int depth, GetByteContext *gb) {
uint8_t *output, *output_end;
int p1, p2, line=avctx->height - 1, pos=0, i;
uint16_t pix16;
uint32_t pix32;
unsigned int width= FFABS(pic->linesize[0]) / (depth >> 3);
output = pic->data[0]... | static int msrle_decode_8_16_24_32(AVCodecContext *avctx, AVPicture *pic, int depth, GetByteContext *gb) {
int p1, p2, line=avctx->height - 1, pos=0, i;
unsigned int width= FFABS(pic->linesize[0]) / (depth >> 3);
output = pic->data[0] + (avctx->height - 1) * pic->linesize[0];
output_end = pic->data[0] +... | static int msrle_decode_8_16_24_32(AVCodecContext *avctx, AVPicture *pic, int depth, GetByteContext *gb) {
int p1, p2, line=avctx->height - 1, pos=0, i;
unsigned int width= FFABS(pic->linesize[0]) / (depth >> 3);
output = pic->data[0] + (avctx->height - 1) * pic->linesize[0];
output_end = output + FFABS... | static int msrle_decode_8_16_24_32(AVCodecContext *avctx, AVPicture *pic, int depth, GetByteContext *gb) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
int p1, p2, line=avctx->height - 1, pos=0, i;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
unsigned int width= FFABS(pic->linesize[0]) / (depth >> 3);... | static int msrle_decode_8_16_24_32(AVCodecContext *avctx, AVPicture *pic, int depth, GetByteContext *gb) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
int p1, p2, line=avctx->height - 1, pos=0, i;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
unsigned int width= FFABS(pic->linesize[0]) / (depth >> 3);... | static int msrle_decode_8_16_24_32(AVCodecContext *avctx, AVPicture *pic, int depth, GetByteContext *gb) {
int p1, p2, line=avctx->height - 1, pos=0, i;
unsigned int width= FFABS(pic->linesize[0]) / (depth >> 3);
output = pic->data[0] + (avctx->height - 1) * pic->linesize[0];
- output_end = pic->data... |
CVE-2013-3670 | FFmpeg | https://github.com/FFmpeg/FFmpeg | libavcodec/vmdav.c | rle_unpack | static int rle_unpack(const unsigned char *src, unsigned char *dest, int src_count, int src_size, int dest_len) {
unsigned char *pd;
int i, l;
unsigned char *dest_end = dest + dest_len;
GetByteContext gb;
bytestream2_init(&gb, src, src_size);
pd = dest;
if (src_count & 1) {
if (bytes... | static int rle_unpack(const unsigned char *src, unsigned char *dest, int src_count, int src_size, int dest_len) {
unsigned char *pd;
int i, j, l;
unsigned char *dest_end = dest + dest_len;
GetByteContext gb;
bytestream2_init(&gb, src, src_size);
pd = dest;
if (src_count & 1) {
if (by... | static int rle_unpack(const unsigned char *src, unsigned char *dest, int src_count, int src_size, int dest_len) {
unsigned char *pd;
int i, j, l;
unsigned char *dest_end = dest + dest_len;
GetByteContext gb;
bytestream2_init(&gb, src, src_size);
pd = dest;
if (src_count & 1) {
if (by... | static int rle_unpack(const unsigned char *src, unsigned char *dest, int src_count, int src_size, int dest_len) {
unsigned char *pd;
int i, j, l;
unsigned char *dest_end = dest + dest_len;
GetByteContext gb;
bytestream2_init(&gb, src, src_size);
pd = dest;
if (src_count & 1) {
if (by... | static int rle_unpack(const unsigned char *src, unsigned char *dest, int src_count, int src_size, int dest_len) {
unsigned char *pd;
int i, l;
unsigned char *dest_end = dest + dest_len;
pd = dest;
if (src_count & 1) {
*pd++ = bytestream2_get_byteu(&gb);
}
i = 0;
do {
if (... | static int rle_unpack(const unsigned char *src, unsigned char *dest, int src_count, int src_size, int dest_len) {
unsigned char *pd;
int i, j, l;
unsigned char *dest_end = dest + dest_len;
pd = dest;
if (src_count & 1) {
*pd++ = bytestream2_get_byteu(&gb);
}
i = 0;
do {
i... | static int rle_unpack(const unsigned char *src, unsigned char *dest, int src_count, int src_size, int dest_len) {
unsigned char *pd;
int i, j, l;
unsigned char *dest_end = dest + dest_len;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
pd = dest;
if (src_count & 1) {
/* PLACEHOLDER: DO NOT DE... | static int rle_unpack(const unsigned char *src, unsigned char *dest, int src_count, int src_size, int dest_len) {
unsigned char *pd;
int i, j, l;
unsigned char *dest_end = dest + dest_len;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
pd = dest;
if (src_count & 1) {
/* PLACEHOLDER: DO NOT DE... | static int rle_unpack(const unsigned char *src, unsigned char *dest, int src_count, int src_size, int dest_len) {
unsigned char *pd;
- int i, l;
+ int i, j, l;
unsigned char *dest_end = dest + dest_len;
pd = dest;
if (src_count & 1) {
*pd++ = bytestream2_get_byteu(&gb);
}
i... |
CVE-2013-3672 | FFmpeg | https://github.com/FFmpeg/FFmpeg | libavcodec/mmvideo.c | mm_decode_inter | static int mm_decode_inter(MmContext * s, int half_horiz, int half_vert) {
int data_off = bytestream2_get_le16(&s->gb), y = 0;
GetByteContext data_ptr;
if (bytestream2_get_bytes_left(&s->gb) < data_off) {
return AVERROR_VALIDDATA;
}
bytestream2_init(&data_ptr, s->gb.buffer + data_off, bytest... | static int mm_decode_inter(MmContext * s, int half_horiz, int half_vert) {
int data_off = bytestream2_get_le16(&s->gb), y = 0;
GetByteContext data_ptr;
if (bytestream2_get_bytes_left(&s->gb) < data_off) {
return AVERROR_VALIDDATA;
}
bytestream2_init(&data_ptr, s->gb.buffer + data_off, bytest... | static int mm_decode_inter(MmContext * s, int half_horiz, int half_vert) {
int data_off = bytestream2_get_le16(&s->gb), y = 0;
GetByteContext data_ptr;
if (bytestream2_get_bytes_left(&s->gb) < data_off) {
return AVERROR_VALIDDATA;
}
bytestream2_init(&data_ptr, s->gb.buffer + data_off, bytest... | static int mm_decode_inter(MmContext * s, int half_horiz, int half_vert) {
int data_off = bytestream2_get_le16(&s->gb), y = 0;
GetByteContext data_ptr;
if (bytestream2_get_bytes_left(&s->gb) < data_off) {
return AVERROR_VALIDDATA;
}
bytestream2_init(&data_ptr, s->gb.buffer + data_off, bytest... | static int mm_decode_inter(MmContext * s, int half_horiz, int half_vert) {
while (s->gb.buffer < data_ptr.buffer_start) {
int i, j;
int length = bytestream2_get_byte(&s->gb);
int x = bytestream2_get_byte(&s->gb) + ((length & 0x80) << 1);
length &= 0x7F;
if (length==0) {
... | static int mm_decode_inter(MmContext * s, int half_horiz, int half_vert) {
while (s->gb.buffer < data_ptr.buffer_start) {
int i, j;
int length = bytestream2_get_byte(&s->gb);
int x = bytestream2_get_byte(&s->gb) + ((length & 0x80) << 1);
length &= 0x7F;
if (length==0) {
... | static int mm_decode_inter(MmContext * s, int half_horiz, int half_vert) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
while (s->gb.buffer < data_ptr.buffer_start) {
int i, j;
int length = bytestream2_get_byte(&s->gb);
int x = bytestream2_get_byte(&s->gb) + ((length & 0x80) << 1);
... | static int mm_decode_inter(MmContext * s, int half_horiz, int half_vert) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
while (s->gb.buffer < data_ptr.buffer_start) {
int i, j;
int length = bytestream2_get_byte(&s->gb);
int x = bytestream2_get_byte(&s->gb) + ((length & 0x80) << 1);
... | static int mm_decode_inter(MmContext * s, int half_horiz, int half_vert) {
while (s->gb.buffer < data_ptr.buffer_start) {
int i, j;
int length = bytestream2_get_byte(&s->gb);
int x = bytestream2_get_byte(&s->gb) + ((length & 0x80) << 1);
length &= 0x7F;
if (length==0) ... |
CVE-2013-3673 | FFmpeg | https://github.com/FFmpeg/FFmpeg | libavcodec/gifdec.c | gif_decode_frame | static int gif_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt) {
GifState *s = avctx->priv_data;
int ret;
bytestream2_init(&s->gb, avpkt->data, avpkt->size);
s->frame->pts = avpkt->pts;
s->frame->pkt_pts = avpkt->pts;
s->frame->pkt_dts = avpkt->dts;
av_frame_... | static int gif_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt) {
GifState *s = avctx->priv_data;
int ret;
bytestream2_init(&s->gb, avpkt->data, avpkt->size);
s->frame->pts = avpkt->pts;
s->frame->pkt_pts = avpkt->pts;
s->frame->pkt_dts = avpkt->dts;
av_frame_... | static int gif_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt) {
GifState *s = avctx->priv_data;
AVFrame *picture = data;
int ret;
bytestream2_init(&s->gb, avpkt->data, avpkt->size);
s->picture.pts = avpkt->pts;
s->picture.pkt_pts = avpkt->pts;
s->picture.pkt... | static int gif_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt) {
GifState *s = avctx->priv_data;
AVFrame *picture = data;
int ret;
bytestream2_init(&s->gb, avpkt->data, avpkt->size);
s->picture.pts = avpkt->pts;
s->picture.pkt_pts = avpkt->pts;
s->picture.pkt... | static int gif_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt) {
if (s->keyframe) {
s->keyframe_ok = 0;
if ((ret = gif_read_header1(s)) < 0) {
return ret;
}
if ((ret = av_image_check_size(s->screen_width, s->screen_height, 0, avctx)) < 0) ... | static int gif_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt) {
if (s->keyframe) {
s->keyframe_ok = 0;
s->gce_prev_disposal = GCE_DISPOSAL_NONE;
if ((ret = gif_read_header1(s)) < 0) {
return ret;
}
if ((ret = av_image_check_size(s... | static int gif_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (s->keyframe) {
if ((ret = gif_read_header1(s)) < 0) {
return ret;
}
if ((ret = av_image_check_size(s->screen_width, s->screen_he... | static int gif_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (s->keyframe) {
s->gce_prev_disposal = GCE_DISPOSAL_NONE;
if ((ret = gif_read_header1(s)) < 0) {
return ret;
}
if ((ret =... | static int gif_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt) {
if (s->keyframe) {
s->keyframe_ok = 0;
+ s->gce_prev_disposal = GCE_DISPOSAL_NONE;
if ((ret = gif_read_header1(s)) < 0) {
return ret;
}
if ((ret = av_image_chec... |
CVE-2013-3674 | FFmpeg | https://github.com/FFmpeg/FFmpeg | libavcodec/cdgraphics.c | cdg_decode_frame | static int cdg_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt) {
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
int ret;
uint8_t command, inst;
uint8_t cdg_data[CDG_DATA_SIZE];
AVFrame *frame = data;
CDGraphicsContext *cc = avctx->priv_data;
... | static int cdg_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt) {
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
int ret;
uint8_t command, inst;
uint8_t cdg_data[CDG_DATA_SIZE];
AVFrame *frame = data;
CDGraphicsContext *cc = avctx->priv_data;
... | static int cdg_decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt) {
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
int ret;
uint8_t command, inst;
uint8_t cdg_data[CDG_DATA_SIZE];
AVFrame new_frame;
CDGraphicsContext *cc = avctx->priv_data;
if... | static int cdg_decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt) {
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
int ret;
uint8_t command, inst;
uint8_t cdg_data[CDG_DATA_SIZE];
AVFrame new_frame;
CDGraphicsContext *cc = avctx->priv_data;
if... | static int cdg_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt) {
int buf_size = avpkt->size;
if (buf_size < CDG_MIMUM_PKT_SIZE) {
return AVERROR(EVAL);
}
if (buf_size > CDG_HEADER_SIZE + CDG_DATA_SIZE) {
return AVERROR(EVAL);
}
buf += 2;
bytes... | static int cdg_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt) {
int buf_size = avpkt->size;
if (buf_size < CDG_MIMUM_PKT_SIZE) {
return AVERROR(EVAL);
}
if (buf_size > CDG_HEADER_SIZE + CDG_DATA_SIZE) {
return AVERROR(EVAL);
}
buf += 2;
if (b... | static int cdg_decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
int buf_size = avpkt->size;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (buf_size < CDG_MIMUM_PKT_SIZE) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */... | static int cdg_decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
int buf_size = avpkt->size;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (buf_size < CDG_MIMUM_PKT_SIZE) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */... | static int cdg_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt) {
int buf_size = avpkt->size;
if (buf_size < CDG_MIMUM_PKT_SIZE) {
return AVERROR(EVAL);
}
if (buf_size > CDG_HEADER_SIZE + CDG_DATA_SIZE) {
return AVERROR(EVAL);
}
buf += 2;
... |
CVE-2013-4149 | QEMU | https://github.com/qemu/qemu | hw/net/virtio-net.c | virtio_net_load | static int virtio_net_load(QEMUFile *f, void *opaque, int version_id) {
VirtIONet *n = opaque;
VirtIODevice *vdev = VIRTIO_DEVICE(n);
int ret, i, link_down;
if (version_id < 2 || version_id > VIRTIO_NET_VM_VERSION) {
return -EVAL;
}
ret = virtio_load(vdev, f);
if (ret) {
retu... | static int virtio_net_load(QEMUFile *f, void *opaque, int version_id) {
VirtIONet *n = opaque;
VirtIODevice *vdev = VIRTIO_DEVICE(n);
int ret, i, link_down;
if (version_id < 2 || version_id > VIRTIO_NET_VM_VERSION) {
return -EVAL;
}
ret = virtio_load(vdev, f);
if (ret) {
retu... | static int virtio_net_load(QEMUFile *f, void *opaque, int version_id) {
VirtIONet *n = opaque;
VirtIODevice *vdev = VIRTIO_DEVICE(n);
int ret, i, link_down;
if (version_id < 2 || version_id > VIRTIO_NET_VM_VERSION) {
return -EVAL;
}
ret = virtio_load(vdev, f);
if (ret) {
retu... | static int virtio_net_load(QEMUFile *f, void *opaque, int version_id) {
VirtIONet *n = opaque;
VirtIODevice *vdev = VIRTIO_DEVICE(n);
int ret, i, link_down;
if (version_id < 2 || version_id > VIRTIO_NET_VM_VERSION) {
return -EVAL;
}
ret = virtio_load(vdev, f);
if (ret) {
retu... | static int virtio_net_load(QEMUFile *f, void *opaque, int version_id) {
VirtIONet *n = opaque;
VirtIODevice *vdev = VIRTIO_DEVICE(n);
ret = virtio_load(vdev, f);
qemu_get_buffer(f, n->mac, ETH_ALEN);
n->vqs[0].tx_waiting = qemu_get_be32(f);
virtio_net_set_mrg_rx_bufs(n, qemu_get_be32(f));
if... | static int virtio_net_load(QEMUFile *f, void *opaque, int version_id) {
VirtIONet *n = opaque;
VirtIODevice *vdev = VIRTIO_DEVICE(n);
ret = virtio_load(vdev, f);
qemu_get_buffer(f, n->mac, ETH_ALEN);
n->vqs[0].tx_waiting = qemu_get_be32(f);
virtio_net_set_mrg_rx_bufs(n, qemu_get_be32(f));
if... | static int virtio_net_load(QEMUFile *f, void *opaque, int version_id) {
VirtIONet *n = opaque;
VirtIODevice *vdev = VIRTIO_DEVICE(n);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
ret = virtio_load(vdev, f);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
qemu_get_buffer(f, n->mac, ETH_ALEN);
... | static int virtio_net_load(QEMUFile *f, void *opaque, int version_id) {
VirtIONet *n = opaque;
VirtIODevice *vdev = VIRTIO_DEVICE(n);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
ret = virtio_load(vdev, f);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
qemu_get_buffer(f, n->mac, ETH_ALEN);
... | static int virtio_net_load(QEMUFile *f, void *opaque, int version_id) {
VirtIONet *n = opaque;
VirtIODevice *vdev = VIRTIO_DEVICE(n);
ret = virtio_load(vdev, f);
qemu_get_buffer(f, n->mac, ETH_ALEN);
n->vqs[0].tx_waiting = qemu_get_be32(f);
virtio_net_set_mrg_rx_bufs(n, qemu_get_be32(f));... |
CVE-2013-4150 | QEMU | https://github.com/qemu/qemu | hw/net/virtio-net.c | virtio_net_load | static int virtio_net_load(QEMUFile *f, void *opaque, int version_id) {
VirtIONet *n = opaque;
VirtIODevice *vdev = VIRTIO_DEVICE(n);
int ret, i, link_down;
if (version_id < 2 || version_id > VIRTIO_NET_VM_VERSION) {
return -EVAL;
}
ret = virtio_load(vdev, f);
if (ret) {
retu... | static int virtio_net_load(QEMUFile *f, void *opaque, int version_id) {
VirtIONet *n = opaque;
VirtIODevice *vdev = VIRTIO_DEVICE(n);
int ret, i, link_down;
if (version_id < 2 || version_id > VIRTIO_NET_VM_VERSION) {
return -EVAL;
}
ret = virtio_load(vdev, f);
if (ret) {
retu... | static int virtio_net_load(QEMUFile *f, void *opaque, int version_id) {
VirtIONet *n = opaque;
VirtIODevice *vdev = VIRTIO_DEVICE(n);
int ret, i, link_down;
if (version_id < 2 || version_id > VIRTIO_NET_VM_VERSION) {
return -EVAL;
}
ret = virtio_load(vdev, f);
if (ret) {
retu... | static int virtio_net_load(QEMUFile *f, void *opaque, int version_id) {
VirtIONet *n = opaque;
VirtIODevice *vdev = VIRTIO_DEVICE(n);
int ret, i, link_down;
if (version_id < 2 || version_id > VIRTIO_NET_VM_VERSION) {
return -EVAL;
}
ret = virtio_load(vdev, f);
if (ret) {
retu... | static int virtio_net_load(QEMUFile *f, void *opaque, int version_id) {
VirtIONet *n = opaque;
VirtIODevice *vdev = VIRTIO_DEVICE(n);
ret = virtio_load(vdev, f);
qemu_get_buffer(f, n->mac, ETH_ALEN);
n->vqs[0].tx_waiting = qemu_get_be32(f);
virtio_net_set_mrg_rx_bufs(n, qemu_get_be32(f));
if... | static int virtio_net_load(QEMUFile *f, void *opaque, int version_id) {
VirtIONet *n = opaque;
VirtIODevice *vdev = VIRTIO_DEVICE(n);
ret = virtio_load(vdev, f);
qemu_get_buffer(f, n->mac, ETH_ALEN);
n->vqs[0].tx_waiting = qemu_get_be32(f);
virtio_net_set_mrg_rx_bufs(n, qemu_get_be32(f));
if... | static int virtio_net_load(QEMUFile *f, void *opaque, int version_id) {
VirtIONet *n = opaque;
VirtIODevice *vdev = VIRTIO_DEVICE(n);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
ret = virtio_load(vdev, f);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
qemu_get_buffer(f, n->mac, ETH_ALEN);
... | static int virtio_net_load(QEMUFile *f, void *opaque, int version_id) {
VirtIONet *n = opaque;
VirtIODevice *vdev = VIRTIO_DEVICE(n);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
ret = virtio_load(vdev, f);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
qemu_get_buffer(f, n->mac, ETH_ALEN);
... | static int virtio_net_load(QEMUFile *f, void *opaque, int version_id) {
VirtIONet *n = opaque;
VirtIODevice *vdev = VIRTIO_DEVICE(n);
ret = virtio_load(vdev, f);
qemu_get_buffer(f, n->mac, ETH_ALEN);
n->vqs[0].tx_waiting = qemu_get_be32(f);
virtio_net_set_mrg_rx_bufs(n, qemu_get_be32(f));... |
CVE-2013-4151 | QEMU | https://github.com/qemu/qemu | hw/virtio/virtio.c | virtio_load | int virtio_load(VirtIODevice *vdev, QEMUFile *f) {
int num, i, ret;
uint32_t features;
uint32_t supported_features;
BusState *qbus = qdev_get_parent_bus(DEVICE(vdev));
VirtioBusClass *k = VIRTIO_BUS_GET_CLASS(qbus);
if (k->load_config) {
ret = k->load_config(qbus->parent, f);
if ... | int virtio_load(VirtIODevice *vdev, QEMUFile *f) {
int i, ret;
uint32_t num;
uint32_t features;
uint32_t supported_features;
BusState *qbus = qdev_get_parent_bus(DEVICE(vdev));
VirtioBusClass *k = VIRTIO_BUS_GET_CLASS(qbus);
if (k->load_config) {
ret = k->load_config(qbus->parent, f)... | int virtio_load(VirtIODevice *vdev, QEMUFile *f) {
int num, i, ret;
uint32_t features;
uint32_t supported_features;
BusState *qbus = qdev_get_parent_bus(DEVICE(vdev));
VirtioBusClass *k = VIRTIO_BUS_GET_CLASS(qbus);
if (k->load_config) {
ret = k->load_config(qbus->parent, f);
if ... | int virtio_load(VirtIODevice *vdev, QEMUFile *f) {
int i, ret;
uint32_t num;
uint32_t features;
uint32_t supported_features;
BusState *qbus = qdev_get_parent_bus(DEVICE(vdev));
VirtioBusClass *k = VIRTIO_BUS_GET_CLASS(qbus);
if (k->load_config) {
ret = k->load_config(qbus->parent, f)... | int virtio_load(VirtIODevice *vdev, QEMUFile *f) {
int num, i, ret;
uint32_t features;
BusState *qbus = qdev_get_parent_bus(DEVICE(vdev));
VirtioBusClass *k = VIRTIO_BUS_GET_CLASS(qbus);
if (k->load_config) {
ret = k->load_config(qbus->parent, f);
}
qemu_get_8s(f, &vdev->status);
... | int virtio_load(VirtIODevice *vdev, QEMUFile *f) {
int i, ret;
uint32_t num;
uint32_t features;
BusState *qbus = qdev_get_parent_bus(DEVICE(vdev));
VirtioBusClass *k = VIRTIO_BUS_GET_CLASS(qbus);
if (k->load_config) {
ret = k->load_config(qbus->parent, f);
}
qemu_get_8s(f, &vdev-... | int virtio_load(VirtIODevice *vdev, QEMUFile *f) {
int num, i, ret;
uint32_t features;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
BusState *qbus = qdev_get_parent_bus(DEVICE(vdev));
VirtioBusClass *k = VIRTIO_BUS_GET_CLASS(qbus);
if (k->load_config) {
ret = k->load_config(qbus->parent... | int virtio_load(VirtIODevice *vdev, QEMUFile *f) {
int i, ret;
uint32_t num;
uint32_t features;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
BusState *qbus = qdev_get_parent_bus(DEVICE(vdev));
VirtioBusClass *k = VIRTIO_BUS_GET_CLASS(qbus);
if (k->load_config) {
ret = k->load_config... | int virtio_load(VirtIODevice *vdev, QEMUFile *f) {
- int num, i, ret;
+ int i, ret;
+ uint32_t num;
uint32_t features;
BusState *qbus = qdev_get_parent_bus(DEVICE(vdev));
VirtioBusClass *k = VIRTIO_BUS_GET_CLASS(qbus);
if (k->load_config) {
ret = k->load_config(qbus->parent, f);
... |
CVE-2013-4237 | glibc | https://github.com/bminor/glibc | sysdeps/unix/readdir_r.c | __READDIR_R | int __READDIR_R (DIR *dirp, DIRENT_TYPE *entry, DIRENT_TYPE **result) {
DIRENT_TYPE *dp;
size_t reclen;
const int saved_errno = errno;
__libc_lock_lock (dirp->lock);
do {
if (dirp->offset >= dirp->size) {
size_t maxread;
ssize_t bytes;
maxread = sizeof *dp... | int __READDIR_R (DIR *dirp, DIRENT_TYPE *entry, DIRENT_TYPE **result) {
DIRENT_TYPE *dp;
size_t reclen;
const int saved_errno = errno;
int ret;
__libc_lock_lock (dirp->lock);
do {
if (dirp->offset >= dirp->size) {
size_t maxread;
ssize_t bytes;
maxread... | int __READDIR_R (DIR *dirp, DIRENT_TYPE *entry, DIRENT_TYPE **result) {
DIRENT_TYPE *dp;
size_t reclen;
const int saved_errno = errno;
__libc_lock_lock (dirp->lock);
do {
if (dirp->offset >= dirp->size) {
size_t maxread;
ssize_t bytes;
maxread = sizeof *dp... | int __READDIR_R (DIR *dirp, DIRENT_TYPE *entry, DIRENT_TYPE **result) {
DIRENT_TYPE *dp;
size_t reclen;
const int saved_errno = errno;
int ret;
__libc_lock_lock (dirp->lock);
do {
if (dirp->offset >= dirp->size) {
size_t maxread;
ssize_t bytes;
maxread... | int __READDIR_R (DIR *dirp, DIRENT_TYPE *entry, DIRENT_TYPE **result) {
const int saved_errno = errno;
__libc_lock_lock (dirp->lock);
do {
if (dirp->offset >= dirp->size) {
size_t maxread;
ssize_t bytes;
maxread = sizeof *dp;
maxread = dirp->allocation... | int __READDIR_R (DIR *dirp, DIRENT_TYPE *entry, DIRENT_TYPE **result) {
const int saved_errno = errno;
int ret;
__libc_lock_lock (dirp->lock);
do {
if (dirp->offset >= dirp->size) {
size_t maxread;
ssize_t bytes;
maxread = sizeof *dp;
maxread = dir... | int __READDIR_R (DIR *dirp, DIRENT_TYPE *entry, DIRENT_TYPE **result) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
const int saved_errno = errno;
__libc_lock_lock (dirp->lock);
do {
if (dirp->offset >= dirp->size) {
size_t maxread;
ssize_t bytes;
maxread = ... | int __READDIR_R (DIR *dirp, DIRENT_TYPE *entry, DIRENT_TYPE **result) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
const int saved_errno = errno;
int ret;
__libc_lock_lock (dirp->lock);
do {
if (dirp->offset >= dirp->size) {
size_t maxread;
ssize_t bytes;
... | int __READDIR_R (DIR *dirp, DIRENT_TYPE *entry, DIRENT_TYPE **result) {
const int saved_errno = errno;
+ int ret;
__libc_lock_lock (dirp->lock);
do {
if (dirp->offset >= dirp->size) {
size_t maxread;
ssize_t bytes;
maxread = sizeof *dp;
max... |
CVE-2013-4263 | FFmpeg | https://github.com/FFmpeg/FFmpeg | libavfilter/vf_boxblur.c | filter_frame | static int filter_frame(AVFilterLink *inlink, AVFrame *in) {
AVFilterContext *ctx = inlink->dst;
BoxBlurContext *s = ctx->priv;
AVFilterLink *outlink = inlink->dst->outputs[0];
AVFrame *out;
int plane;
int cw = FF_CEIL_RSHIFT(inlink->w, s->hsub), ch = FF_CEIL_RSHIFT(in->height, s->vsub);
int... | static int filter_frame(AVFilterLink *inlink, AVFrame *in) {
AVFilterContext *ctx = inlink->dst;
BoxBlurContext *s = ctx->priv;
AVFilterLink *outlink = inlink->dst->outputs[0];
AVFrame *out;
int plane;
int cw = FF_CEIL_RSHIFT(inlink->w, s->hsub), ch = FF_CEIL_RSHIFT(in->height, s->vsub);
int... | static int filter_frame(AVFilterLink *inlink, AVFilterBufferRef *in) {
AVFilterContext *ctx = inlink->dst;
BoxBlurContext *boxblur = ctx->priv;
AVFilterLink *outlink = inlink->dst->outputs[0];
AVFilterBufferRef *out;
int plane;
int cw = inlink->w >> boxblur->hsub, ch = in->video->h >> boxblur->v... | static int filter_frame(AVFilterLink *inlink, AVFilterBufferRef *in) {
AVFilterContext *ctx = inlink->dst;
BoxBlurContext *boxblur = ctx->priv;
AVFilterLink *outlink = inlink->dst->outputs[0];
AVFilterBufferRef *out;
int plane;
int cw = inlink->w >> boxblur->hsub, ch = in->video->h >> boxblur->v... | static int filter_frame(AVFilterLink *inlink, AVFrame *in) {
av_frame_copy_props(out, in);
for (plane = 0; in->data[plane] && plane < 4; plane++)
hblur(out->data[plane], out->linesize[plane], in ->data[plane], in ->linesize[plane], w[plane], h[plane], s->radius[plane], s->power[plane], s->temp);
for... | static int filter_frame(AVFilterLink *inlink, AVFrame *in) {
av_frame_copy_props(out, in);
for (plane = 0; plane < 4 && in->data[plane] && in->linesize[plane]; plane++)
hblur(out->data[plane], out->linesize[plane], in ->data[plane], in ->linesize[plane], w[plane], h[plane], s->radius[plane], s->power[pl... | static int filter_frame(AVFilterLink *inlink, AVFilterBufferRef *in) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
avfilter_copy_buffer_ref_props(out, in);
for (plane = 0; in->data[plane] && plane < 4; plane++)
hblur(out->data[plane], out->linesize[plane], in ->data[plane], in ->linesize[plane], w... | static int filter_frame(AVFilterLink *inlink, AVFilterBufferRef *in) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
avfilter_copy_buffer_ref_props(out, in);
for (plane = 0; plane < 4 && in->data[plane] && in->linesize[plane]; plane++)
hblur(out->data[plane], out->linesize[plane], in ->data[plane], ... | static int filter_frame(AVFilterLink *inlink, AVFrame *in) {
av_frame_copy_props(out, in);
- for (plane = 0; in->data[plane] && plane < 4; plane++)
+ for (plane = 0; plane < 4 && in->data[plane] && in->linesize[plane]; plane++)
hblur(out->data[plane], out->linesize[plane], in ->data[plane], in ->li... |
CVE-2013-4263 | FFmpeg | https://github.com/FFmpeg/FFmpeg | libavfilter/vf_delogo.c | filter_frame | static int filter_frame(AVFilterLink *inlink, AVFrame *in) {
DelogoContext *s = inlink->dst->priv;
AVFilterLink *outlink = inlink->dst->outputs[0];
const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(inlink->format);
AVFrame *out;
int hsub0 = desc->log2_chroma_w;
int vsub0 = desc->log2_chroma_h... | static int filter_frame(AVFilterLink *inlink, AVFrame *in) {
DelogoContext *s = inlink->dst->priv;
AVFilterLink *outlink = inlink->dst->outputs[0];
const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(inlink->format);
AVFrame *out;
int hsub0 = desc->log2_chroma_w;
int vsub0 = desc->log2_chroma_h... | static int filter_frame(AVFilterLink *inlink, AVFilterBufferRef *in) {
DelogoContext *delogo = inlink->dst->priv;
AVFilterLink *outlink = inlink->dst->outputs[0];
const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(inlink->format);
AVFilterBufferRef *out;
int hsub0 = desc->log2_chroma_w;
int vs... | static int filter_frame(AVFilterLink *inlink, AVFilterBufferRef *in) {
DelogoContext *delogo = inlink->dst->priv;
AVFilterLink *outlink = inlink->dst->outputs[0];
const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(inlink->format);
AVFilterBufferRef *out;
int hsub0 = desc->log2_chroma_w;
int vs... | static int filter_frame(AVFilterLink *inlink, AVFrame *in) {
if (!sar.num) {
sar.num = sar.den = 1;
}
for (plane = 0; plane < 4 && in->data[plane]; plane++) {
int hsub = plane == 1 || plane == 2 ? hsub0 : 0;
int vsub = plane == 1 || plane == 2 ? vsub0 : 0;
apply_delogo(out->d... | static int filter_frame(AVFilterLink *inlink, AVFrame *in) {
if (!sar.num) {
sar.num = sar.den = 1;
}
for (plane = 0; plane < 4 && in->data[plane] && in->linesize[plane]; plane++) {
int hsub = plane == 1 || plane == 2 ? hsub0 : 0;
int vsub = plane == 1 || plane == 2 ? vsub0 : 0;
... | static int filter_frame(AVFilterLink *inlink, AVFilterBufferRef *in) {
DelogoContext *delogo = inlink->dst->priv;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (in->perms & AV_PERM_WRITE) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
} else {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
... | static int filter_frame(AVFilterLink *inlink, AVFilterBufferRef *in) {
DelogoContext *delogo = inlink->dst->priv;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (in->perms & AV_PERM_WRITE) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
} else {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
... | static int filter_frame(AVFilterLink *inlink, AVFrame *in) {
if (!sar.num) {
sar.num = sar.den = 1;
}
- for (plane = 0; plane < 4 && in->data[plane]; plane++) {
+ for (plane = 0; plane < 4 && in->data[plane] && in->linesize[plane]; plane++) {
int hsub = plane == 1 || plane == 2 ? hsub... |
CVE-2013-4263 | FFmpeg | https://github.com/FFmpeg/FFmpeg | libavfilter/vf_fieldorder.c | filter_frame | static int filter_frame(AVFilterLink *inlink, AVFrame *frame) {
AVFilterContext *ctx = inlink->dst;
FieldOrderContext *s = ctx->priv;
AVFilterLink *outlink = ctx->outputs[0];
int h, plane, line_step, line_size, line;
uint8_t *data;
if (!frame->interlaced_frame || frame->top_field_first == s->dst... | static int filter_frame(AVFilterLink *inlink, AVFrame *frame) {
AVFilterContext *ctx = inlink->dst;
FieldOrderContext *s = ctx->priv;
AVFilterLink *outlink = ctx->outputs[0];
int h, plane, line_step, line_size, line;
uint8_t *data;
if (!frame->interlaced_frame || frame->top_field_first == s->dst... | static int filter_frame(AVFilterLink *inlink, AVFilterBufferRef *frame) {
AVFilterContext *ctx = inlink->dst;
FieldOrderContext *s = ctx->priv;
AVFilterLink *outlink = ctx->outputs[0];
int h, plane, line_step, line_size, line;
uint8_t *data;
if (!frame->video->interlaced || frame->video->top_fie... | static int filter_frame(AVFilterLink *inlink, AVFilterBufferRef *frame) {
AVFilterContext *ctx = inlink->dst;
FieldOrderContext *s = ctx->priv;
AVFilterLink *outlink = ctx->outputs[0];
int h, plane, line_step, line_size, line;
uint8_t *data;
if (!frame->video->interlaced || frame->video->top_fie... | static int filter_frame(AVFilterLink *inlink, AVFrame *frame) {
h = frame->height;
for (plane = 0; plane < 4 && frame->data[plane]; plane++) {
line_step = frame->linesize[plane];
data = frame->data[plane];
if (s->dst_tff) {
for (line = 0; line < h; line++) {
i... | static int filter_frame(AVFilterLink *inlink, AVFrame *frame) {
h = frame->height;
for (plane = 0; plane < 4 && frame->data[plane] && frame->linesize[plane]; plane++) {
line_step = frame->linesize[plane];
data = frame->data[plane];
if (s->dst_tff) {
for (line = 0; line < h; l... | static int filter_frame(AVFilterLink *inlink, AVFilterBufferRef *frame) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
h = frame->video->h;
for (plane = 0; plane < 4 && frame->data[plane]; plane++) {
line_step = frame->linesize[plane];
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
data ... | static int filter_frame(AVFilterLink *inlink, AVFilterBufferRef *frame) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
h = frame->video->h;
for (plane = 0; plane < 4 && frame->data[plane] && frame->linesize[plane]; plane++) {
line_step = frame->linesize[plane];
/* PLACEHOLDER: DO NOT DELETE THI... | static int filter_frame(AVFilterLink *inlink, AVFrame *frame) {
h = frame->height;
- for (plane = 0; plane < 4 && frame->data[plane]; plane++) {
+ for (plane = 0; plane < 4 && frame->data[plane] && frame->linesize[plane]; plane++) {
line_step = frame->linesize[plane];
data = frame->data[pl... |
CVE-2013-4263 | FFmpeg | https://github.com/FFmpeg/FFmpeg | libavfilter/vf_gradfun.c | filter_frame | static int filter_frame(AVFilterLink *inlink, AVFrame *in) {
GradFunContext *s = inlink->dst->priv;
AVFilterLink *outlink = inlink->dst->outputs[0];
AVFrame *out;
int p, direct;
if (av_frame_is_writable(in)) {
direct = 1;
out = in;
} else {
direct = 0;
out = ff_ge... | static int filter_frame(AVFilterLink *inlink, AVFrame *in) {
GradFunContext *s = inlink->dst->priv;
AVFilterLink *outlink = inlink->dst->outputs[0];
AVFrame *out;
int p, direct;
if (av_frame_is_writable(in)) {
direct = 1;
out = in;
} else {
direct = 0;
out = ff_ge... | static int filter_frame(AVFilterLink *inlink, AVFilterBufferRef *in) {
GradFunContext *gf = inlink->dst->priv;
AVFilterLink *outlink = inlink->dst->outputs[0];
AVFilterBufferRef *out;
int p, direct = 0;
if (in->perms & AV_PERM_WRITE) {
direct = 1;
out = in;
} else {
out =... | static int filter_frame(AVFilterLink *inlink, AVFilterBufferRef *in) {
GradFunContext *gf = inlink->dst->priv;
AVFilterLink *outlink = inlink->dst->outputs[0];
AVFilterBufferRef *out;
int p, direct = 0;
if (in->perms & AV_PERM_WRITE) {
direct = 1;
out = in;
} else {
out =... | static int filter_frame(AVFilterLink *inlink, AVFrame *in) {
if (av_frame_is_writable(in)) {
out = in;
} else {
av_frame_copy_props(out, in);
}
for (p = 0; p < 4 && in->data[p]; p++) {
int w = inlink->w;
if (FFM(w, h) > 2 * r) {
filter(s, out->data[p], in->dat... | static int filter_frame(AVFilterLink *inlink, AVFrame *in) {
if (av_frame_is_writable(in)) {
out = in;
} else {
av_frame_copy_props(out, in);
}
for (p = 0; p < 4 && in->data[p] && in->linesize[p]; p++) {
int w = inlink->w;
if (FFM(w, h) > 2 * r) {
filter(s, ou... | static int filter_frame(AVFilterLink *inlink, AVFilterBufferRef *in) {
GradFunContext *gf = inlink->dst->priv;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
AVFilterBufferRef *out;
int p, direct = 0;
if (in->perms & AV_PERM_WRITE) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
out = in;... | static int filter_frame(AVFilterLink *inlink, AVFilterBufferRef *in) {
GradFunContext *gf = inlink->dst->priv;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
AVFilterBufferRef *out;
int p, direct = 0;
if (in->perms & AV_PERM_WRITE) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
out = in;... | static int filter_frame(AVFilterLink *inlink, AVFrame *in) {
if (av_frame_is_writable(in)) {
out = in;
} else {
av_frame_copy_props(out, in);
}
- for (p = 0; p < 4 && in->data[p]; p++) {
+ for (p = 0; p < 4 && in->data[p] && in->linesize[p]; p++) {
int w = inlink->w;
... |
CVE-2013-4263 | FFmpeg | https://github.com/FFmpeg/FFmpeg | libavfilter/vf_hflip.c | filter_frame | static int filter_frame(AVFilterLink *inlink, AVFrame *in) {
AVFilterContext *ctx = inlink->dst;
FlipContext *s = ctx->priv;
AVFilterLink *outlink = ctx->outputs[0];
AVFrame *out;
uint8_t *inrow, *outrow;
int i, j, plane, step;
out = ff_get_video_buffer(outlink, outlink->w, outlink->h);
... | static int filter_frame(AVFilterLink *inlink, AVFrame *in) {
AVFilterContext *ctx = inlink->dst;
FlipContext *s = ctx->priv;
AVFilterLink *outlink = ctx->outputs[0];
AVFrame *out;
uint8_t *inrow, *outrow;
int i, j, plane, step;
out = ff_get_video_buffer(outlink, outlink->w, outlink->h);
... | static int filter_frame(AVFilterLink *inlink, AVFilterBufferRef *in) {
AVFilterContext *ctx = inlink->dst;
FlipContext *flip = ctx->priv;
AVFilterLink *outlink = ctx->outputs[0];
AVFilterBufferRef *out;
uint8_t *inrow, *outrow;
int i, j, plane, step, hsub, vsub;
out = ff_get_video_buffer(out... | static int filter_frame(AVFilterLink *inlink, AVFilterBufferRef *in) {
AVFilterContext *ctx = inlink->dst;
FlipContext *flip = ctx->priv;
AVFilterLink *outlink = ctx->outputs[0];
AVFilterBufferRef *out;
uint8_t *inrow, *outrow;
int i, j, plane, step, hsub, vsub;
out = ff_get_video_buffer(out... | static int filter_frame(AVFilterLink *inlink, AVFrame *in) {
if (av_pix_fmt_desc_get(inlink->format)->flags & AV_PIX_FMT_FLAG_PAL) {
memcpy(out->data[1], in->data[1], AVPALETTE_SIZE);
}
for (plane = 0; plane < 4 && in->data[plane]; plane++) {
const int width = (plane == 1 || plane == 2) ? FF... | static int filter_frame(AVFilterLink *inlink, AVFrame *in) {
if (av_pix_fmt_desc_get(inlink->format)->flags & AV_PIX_FMT_FLAG_PAL) {
memcpy(out->data[1], in->data[1], AVPALETTE_SIZE);
}
for (plane = 0; plane < 4 && in->data[plane] && in->linesize[plane]; plane++) {
const int width = (plane =... | static int filter_frame(AVFilterLink *inlink, AVFilterBufferRef *in) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
avfilter_copy_buffer_ref_props(out, in);
if (av_pix_fmt_desc_get(inlink->format)->flags & PIX_FMT_PAL) {
memcpy(out->data[1], in->data[1], AVPALETTE_SIZE);
}
for (plane = 0; p... | static int filter_frame(AVFilterLink *inlink, AVFilterBufferRef *in) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
avfilter_copy_buffer_ref_props(out, in);
if (av_pix_fmt_desc_get(inlink->format)->flags & PIX_FMT_PAL) {
memcpy(out->data[1], in->data[1], AVPALETTE_SIZE);
}
for (plane = 0; p... | static int filter_frame(AVFilterLink *inlink, AVFrame *in) {
if (av_pix_fmt_desc_get(inlink->format)->flags & AV_PIX_FMT_FLAG_PAL) {
memcpy(out->data[1], in->data[1], AVPALETTE_SIZE);
}
- for (plane = 0; plane < 4 && in->data[plane]; plane++) {
+ for (plane = 0; plane < 4 && in->data[plane] &&... |
CVE-2013-4263 | FFmpeg | https://github.com/FFmpeg/FFmpeg | libavfilter/vf_kerndeint.c | filter_frame | static int filter_frame(AVFilterLink *inlink, AVFrame *inpic) {
KerndeintContext *kerndeint = inlink->dst->priv;
AVFilterLink *outlink = inlink->dst->outputs[0];
AVFrame *outpic;
const uint8_t *prvp;
const uint8_t *prvpp;
const uint8_t *prvpn;
const uint8_t *prvppp;
const uint8_t *prvpnn... | static int filter_frame(AVFilterLink *inlink, AVFrame *inpic) {
KerndeintContext *kerndeint = inlink->dst->priv;
AVFilterLink *outlink = inlink->dst->outputs[0];
AVFrame *outpic;
const uint8_t *prvp;
const uint8_t *prvpp;
const uint8_t *prvpn;
const uint8_t *prvppp;
const uint8_t *prvpnn... | static int filter_frame(AVFilterLink *inlink, AVFilterBufferRef *inpic) {
KerndeintContext *kerndeint = inlink->dst->priv;
AVFilterLink *outlink = inlink->dst->outputs[0];
AVFilterBufferRef *outpic;
const uint8_t *prvp;
const uint8_t *prvpp;
const uint8_t *prvpn;
const uint8_t *prvppp;
c... | static int filter_frame(AVFilterLink *inlink, AVFilterBufferRef *inpic) {
KerndeintContext *kerndeint = inlink->dst->priv;
AVFilterLink *outlink = inlink->dst->outputs[0];
AVFilterBufferRef *outpic;
const uint8_t *prvp;
const uint8_t *prvpp;
const uint8_t *prvpn;
const uint8_t *prvppp;
c... | static int filter_frame(AVFilterLink *inlink, AVFrame *inpic) {
outpic->interlaced_frame = 0;
for (plane = 0; inpic->data[plane] && plane < 4; plane++) {
h = plane == 0 ? inlink->h : FF_CEIL_RSHIFT(inlink->h, kerndeint->vsub);
srcp = srcp_saved = inpic->data[plane];
src_linesize = inpic-... | static int filter_frame(AVFilterLink *inlink, AVFrame *inpic) {
outpic->interlaced_frame = 0;
for (plane = 0; plane < 4 && inpic->data[plane] && inpic->linesize[plane]; plane++) {
h = plane == 0 ? inlink->h : FF_CEIL_RSHIFT(inlink->h, kerndeint->vsub);
srcp = srcp_saved = inpic->data[plane];
... | static int filter_frame(AVFilterLink *inlink, AVFilterBufferRef *inpic) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
avfilter_copy_buffer_ref_props(outpic, inpic);
outpic->video->interlaced = 0;
for (plane = 0; inpic->data[plane] && plane < 4; plane++) {
h = plane == 0 ? inlink->h : inlink->h... | static int filter_frame(AVFilterLink *inlink, AVFilterBufferRef *inpic) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
avfilter_copy_buffer_ref_props(outpic, inpic);
outpic->video->interlaced = 0;
for (plane = 0; plane < 4 && inpic->data[plane] && inpic->linesize[plane]; plane++) {
h = plane ==... | static int filter_frame(AVFilterLink *inlink, AVFrame *inpic) {
outpic->interlaced_frame = 0;
- for (plane = 0; inpic->data[plane] && plane < 4; plane++) {
+ for (plane = 0; plane < 4 && inpic->data[plane] && inpic->linesize[plane]; plane++) {
h = plane == 0 ? inlink->h : FF_CEIL_RSHIFT(inlink->h, ... |
CVE-2013-4263 | FFmpeg | https://github.com/FFmpeg/FFmpeg | libavfilter/vf_lut.c | filter_frame | static int filter_frame(AVFilterLink *inlink, AVFrame *in) {
AVFilterContext *ctx = inlink->dst;
LutContext *s = ctx->priv;
AVFilterLink *outlink = ctx->outputs[0];
AVFrame *out;
uint8_t *inrow, *outrow, *inrow0, *outrow0;
int i, j, plane, direct = 0;
if (av_frame_is_writable(in)) {
... | static int filter_frame(AVFilterLink *inlink, AVFrame *in) {
AVFilterContext *ctx = inlink->dst;
LutContext *s = ctx->priv;
AVFilterLink *outlink = ctx->outputs[0];
AVFrame *out;
uint8_t *inrow, *outrow, *inrow0, *outrow0;
int i, j, plane, direct = 0;
if (av_frame_is_writable(in)) {
... | static int filter_frame(AVFilterLink *inlink, AVFilterBufferRef *in) {
AVFilterContext *ctx = inlink->dst;
LutContext *lut = ctx->priv;
AVFilterLink *outlink = ctx->outputs[0];
AVFilterBufferRef *out;
uint8_t *inrow, *outrow, *inrow0, *outrow0;
int i, j, plane;
out = ff_get_video_buffer(outl... | static int filter_frame(AVFilterLink *inlink, AVFilterBufferRef *in) {
AVFilterContext *ctx = inlink->dst;
LutContext *lut = ctx->priv;
AVFilterLink *outlink = ctx->outputs[0];
AVFilterBufferRef *out;
uint8_t *inrow, *outrow, *inrow0, *outrow0;
int i, j, plane;
out = ff_get_video_buffer(outl... | static int filter_frame(AVFilterLink *inlink, AVFrame *in) {
if (s->is_rgb) {
} else {
for (plane = 0; plane < 4 && in->data[plane]; plane++) {
int vsub = plane == 1 || plane == 2 ? s->vsub : 0;
int hsub = plane == 1 || plane == 2 ? s->hsub : 0;
int h = FF_CEIL_RSHIFT... | static int filter_frame(AVFilterLink *inlink, AVFrame *in) {
if (s->is_rgb) {
} else {
for (plane = 0; plane < 4 && in->data[plane] && in->linesize[plane]; plane++) {
int vsub = plane == 1 || plane == 2 ? s->vsub : 0;
int hsub = plane == 1 || plane == 2 ? s->hsub : 0;
... | static int filter_frame(AVFilterLink *inlink, AVFilterBufferRef *in) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
avfilter_copy_buffer_ref_props(out, in);
if (lut->is_rgb) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
} else {
for (plane = 0; plane < 4 && in->data[plane]; plane++) {
... | static int filter_frame(AVFilterLink *inlink, AVFilterBufferRef *in) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
avfilter_copy_buffer_ref_props(out, in);
if (lut->is_rgb) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
} else {
for (plane = 0; plane < 4 && in->data[plane] && in->linesize... | static int filter_frame(AVFilterLink *inlink, AVFrame *in) {
if (s->is_rgb) {
} else {
- for (plane = 0; plane < 4 && in->data[plane]; plane++) {
+ for (plane = 0; plane < 4 && in->data[plane] && in->linesize[plane]; plane++) {
int vsub = plane == 1 || plane == 2 ? s->vsub : 0;
... |
CVE-2013-4263 | FFmpeg | https://github.com/FFmpeg/FFmpeg | libavfilter/vf_pad.c | get_video_buffer | static AVFrame *get_video_buffer(AVFilterLink *inlink, int w, int h) {
PadContext *s = inlink->dst->priv;
AVFrame *frame = ff_get_video_buffer(inlink->dst->outputs[0], w + (s->w - s->in_w), h + (s->h - s->in_h));
int plane;
if (!frame) {
return NULL;
}
frame->width = w;
frame->height... | static AVFrame *get_video_buffer(AVFilterLink *inlink, int w, int h) {
PadContext *s = inlink->dst->priv;
AVFrame *frame = ff_get_video_buffer(inlink->dst->outputs[0], w + (s->w - s->in_w), h + (s->h - s->in_h));
int plane;
if (!frame) {
return NULL;
}
frame->width = w;
frame->height... | static AVFilterBufferRef *get_video_buffer(AVFilterLink *inlink, int perms, int w, int h) {
PadContext *pad = inlink->dst->priv;
int align = (perms&AV_PERM_ALIGN) ? AVFILTER_ALIGN : 1;
AVFilterBufferRef *picref = ff_get_video_buffer(inlink->dst->outputs[0], perms, w + (pad->w - pad->in_w) + 4*align, h + (pa... | static AVFilterBufferRef *get_video_buffer(AVFilterLink *inlink, int perms, int w, int h) {
PadContext *pad = inlink->dst->priv;
int align = (perms&AV_PERM_ALIGN) ? AVFILTER_ALIGN : 1;
AVFilterBufferRef *picref = ff_get_video_buffer(inlink->dst->outputs[0], perms, w + (pad->w - pad->in_w) + 4*align, h + (pa... | static AVFrame *get_video_buffer(AVFilterLink *inlink, int w, int h) {
frame->height = h;
for (plane = 0; plane < 4 && frame->data[plane]; plane++) {
int hsub = s->draw.hsub[plane];
frame->data[plane] += (s->x >> hsub) * s->draw.pixelstep[plane] + (s->y >> vsub) * frame->linesize[plane];
}
... | static AVFrame *get_video_buffer(AVFilterLink *inlink, int w, int h) {
frame->height = h;
for (plane = 0; plane < 4 && frame->data[plane] && frame->linesize[plane]; plane++) {
int hsub = s->draw.hsub[plane];
frame->data[plane] += (s->x >> hsub) * s->draw.pixelstep[plane] + (s->y >> vsub) * frame... | static AVFilterBufferRef *get_video_buffer(AVFilterLink *inlink, int perms, int w, int h) {
PadContext *pad = inlink->dst->priv;
int align = (perms&AV_PERM_ALIGN) ? AVFILTER_ALIGN : 1;
AVFilterBufferRef *picref = ff_get_video_buffer(inlink->dst->outputs[0], perms, w + (pad->w - pad->in_w) + 4*align, h + (pa... | static AVFilterBufferRef *get_video_buffer(AVFilterLink *inlink, int perms, int w, int h) {
PadContext *pad = inlink->dst->priv;
int align = (perms&AV_PERM_ALIGN) ? AVFILTER_ALIGN : 1;
AVFilterBufferRef *picref = ff_get_video_buffer(inlink->dst->outputs[0], perms, w + (pad->w - pad->in_w) + 4*align, h + (pa... | static AVFrame *get_video_buffer(AVFilterLink *inlink, int w, int h) {
frame->height = h;
- for (plane = 0; plane < 4 && frame->data[plane]; plane++) {
+ for (plane = 0; plane < 4 && frame->data[plane] && frame->linesize[plane]; plane++) {
int hsub = s->draw.hsub[plane];
frame->data[plane]... |
CVE-2013-4263 | FFmpeg | https://github.com/FFmpeg/FFmpeg | libavfilter/vf_showinfo.c | filter_frame | static int filter_frame(AVFilterLink *inlink, AVFrame *frame) {
AVFilterContext *ctx = inlink->dst;
const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(inlink->format);
uint32_t plane_checksum[4] = {0}, checksum = 0;
int i, plane, vsub = desc->log2_chroma_h;
for (plane = 0; plane < 4 && frame->data... | static int filter_frame(AVFilterLink *inlink, AVFrame *frame) {
AVFilterContext *ctx = inlink->dst;
const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(inlink->format);
uint32_t plane_checksum[4] = {0}, checksum = 0;
int i, plane, vsub = desc->log2_chroma_h;
for (plane = 0; plane < 4 && frame->data... | static int filter_frame(AVFilterLink *inlink, AVFilterBufferRef *frame) {
AVFilterContext *ctx = inlink->dst;
ShowInfoContext *showinfo = ctx->priv;
const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(inlink->format);
uint32_t plane_checksum[4] = {0}, checksum = 0;
int i, plane, vsub = desc->log2_c... | static int filter_frame(AVFilterLink *inlink, AVFilterBufferRef *frame) {
AVFilterContext *ctx = inlink->dst;
ShowInfoContext *showinfo = ctx->priv;
const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(inlink->format);
uint32_t plane_checksum[4] = {0}, checksum = 0;
int i, plane, vsub = desc->log2_c... | static int filter_frame(AVFilterLink *inlink, AVFrame *frame) {
int i, plane, vsub = desc->log2_chroma_h;
for (plane = 0; plane < 4 && frame->data[plane]; plane++) {
int64_t linesize = av_image_get_linesize(frame->format, frame->width, plane);
uint8_t *data = frame->data[plane];
int h = ... | static int filter_frame(AVFilterLink *inlink, AVFrame *frame) {
int i, plane, vsub = desc->log2_chroma_h;
for (plane = 0; plane < 4 && frame->data[plane] && frame->linesize[plane]; plane++) {
int64_t linesize = av_image_get_linesize(frame->format, frame->width, plane);
uint8_t *data = frame->dat... | static int filter_frame(AVFilterLink *inlink, AVFilterBufferRef *frame) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
int i, plane, vsub = desc->log2_chroma_h;
for (plane = 0; plane < 4 && frame->data[plane]; plane++) {
int64_t linesize = av_image_get_linesize(frame->format, frame->video->w, plane... | static int filter_frame(AVFilterLink *inlink, AVFilterBufferRef *frame) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
int i, plane, vsub = desc->log2_chroma_h;
for (plane = 0; plane < 4 && frame->data[plane] && frame->linesize[plane]; plane++) {
int64_t linesize = av_image_get_linesize(frame->form... | static int filter_frame(AVFilterLink *inlink, AVFrame *frame) {
int i, plane, vsub = desc->log2_chroma_h;
- for (plane = 0; plane < 4 && frame->data[plane]; plane++) {
+ for (plane = 0; plane < 4 && frame->data[plane] && frame->linesize[plane]; plane++) {
int64_t linesize = av_image_get_linesize(fr... |
CVE-2013-4264 | FFmpeg | https://github.com/FFmpeg/FFmpeg | libavcodec/g2meet.c | kempf_decode_tile | static int kempf_decode_tile(G2MContext *c, int tile_x, int tile_y, const uint8_t *src, int src_size) {
int width, height;
int hdr, zsize, npal, tidx = -1, ret;
int i, j;
const uint8_t *src_end = src + src_size;
uint8_t pal[768], transp[3];
uLongf dlen = (c->tile_width + 1) * c->tile_height;
... | static int kempf_decode_tile(G2MContext *c, int tile_x, int tile_y, const uint8_t *src, int src_size) {
int width, height;
int hdr, zsize, npal, tidx = -1, ret;
int i, j;
const uint8_t *src_end = src + src_size;
uint8_t pal[768], transp[3];
uLongf dlen = (c->tile_width + 1) * c->tile_height;
... | static int kempf_decode_tile(G2MContext *c, int tile_x, int tile_y, const uint8_t *src, int src_size) {
int width, height;
int hdr, zsize, npal, tidx = -1, ret;
int i, j;
const uint8_t *src_end = src + src_size;
uint8_t pal[768], transp[3];
uLongf dlen = (c->tile_width + 1) * c->tile_height;
... | static int kempf_decode_tile(G2MContext *c, int tile_x, int tile_y, const uint8_t *src, int src_size) {
int width, height;
int hdr, zsize, npal, tidx = -1, ret;
int i, j;
const uint8_t *src_end = src + src_size;
uint8_t pal[768], transp[3];
uLongf dlen = (c->tile_width + 1) * c->tile_height;
... | static int kempf_decode_tile(G2MContext *c, int tile_x, int tile_y, const uint8_t *src, int src_size) {
const uint8_t *src_end = src + src_size;
uLongf dlen = (c->tile_width + 1) * c->tile_height;
hdr = *src++;
sub_type = hdr >> 5;
if (sub_type == 0) {
return 0;
} else if (sub_type == 1)... | static int kempf_decode_tile(G2MContext *c, int tile_x, int tile_y, const uint8_t *src, int src_size) {
const uint8_t *src_end = src + src_size;
uLongf dlen = (c->tile_width + 1) * c->tile_height;
hdr = *src++;
sub_type = hdr >> 5;
if (sub_type == 0) {
return 0;
} else if (sub_type == 1)... | static int kempf_decode_tile(G2MContext *c, int tile_x, int tile_y, const uint8_t *src, int src_size) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
const uint8_t *src_end = src + src_size;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
uLongf dlen = (c->tile_width + 1) * c->tile_height;
/* PLACEHOL... | static int kempf_decode_tile(G2MContext *c, int tile_x, int tile_y, const uint8_t *src, int src_size) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
const uint8_t *src_end = src + src_size;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
uLongf dlen = (c->tile_width + 1) * c->tile_height;
/* PLACEHOL... | static int kempf_decode_tile(G2MContext *c, int tile_x, int tile_y, const uint8_t *src, int src_size) {
const uint8_t *src_end = src + src_size;
uLongf dlen = (c->tile_width + 1) * c->tile_height;
hdr = *src++;
sub_type = hdr >> 5;
if (sub_type == 0) {
return 0;
} else if (sub_ty... |
CVE-2013-4265 | FFmpeg | https://github.com/FFmpeg/FFmpeg | libavutil/mem.c | av_reallocp_array | int av_reallocp_array(void *ptr, size_t nmemb, size_t size) {
void **ptrptr = ptr;
*ptrptr = av_realloc_f(*ptrptr, nmemb, size);
if (!*ptrptr && !(nmemb && size)) {
return AVERROR(ENOMEM);
}
return 0;
} | int av_reallocp_array(void *ptr, size_t nmemb, size_t size) {
void **ptrptr = ptr;
*ptrptr = av_realloc_f(*ptrptr, nmemb, size);
if (!*ptrptr && nmemb && size) {
return AVERROR(ENOMEM);
}
return 0;
} | int av_reallocp_array(void *ptr, size_t nmemb, size_t size) {
void **ptrptr = ptr;
*ptrptr = av_realloc_f(*ptrptr, nmemb, size);
if (!*ptrptr && !(nmemb && size)) {
return AVERROR(ENOMEM);
}
return 0;
} | int av_reallocp_array(void *ptr, size_t nmemb, size_t size) {
void **ptrptr = ptr;
*ptrptr = av_realloc_f(*ptrptr, nmemb, size);
if (!*ptrptr && nmemb && size) {
return AVERROR(ENOMEM);
}
return 0;
} | int av_reallocp_array(void *ptr, size_t nmemb, size_t size) {
void **ptrptr = ptr;
*ptrptr = av_realloc_f(*ptrptr, nmemb, size);
if (!*ptrptr && !(nmemb && size)) {
return AVERROR(ENOMEM);
}
return 0;
}
| int av_reallocp_array(void *ptr, size_t nmemb, size_t size) {
void **ptrptr = ptr;
*ptrptr = av_realloc_f(*ptrptr, nmemb, size);
if (!*ptrptr && nmemb && size) {
return AVERROR(ENOMEM);
}
return 0;
}
| int av_reallocp_array(void *ptr, size_t nmemb, size_t size) {
void **ptrptr = ptr;
*ptrptr = av_realloc_f(*ptrptr, nmemb, size);
if (!*ptrptr && !(nmemb && size)) {
return AVERROR(ENOMEM);
}
return 0;
}
| int av_reallocp_array(void *ptr, size_t nmemb, size_t size) {
void **ptrptr = ptr;
*ptrptr = av_realloc_f(*ptrptr, nmemb, size);
if (!*ptrptr && nmemb && size) {
return AVERROR(ENOMEM);
}
return 0;
} | int av_reallocp_array(void *ptr, size_t nmemb, size_t size) {
void **ptrptr = ptr;
*ptrptr = av_realloc_f(*ptrptr, nmemb, size);
- if (!*ptrptr && !(nmemb && size)) {
+ if (!*ptrptr && nmemb && size) {
return AVERROR(ENOMEM);
}
return 0;
} |
CVE-2013-4358 | FFmpeg | https://github.com/FFmpeg/FFmpeg | libavcodec/h264_ps.c | ff_h264_decode_seq_parameter_set | int ff_h264_decode_seq_parameter_set(H264Context *h) {
MpegEncContext * const s = &h->s;
int profile_idc, level_idc, constraint_set_flags = 0;
unsigned int sps_id;
int i, log2_max_frame_num_minus4;
SPS *sps;
profile_idc= get_bits(&s->gb, 8);
constraint_set_flags |= get_bits1(&s->gb) << 0;
... | int ff_h264_decode_seq_parameter_set(H264Context *h) {
MpegEncContext * const s = &h->s;
int profile_idc, level_idc, constraint_set_flags = 0;
unsigned int sps_id;
int i, log2_max_frame_num_minus4;
SPS *sps;
profile_idc= get_bits(&s->gb, 8);
constraint_set_flags |= get_bits1(&s->gb) << 0;
... | int ff_h264_decode_seq_parameter_set(H264Context *h) {
MpegEncContext * const s = &h->s;
int profile_idc, level_idc, constraint_set_flags = 0;
unsigned int sps_id;
int i, log2_max_frame_num_minus4;
SPS *sps;
profile_idc= get_bits(&s->gb, 8);
constraint_set_flags |= get_bits1(&s->gb) << 0;
... | int ff_h264_decode_seq_parameter_set(H264Context *h) {
MpegEncContext * const s = &h->s;
int profile_idc, level_idc, constraint_set_flags = 0;
unsigned int sps_id;
int i, log2_max_frame_num_minus4;
SPS *sps;
profile_idc= get_bits(&s->gb, 8);
constraint_set_flags |= get_bits1(&s->gb) << 0;
... | int ff_h264_decode_seq_parameter_set(H264Context *h) {
MpegEncContext * const s = &h->s;
profile_idc= get_bits(&s->gb, 8);
level_idc= get_bits(&s->gb, 8);
sps_id= get_ue_golomb_31(&s->gb);
if(sps_id >= MAX_SPS_COUNT) {
return -1;
}
sps= av_mallocz(sizeof(SPS));
if(sps == NULL) {
... | int ff_h264_decode_seq_parameter_set(H264Context *h) {
MpegEncContext * const s = &h->s;
profile_idc= get_bits(&s->gb, 8);
level_idc= get_bits(&s->gb, 8);
sps_id= get_ue_golomb_31(&s->gb);
if(sps_id >= MAX_SPS_COUNT) {
return -1;
}
sps= av_mallocz(sizeof(SPS));
if(sps == NULL) {
... | int ff_h264_decode_seq_parameter_set(H264Context *h) {
MpegEncContext * const s = &h->s;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
profile_idc= get_bits(&s->gb, 8);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
level_idc= get_bits(&s->gb, 8);
sps_id= get_ue_golomb_31(&s->gb);
if(sps_id >... | int ff_h264_decode_seq_parameter_set(H264Context *h) {
MpegEncContext * const s = &h->s;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
profile_idc= get_bits(&s->gb, 8);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
level_idc= get_bits(&s->gb, 8);
sps_id= get_ue_golomb_31(&s->gb);
if(sps_id >... | int ff_h264_decode_seq_parameter_set(H264Context *h) {
MpegEncContext * const s = &h->s;
profile_idc= get_bits(&s->gb, 8);
level_idc= get_bits(&s->gb, 8);
sps_id= get_ue_golomb_31(&s->gb);
if(sps_id >= MAX_SPS_COUNT) {
return -1;
}
sps= av_mallocz(sizeof(SPS));
if(sps =... |
CVE-2013-4416 | xen | https://github.com/xen-project/xen | tools/xenstore/xenstored_core.c | send_reply | void send_reply(struct connection *conn, enum xsd_sockmsg_type type, const void *data, unsigned int len) {
struct buffered_data *bdata;
bdata = new_buffer(conn);
bdata->buffer = talloc_array(bdata, char, len);
if (type != XS_WATCH_EVENT) {
memcpy(&bdata->hdr.msg, &conn->in->hdr.msg, sizeof(struc... | void send_reply(struct connection *conn, enum xsd_sockmsg_type type, const void *data, unsigned int len) {
struct buffered_data *bdata;
if ( len > XENSTORE_PAYLOAD_MAX ) {
send_error(conn, E2BIG);
return;
}
bdata = new_buffer(conn);
bdata->buffer = talloc_array(bdata, char, len);
... | void send_reply(struct connection *conn, enum xsd_sockmsg_type type, const void *data, unsigned int len) {
struct buffered_data *bdata;
bdata = new_buffer(conn);
bdata->buffer = talloc_array(bdata, char, len);
if (type != XS_WATCH_EVENT) {
memcpy(&bdata->hdr.msg, &conn->in->hdr.msg, sizeof(struc... | void send_reply(struct connection *conn, enum xsd_sockmsg_type type, const void *data, unsigned int len) {
struct buffered_data *bdata;
if ( len > XENSTORE_PAYLOAD_MAX ) {
send_error(conn, E2BIG);
return;
}
bdata = new_buffer(conn);
bdata->buffer = talloc_array(bdata, char, len);
... | void send_reply(struct connection *conn, enum xsd_sockmsg_type type, const void *data, unsigned int len) {
struct buffered_data *bdata;
bdata = new_buffer(conn);
bdata->hdr.msg.len = len;
memcpy(bdata->buffer, data, len);
}
| void send_reply(struct connection *conn, enum xsd_sockmsg_type type, const void *data, unsigned int len) {
struct buffered_data *bdata;
if ( len > XENSTORE_PAYLOAD_MAX ) {
send_error(conn, E2BIG);
return;
}
bdata = new_buffer(conn);
bdata->hdr.msg.len = len;
memcpy(bdata->buffer,... | void send_reply(struct connection *conn, enum xsd_sockmsg_type type, const void *data, unsigned int len) {
struct buffered_data *bdata;
bdata = new_buffer(conn);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
bdata->hdr.msg.len = len;
memcpy(bdata->buffer, data, len);
/* PLACEHOLDER: DO NOT DELET... | void send_reply(struct connection *conn, enum xsd_sockmsg_type type, const void *data, unsigned int len) {
struct buffered_data *bdata;
if ( len > XENSTORE_PAYLOAD_MAX ) {
send_error(conn, E2BIG);
return;
}
bdata = new_buffer(conn);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
b... | void send_reply(struct connection *conn, enum xsd_sockmsg_type type, const void *data, unsigned int len) {
struct buffered_data *bdata;
+ if ( len > XENSTORE_PAYLOAD_MAX ) {
+ send_error(conn, E2BIG);
+ return;
+ }
bdata = new_buffer(conn);
bdata->hdr.msg.len = len;
memcpy(bdata... |
CVE-2013-4531 | QEMU | https://github.com/qemu/qemu | vmstate.c | get_int32_le | static int get_int32_le(QEMUFile *f, void *pv, size_t size) {
int32_t *cur = pv;
int32_t loaded;
qemu_get_sbe32s(f, &loaded);
if (loaded <= *cur) {
*cur = loaded;
return 0;
}
return -EVAL;
} | static int get_int32_le(QEMUFile *f, void *pv, size_t size) {
int32_t *cur = pv;
int32_t loaded;
qemu_get_sbe32s(f, &loaded);
if (loaded >= 0 && loaded <= *cur) {
*cur = loaded;
return 0;
}
return -EVAL;
} | static int get_int32_le(QEMUFile *f, void *pv, size_t size) {
int32_t *cur = pv;
int32_t loaded;
qemu_get_sbe32s(f, &loaded);
if (loaded <= *cur) {
*cur = loaded;
return 0;
}
return -EVAL;
} | static int get_int32_le(QEMUFile *f, void *pv, size_t size) {
int32_t *cur = pv;
int32_t loaded;
qemu_get_sbe32s(f, &loaded);
if (loaded >= 0 && loaded <= *cur) {
*cur = loaded;
return 0;
}
return -EVAL;
} | static int get_int32_le(QEMUFile *f, void *pv, size_t size) {
qemu_get_sbe32s(f, &loaded);
if (loaded <= *cur) {
*cur = loaded;
return 0;
}
return -EVAL;
}
| static int get_int32_le(QEMUFile *f, void *pv, size_t size) {
qemu_get_sbe32s(f, &loaded);
if (loaded >= 0 && loaded <= *cur) {
*cur = loaded;
return 0;
}
return -EVAL;
}
| static int get_int32_le(QEMUFile *f, void *pv, size_t size) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
qemu_get_sbe32s(f, &loaded);
if (loaded <= *cur) {
*cur = loaded;
return 0;
}
return -EVAL;
}
| static int get_int32_le(QEMUFile *f, void *pv, size_t size) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
qemu_get_sbe32s(f, &loaded);
if (loaded >= 0 && loaded <= *cur) {
*cur = loaded;
return 0;
}
return -EVAL;
} | static int get_int32_le(QEMUFile *f, void *pv, size_t size) {
qemu_get_sbe32s(f, &loaded);
- if (loaded <= *cur) {
+ if (loaded >= 0 && loaded <= *cur) {
*cur = loaded;
return 0;
}
return -EVAL;
} |
CVE-2013-4533 | QEMU | https://github.com/qemu/qemu | hw/arm/pxa2xx.c | pxa2xx_ssp_load | static int pxa2xx_ssp_load(QEMUFile *f, void *opaque, int version_id) {
PXA2xxSSPState *s = (PXA2xxSSPState *) opaque;
int i;
s->enable = qemu_get_be32(f);
qemu_get_be32s(f, &s->sscr[0]);
qemu_get_be32s(f, &s->sscr[1]);
qemu_get_be32s(f, &s->sspsp);
qemu_get_be32s(f, &s->ssto);
qemu_get_... | static int pxa2xx_ssp_load(QEMUFile *f, void *opaque, int version_id) {
PXA2xxSSPState *s = (PXA2xxSSPState *) opaque;
int i, v;
s->enable = qemu_get_be32(f);
qemu_get_be32s(f, &s->sscr[0]);
qemu_get_be32s(f, &s->sscr[1]);
qemu_get_be32s(f, &s->sspsp);
qemu_get_be32s(f, &s->ssto);
qemu_g... | static int pxa2xx_ssp_load(QEMUFile *f, void *opaque, int version_id) {
PXA2xxSSPState *s = (PXA2xxSSPState *) opaque;
int i;
s->enable = qemu_get_be32(f);
qemu_get_be32s(f, &s->sscr[0]);
qemu_get_be32s(f, &s->sscr[1]);
qemu_get_be32s(f, &s->sspsp);
qemu_get_be32s(f, &s->ssto);
qemu_get_... | static int pxa2xx_ssp_load(QEMUFile *f, void *opaque, int version_id) {
PXA2xxSSPState *s = (PXA2xxSSPState *) opaque;
int i, v;
s->enable = qemu_get_be32(f);
qemu_get_be32s(f, &s->sscr[0]);
qemu_get_be32s(f, &s->sscr[1]);
qemu_get_be32s(f, &s->sspsp);
qemu_get_be32s(f, &s->ssto);
qemu_g... | static int pxa2xx_ssp_load(QEMUFile *f, void *opaque, int version_id) {
PXA2xxSSPState *s = (PXA2xxSSPState *) opaque;
int i;
s->enable = qemu_get_be32(f);
qemu_get_be32s(f, &s->sscr[0]);
qemu_get_be32s(f, &s->sscr[1]);
qemu_get_be32s(f, &s->sspsp);
qemu_get_be32s(f, &s->ssto);
qemu_get_... | static int pxa2xx_ssp_load(QEMUFile *f, void *opaque, int version_id) {
PXA2xxSSPState *s = (PXA2xxSSPState *) opaque;
int i, v;
s->enable = qemu_get_be32(f);
qemu_get_be32s(f, &s->sscr[0]);
qemu_get_be32s(f, &s->sscr[1]);
qemu_get_be32s(f, &s->sspsp);
qemu_get_be32s(f, &s->ssto);
qemu_g... | static int pxa2xx_ssp_load(QEMUFile *f, void *opaque, int version_id) {
PXA2xxSSPState *s = (PXA2xxSSPState *) opaque;
int i;
s->enable = qemu_get_be32(f);
qemu_get_be32s(f, &s->sscr[0]);
qemu_get_be32s(f, &s->sscr[1]);
qemu_get_be32s(f, &s->sspsp);
qemu_get_be32s(f, &s->ssto);
qemu_get_... | static int pxa2xx_ssp_load(QEMUFile *f, void *opaque, int version_id) {
PXA2xxSSPState *s = (PXA2xxSSPState *) opaque;
int i, v;
s->enable = qemu_get_be32(f);
qemu_get_be32s(f, &s->sscr[0]);
qemu_get_be32s(f, &s->sscr[1]);
qemu_get_be32s(f, &s->sspsp);
qemu_get_be32s(f, &s->ssto);
qemu_g... | static int pxa2xx_ssp_load(QEMUFile *f, void *opaque, int version_id) {
PXA2xxSSPState *s = (PXA2xxSSPState *) opaque;
- int i;
+ int i, v;
s->enable = qemu_get_be32(f);
qemu_get_be32s(f, &s->sscr[0]);
qemu_get_be32s(f, &s->sscr[1]);
qemu_get_be32s(f, &s->sspsp);
qemu_get_be32s(f, &... |
CVE-2013-4534 | QEMU | https://github.com/qemu/qemu | hw/intc/openpic.c | openpic_load | static int openpic_load(QEMUFile* f, void *opaque, int version_id) {
OpenPICState *opp = (OpenPICState *)opaque;
unsigned int i;
if (version_id != 1) {
return -EVAL;
}
qemu_get_be32s(f, &opp->gcr);
qemu_get_be32s(f, &opp->vir);
qemu_get_be32s(f, &opp->pir);
qemu_get_be32s(f, &opp... | static int openpic_load(QEMUFile* f, void *opaque, int version_id) {
OpenPICState *opp = (OpenPICState *)opaque;
unsigned int i, nb_cpus;
if (version_id != 1) {
return -EVAL;
}
qemu_get_be32s(f, &opp->gcr);
qemu_get_be32s(f, &opp->vir);
qemu_get_be32s(f, &opp->pir);
qemu_get_be32... | static int openpic_load(QEMUFile* f, void *opaque, int version_id) {
OpenPICState *opp = (OpenPICState *)opaque;
unsigned int i;
if (version_id != 1) {
return -EVAL;
}
qemu_get_be32s(f, &opp->gcr);
qemu_get_be32s(f, &opp->vir);
qemu_get_be32s(f, &opp->pir);
qemu_get_be32s(f, &opp... | static int openpic_load(QEMUFile* f, void *opaque, int version_id) {
OpenPICState *opp = (OpenPICState *)opaque;
unsigned int i, nb_cpus;
if (version_id != 1) {
return -EVAL;
}
qemu_get_be32s(f, &opp->gcr);
qemu_get_be32s(f, &opp->vir);
qemu_get_be32s(f, &opp->pir);
qemu_get_be32... | static int openpic_load(QEMUFile* f, void *opaque, int version_id) {
OpenPICState *opp = (OpenPICState *)opaque;
unsigned int i;
if (version_id != 1) {
return -EVAL;
}
qemu_get_be32s(f, &opp->gcr);
qemu_get_be32s(f, &opp->vir);
qemu_get_be32s(f, &opp->pir);
qemu_get_be32s(f, &opp... | static int openpic_load(QEMUFile* f, void *opaque, int version_id) {
OpenPICState *opp = (OpenPICState *)opaque;
unsigned int i, nb_cpus;
if (version_id != 1) {
return -EVAL;
}
qemu_get_be32s(f, &opp->gcr);
qemu_get_be32s(f, &opp->vir);
qemu_get_be32s(f, &opp->pir);
qemu_get_be32... | static int openpic_load(QEMUFile* f, void *opaque, int version_id) {
OpenPICState *opp = (OpenPICState *)opaque;
unsigned int i;
if (version_id != 1) {
return -EVAL;
}
qemu_get_be32s(f, &opp->gcr);
qemu_get_be32s(f, &opp->vir);
qemu_get_be32s(f, &opp->pir);
qemu_get_be32s(f, &opp... | static int openpic_load(QEMUFile* f, void *opaque, int version_id) {
OpenPICState *opp = (OpenPICState *)opaque;
unsigned int i, nb_cpus;
if (version_id != 1) {
return -EVAL;
}
qemu_get_be32s(f, &opp->gcr);
qemu_get_be32s(f, &opp->vir);
qemu_get_be32s(f, &opp->pir);
qemu_get_be32... | static int openpic_load(QEMUFile* f, void *opaque, int version_id) {
OpenPICState *opp = (OpenPICState *)opaque;
- unsigned int i;
+ unsigned int i, nb_cpus;
if (version_id != 1) {
return -EVAL;
}
qemu_get_be32s(f, &opp->gcr);
qemu_get_be32s(f, &opp->vir);
qemu_get_be32s(f,... |
CVE-2013-4534 | QEMU | https://github.com/qemu/qemu | hw/intc/openpic.c | openpic_realize | static void openpic_realize(DeviceState *dev, Error **errp) {
SysBusDevice *d = SYS_BUS_DEVICE(dev);
OpenPICState *opp = OPENPIC(dev);
int i, j;
int list_count = 0;
static const MemReg list_le[] = {
{
"glb", &openpic_glb_ops_le, OPENPIC_GLB_REG_START, OPENPIC_GLB_REG_SIZE
... | static void openpic_realize(DeviceState *dev, Error **errp) {
SysBusDevice *d = SYS_BUS_DEVICE(dev);
OpenPICState *opp = OPENPIC(dev);
int i, j;
int list_count = 0;
static const MemReg list_le[] = {
{
"glb", &openpic_glb_ops_le, OPENPIC_GLB_REG_START, OPENPIC_GLB_REG_SIZE
... | static void openpic_realize(DeviceState *dev, Error **errp) {
SysBusDevice *d = SYS_BUS_DEVICE(dev);
OpenPICState *opp = OPENPIC(dev);
int i, j;
int list_count = 0;
static const MemReg list_le[] = {
{
"glb", &openpic_glb_ops_le, OPENPIC_GLB_REG_START, OPENPIC_GLB_REG_SIZE
... | static void openpic_realize(DeviceState *dev, Error **errp) {
SysBusDevice *d = SYS_BUS_DEVICE(dev);
OpenPICState *opp = OPENPIC(dev);
int i, j;
int list_count = 0;
static const MemReg list_le[] = {
{
"glb", &openpic_glb_ops_le, OPENPIC_GLB_REG_START, OPENPIC_GLB_REG_SIZE
... | static void openpic_realize(DeviceState *dev, Error **errp) {
SysBusDevice *d = SYS_BUS_DEVICE(dev);
OpenPICState *opp = OPENPIC(dev);
static const MemReg list_fsl[] = {
{
"msi", &openpic_msi_ops_be, OPENPIC_MSI_REG_START, OPENPIC_MSI_REG_SIZE
}, {
"summary", &openpic... | static void openpic_realize(DeviceState *dev, Error **errp) {
SysBusDevice *d = SYS_BUS_DEVICE(dev);
OpenPICState *opp = OPENPIC(dev);
static const MemReg list_fsl[] = {
{
"msi", &openpic_msi_ops_be, OPENPIC_MSI_REG_START, OPENPIC_MSI_REG_SIZE
}, {
"summary", &openpic... | static void openpic_realize(DeviceState *dev, Error **errp) {
SysBusDevice *d = SYS_BUS_DEVICE(dev);
OpenPICState *opp = OPENPIC(dev);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
static const MemReg list_fsl[] = {
{
"msi", &openpic_msi_ops_be, OPENPIC_MSI_REG_START, OPENPIC_MSI_REG... | static void openpic_realize(DeviceState *dev, Error **errp) {
SysBusDevice *d = SYS_BUS_DEVICE(dev);
OpenPICState *opp = OPENPIC(dev);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
static const MemReg list_fsl[] = {
{
"msi", &openpic_msi_ops_be, OPENPIC_MSI_REG_START, OPENPIC_MSI_REG... | static void openpic_realize(DeviceState *dev, Error **errp) {
SysBusDevice *d = SYS_BUS_DEVICE(dev);
OpenPICState *opp = OPENPIC(dev);
static const MemReg list_fsl[] = {
{
"msi", &openpic_msi_ops_be, OPENPIC_MSI_REG_START, OPENPIC_MSI_REG_SIZE
}, {
"summary", ... |
CVE-2013-4535 | QEMU | https://github.com/qemu/qemu | hw/virtio/virtio.c | virtqueue_map_sg | void virtqueue_map_sg(struct iovec *sg, hwaddr *addr, size_t num_sg, int is_write) {
unsigned int i;
hwaddr len;
for (i = 0; i < num_sg; i++) {
len = sg[i].iov_len;
sg[i].iov_base = cpu_physical_memory_map(addr[i], &len, is_write);
if (sg[i].iov_base == NULL || len != sg[i].iov_len) ... | void virtqueue_map_sg(struct iovec *sg, hwaddr *addr, size_t num_sg, int is_write) {
unsigned int i;
hwaddr len;
if (num_sg >= VIRTQUEUE_MAX_SIZE) {
error_report("virtio: map attempt out of bounds: %zd > %d", num_sg, VIRTQUEUE_MAX_SIZE);
exit(1);
}
for (i = 0; i < num_sg; i++) {
... | void virtqueue_map_sg(struct iovec *sg, hwaddr *addr, size_t num_sg, int is_write) {
unsigned int i;
hwaddr len;
for (i = 0; i < num_sg; i++) {
len = sg[i].iov_len;
sg[i].iov_base = cpu_physical_memory_map(addr[i], &len, is_write);
if (sg[i].iov_base == NULL || len != sg[i].iov_len) ... | void virtqueue_map_sg(struct iovec *sg, hwaddr *addr, size_t num_sg, int is_write) {
unsigned int i;
hwaddr len;
if (num_sg >= VIRTQUEUE_MAX_SIZE) {
error_report("virtio: map attempt out of bounds: %zd > %d", num_sg, VIRTQUEUE_MAX_SIZE);
exit(1);
}
for (i = 0; i < num_sg; i++) {
... | void virtqueue_map_sg(struct iovec *sg, hwaddr *addr, size_t num_sg, int is_write) {
hwaddr len;
for (i = 0; i < num_sg; i++) {
}
}
| void virtqueue_map_sg(struct iovec *sg, hwaddr *addr, size_t num_sg, int is_write) {
hwaddr len;
if (num_sg >= VIRTQUEUE_MAX_SIZE) {
error_report("virtio: map attempt out of bounds: %zd > %d", num_sg, VIRTQUEUE_MAX_SIZE);
exit(1);
}
for (i = 0; i < num_sg; i++) {
}
}
| void virtqueue_map_sg(struct iovec *sg, hwaddr *addr, size_t num_sg, int is_write) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
hwaddr len;
for (i = 0; i < num_sg; i++) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
}
}
| void virtqueue_map_sg(struct iovec *sg, hwaddr *addr, size_t num_sg, int is_write) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
hwaddr len;
if (num_sg >= VIRTQUEUE_MAX_SIZE) {
error_report("virtio: map attempt out of bounds: %zd > %d", num_sg, VIRTQUEUE_MAX_SIZE);
exit(1);
}
for (... | void virtqueue_map_sg(struct iovec *sg, hwaddr *addr, size_t num_sg, int is_write) {
hwaddr len;
+ if (num_sg >= VIRTQUEUE_MAX_SIZE) {
+ error_report("virtio: map attempt out of bounds: %zd > %d", num_sg, VIRTQUEUE_MAX_SIZE);
+ exit(1);
+ }
for (i = 0; i < num_sg; i++) {
}
} |
CVE-2013-4536 | QEMU | https://github.com/qemu/qemu | hw/virtio/virtio.c | virtqueue_map_sg | void virtqueue_map_sg(struct iovec *sg, hwaddr *addr, size_t num_sg, int is_write) {
unsigned int i;
hwaddr len;
for (i = 0; i < num_sg; i++) {
len = sg[i].iov_len;
sg[i].iov_base = cpu_physical_memory_map(addr[i], &len, is_write);
if (sg[i].iov_base == NULL || len != sg[i].iov_len) ... | void virtqueue_map_sg(struct iovec *sg, hwaddr *addr, size_t num_sg, int is_write) {
unsigned int i;
hwaddr len;
if (num_sg >= VIRTQUEUE_MAX_SIZE) {
error_report("virtio: map attempt out of bounds: %zd > %d", num_sg, VIRTQUEUE_MAX_SIZE);
exit(1);
}
for (i = 0; i < num_sg; i++) {
... | void virtqueue_map_sg(struct iovec *sg, hwaddr *addr, size_t num_sg, int is_write) {
unsigned int i;
hwaddr len;
for (i = 0; i < num_sg; i++) {
len = sg[i].iov_len;
sg[i].iov_base = cpu_physical_memory_map(addr[i], &len, is_write);
if (sg[i].iov_base == NULL || len != sg[i].iov_len) ... | void virtqueue_map_sg(struct iovec *sg, hwaddr *addr, size_t num_sg, int is_write) {
unsigned int i;
hwaddr len;
if (num_sg >= VIRTQUEUE_MAX_SIZE) {
error_report("virtio: map attempt out of bounds: %zd > %d", num_sg, VIRTQUEUE_MAX_SIZE);
exit(1);
}
for (i = 0; i < num_sg; i++) {
... | void virtqueue_map_sg(struct iovec *sg, hwaddr *addr, size_t num_sg, int is_write) {
hwaddr len;
for (i = 0; i < num_sg; i++) {
}
}
| void virtqueue_map_sg(struct iovec *sg, hwaddr *addr, size_t num_sg, int is_write) {
hwaddr len;
if (num_sg >= VIRTQUEUE_MAX_SIZE) {
error_report("virtio: map attempt out of bounds: %zd > %d", num_sg, VIRTQUEUE_MAX_SIZE);
exit(1);
}
for (i = 0; i < num_sg; i++) {
}
}
| void virtqueue_map_sg(struct iovec *sg, hwaddr *addr, size_t num_sg, int is_write) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
hwaddr len;
for (i = 0; i < num_sg; i++) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
}
}
| void virtqueue_map_sg(struct iovec *sg, hwaddr *addr, size_t num_sg, int is_write) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
hwaddr len;
if (num_sg >= VIRTQUEUE_MAX_SIZE) {
error_report("virtio: map attempt out of bounds: %zd > %d", num_sg, VIRTQUEUE_MAX_SIZE);
exit(1);
}
for (... | void virtqueue_map_sg(struct iovec *sg, hwaddr *addr, size_t num_sg, int is_write) {
hwaddr len;
+ if (num_sg >= VIRTQUEUE_MAX_SIZE) {
+ error_report("virtio: map attempt out of bounds: %zd > %d", num_sg, VIRTQUEUE_MAX_SIZE);
+ exit(1);
+ }
for (i = 0; i < num_sg; i++) {
}
} |
CVE-2013-4537 | QEMU | https://github.com/qemu/qemu | hw/sd/ssi-sd.c | ssi_sd_load | static int ssi_sd_load(QEMUFile *f, void *opaque, int version_id) {
SSISlave *ss = SSI_SLAVE(opaque);
ssi_sd_state *s = (ssi_sd_state *)opaque;
int i;
if (version_id != 1) {
return -EVAL;
}
s->mode = qemu_get_be32(f);
s->cmd = qemu_get_be32(f);
for (i = 0; i < 4; i++)
s->... | static int ssi_sd_load(QEMUFile *f, void *opaque, int version_id) {
SSISlave *ss = SSI_SLAVE(opaque);
ssi_sd_state *s = (ssi_sd_state *)opaque;
int i;
if (version_id != 1) {
return -EVAL;
}
s->mode = qemu_get_be32(f);
s->cmd = qemu_get_be32(f);
for (i = 0; i < 4; i++)
s->... | static int ssi_sd_load(QEMUFile *f, void *opaque, int version_id) {
SSISlave *ss = SSI_SLAVE(opaque);
ssi_sd_state *s = (ssi_sd_state *)opaque;
int i;
if (version_id != 1) {
return -EVAL;
}
s->mode = qemu_get_be32(f);
s->cmd = qemu_get_be32(f);
for (i = 0; i < 4; i++)
s->... | static int ssi_sd_load(QEMUFile *f, void *opaque, int version_id) {
SSISlave *ss = SSI_SLAVE(opaque);
ssi_sd_state *s = (ssi_sd_state *)opaque;
int i;
if (version_id != 1) {
return -EVAL;
}
s->mode = qemu_get_be32(f);
s->cmd = qemu_get_be32(f);
for (i = 0; i < 4; i++)
s->... | static int ssi_sd_load(QEMUFile *f, void *opaque, int version_id) {
SSISlave *ss = SSI_SLAVE(opaque);
ssi_sd_state *s = (ssi_sd_state *)opaque;
s->mode = qemu_get_be32(f);
s->cmd = qemu_get_be32(f);
for (i = 0; i < 4; i++)
s->cmdarg[i] = qemu_get_be32(f);
for (i = 0; i < 5; i++)
... | static int ssi_sd_load(QEMUFile *f, void *opaque, int version_id) {
SSISlave *ss = SSI_SLAVE(opaque);
ssi_sd_state *s = (ssi_sd_state *)opaque;
s->mode = qemu_get_be32(f);
s->cmd = qemu_get_be32(f);
for (i = 0; i < 4; i++)
s->cmdarg[i] = qemu_get_be32(f);
for (i = 0; i < 5; i++)
... | static int ssi_sd_load(QEMUFile *f, void *opaque, int version_id) {
SSISlave *ss = SSI_SLAVE(opaque);
ssi_sd_state *s = (ssi_sd_state *)opaque;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
s->mode = qemu_get_be32(f);
s->cmd = qemu_get_be32(f);
for (i = 0; i < 4; i++)
s->cmdarg[i] = qemu... | static int ssi_sd_load(QEMUFile *f, void *opaque, int version_id) {
SSISlave *ss = SSI_SLAVE(opaque);
ssi_sd_state *s = (ssi_sd_state *)opaque;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
s->mode = qemu_get_be32(f);
s->cmd = qemu_get_be32(f);
for (i = 0; i < 4; i++)
s->cmdarg[i] = qemu... | static int ssi_sd_load(QEMUFile *f, void *opaque, int version_id) {
SSISlave *ss = SSI_SLAVE(opaque);
ssi_sd_state *s = (ssi_sd_state *)opaque;
s->mode = qemu_get_be32(f);
s->cmd = qemu_get_be32(f);
for (i = 0; i < 4; i++)
s->cmdarg[i] = qemu_get_be32(f);
for (i = 0; i < 5; i++)
... |
CVE-2013-4538 | QEMU | https://github.com/qemu/qemu | hw/display/ssd0323.c | ssd0323_load | static int ssd0323_load(QEMUFile *f, void *opaque, int version_id) {
SSISlave *ss = SSI_SLAVE(opaque);
ssd0323_state *s = (ssd0323_state *)opaque;
int i;
if (version_id != 1) {
return -EVAL;
}
s->cmd_len = qemu_get_be32(f);
s->cmd = qemu_get_be32(f);
for (i = 0; i < 8; i++)
... | static int ssd0323_load(QEMUFile *f, void *opaque, int version_id) {
SSISlave *ss = SSI_SLAVE(opaque);
ssd0323_state *s = (ssd0323_state *)opaque;
int i;
if (version_id != 1) {
return -EVAL;
}
s->cmd_len = qemu_get_be32(f);
if (s->cmd_len < 0 || s->cmd_len > ARRAY_SIZE(s->cmd_data)) ... | static int ssd0323_load(QEMUFile *f, void *opaque, int version_id) {
SSISlave *ss = SSI_SLAVE(opaque);
ssd0323_state *s = (ssd0323_state *)opaque;
int i;
if (version_id != 1) {
return -EVAL;
}
s->cmd_len = qemu_get_be32(f);
s->cmd = qemu_get_be32(f);
for (i = 0; i < 8; i++)
... | static int ssd0323_load(QEMUFile *f, void *opaque, int version_id) {
SSISlave *ss = SSI_SLAVE(opaque);
ssd0323_state *s = (ssd0323_state *)opaque;
int i;
if (version_id != 1) {
return -EVAL;
}
s->cmd_len = qemu_get_be32(f);
if (s->cmd_len < 0 || s->cmd_len > ARRAY_SIZE(s->cmd_data)) ... | static int ssd0323_load(QEMUFile *f, void *opaque, int version_id) {
SSISlave *ss = SSI_SLAVE(opaque);
ssd0323_state *s = (ssd0323_state *)opaque;
s->cmd_len = qemu_get_be32(f);
s->cmd = qemu_get_be32(f);
for (i = 0; i < 8; i++)
s->cmd_data[i] = qemu_get_be32(f);
s->row = qemu_get_be32(f... | static int ssd0323_load(QEMUFile *f, void *opaque, int version_id) {
SSISlave *ss = SSI_SLAVE(opaque);
ssd0323_state *s = (ssd0323_state *)opaque;
s->cmd_len = qemu_get_be32(f);
if (s->cmd_len < 0 || s->cmd_len > ARRAY_SIZE(s->cmd_data)) {
return -EVAL;
}
s->cmd = qemu_get_be32(f);
f... | static int ssd0323_load(QEMUFile *f, void *opaque, int version_id) {
SSISlave *ss = SSI_SLAVE(opaque);
ssd0323_state *s = (ssd0323_state *)opaque;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
s->cmd_len = qemu_get_be32(f);
s->cmd = qemu_get_be32(f);
for (i = 0; i < 8; i++)
s->cmd_data[i... | static int ssd0323_load(QEMUFile *f, void *opaque, int version_id) {
SSISlave *ss = SSI_SLAVE(opaque);
ssd0323_state *s = (ssd0323_state *)opaque;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
s->cmd_len = qemu_get_be32(f);
if (s->cmd_len < 0 || s->cmd_len > ARRAY_SIZE(s->cmd_data)) {
return... | static int ssd0323_load(QEMUFile *f, void *opaque, int version_id) {
SSISlave *ss = SSI_SLAVE(opaque);
ssd0323_state *s = (ssd0323_state *)opaque;
s->cmd_len = qemu_get_be32(f);
+ if (s->cmd_len < 0 || s->cmd_len > ARRAY_SIZE(s->cmd_data)) {
+ return -EVAL;
+ }
s->cmd = qemu_get_be32(f... |
CVE-2013-4539 | QEMU | https://github.com/qemu/qemu | hw/input/tsc210x.c | tsc210x_load | static int tsc210x_load(QEMUFile *f, void *opaque, int version_id) {
TSC210xState *s = (TSC210xState *) opaque;
int64_t now = qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL);
int i;
s->x = qemu_get_be16(f);
s->y = qemu_get_be16(f);
s->pressure = qemu_get_byte(f);
s->state = qemu_get_byte(f);
s->pa... | static int tsc210x_load(QEMUFile *f, void *opaque, int version_id) {
TSC210xState *s = (TSC210xState *) opaque;
int64_t now = qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL);
int i;
s->x = qemu_get_be16(f);
s->y = qemu_get_be16(f);
s->pressure = qemu_get_byte(f);
s->state = qemu_get_byte(f);
s->pa... | static int tsc210x_load(QEMUFile *f, void *opaque, int version_id) {
TSC210xState *s = (TSC210xState *) opaque;
int64_t now = qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL);
int i;
s->x = qemu_get_be16(f);
s->y = qemu_get_be16(f);
s->pressure = qemu_get_byte(f);
s->state = qemu_get_byte(f);
s->pa... | static int tsc210x_load(QEMUFile *f, void *opaque, int version_id) {
TSC210xState *s = (TSC210xState *) opaque;
int64_t now = qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL);
int i;
s->x = qemu_get_be16(f);
s->y = qemu_get_be16(f);
s->pressure = qemu_get_byte(f);
s->state = qemu_get_byte(f);
s->pa... | static int tsc210x_load(QEMUFile *f, void *opaque, int version_id) {
TSC210xState *s = (TSC210xState *) opaque;
s->x = qemu_get_be16(f);
s->y = qemu_get_be16(f);
s->pressure = qemu_get_byte(f);
s->state = qemu_get_byte(f);
s->page = qemu_get_byte(f);
s->offset = qemu_get_byte(f);
s->comm... | static int tsc210x_load(QEMUFile *f, void *opaque, int version_id) {
TSC210xState *s = (TSC210xState *) opaque;
s->x = qemu_get_be16(f);
s->y = qemu_get_be16(f);
s->pressure = qemu_get_byte(f);
s->state = qemu_get_byte(f);
s->page = qemu_get_byte(f);
s->offset = qemu_get_byte(f);
s->comm... | static int tsc210x_load(QEMUFile *f, void *opaque, int version_id) {
TSC210xState *s = (TSC210xState *) opaque;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
s->x = qemu_get_be16(f);
s->y = qemu_get_be16(f);
s->pressure = qemu_get_byte(f);
s->state = qemu_get_byte(f);
s->page = qemu_get_byte... | static int tsc210x_load(QEMUFile *f, void *opaque, int version_id) {
TSC210xState *s = (TSC210xState *) opaque;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
s->x = qemu_get_be16(f);
s->y = qemu_get_be16(f);
s->pressure = qemu_get_byte(f);
s->state = qemu_get_byte(f);
s->page = qemu_get_byte... | static int tsc210x_load(QEMUFile *f, void *opaque, int version_id) {
TSC210xState *s = (TSC210xState *) opaque;
s->x = qemu_get_be16(f);
s->y = qemu_get_be16(f);
s->pressure = qemu_get_byte(f);
s->state = qemu_get_byte(f);
s->page = qemu_get_byte(f);
s->offset = qemu_get_byte(f);
... |
CVE-2013-4542 | QEMU | https://github.com/qemu/qemu | hw/scsi/virtio-scsi.c | virtio_scsi_load_request | static void *virtio_scsi_load_request(QEMUFile *f, SCSIRequest *sreq) {
SCSIBus *bus = sreq->bus;
VirtIOSCSI *s = container_of(bus, VirtIOSCSI, bus);
VirtIOSCSICommon *vs = VIRTIO_SCSI_COMMON(s);
VirtIOSCSIReq *req;
uint32_t n;
req = g_malloc(sizeof(*req));
qemu_get_be32s(f, &n);
assert(... | static void *virtio_scsi_load_request(QEMUFile *f, SCSIRequest *sreq) {
SCSIBus *bus = sreq->bus;
VirtIOSCSI *s = container_of(bus, VirtIOSCSI, bus);
VirtIOSCSICommon *vs = VIRTIO_SCSI_COMMON(s);
VirtIOSCSIReq *req;
uint32_t n;
req = g_malloc(sizeof(*req));
qemu_get_be32s(f, &n);
assert(... | static void *virtio_scsi_load_request(QEMUFile *f, SCSIRequest *sreq) {
SCSIBus *bus = sreq->bus;
VirtIOSCSI *s = container_of(bus, VirtIOSCSI, bus);
VirtIOSCSICommon *vs = VIRTIO_SCSI_COMMON(s);
VirtIOSCSIReq *req;
uint32_t n;
req = g_malloc(sizeof(*req));
qemu_get_be32s(f, &n);
assert(... | static void *virtio_scsi_load_request(QEMUFile *f, SCSIRequest *sreq) {
SCSIBus *bus = sreq->bus;
VirtIOSCSI *s = container_of(bus, VirtIOSCSI, bus);
VirtIOSCSICommon *vs = VIRTIO_SCSI_COMMON(s);
VirtIOSCSIReq *req;
uint32_t n;
req = g_malloc(sizeof(*req));
qemu_get_be32s(f, &n);
assert(... | static void *virtio_scsi_load_request(QEMUFile *f, SCSIRequest *sreq) {
qemu_get_buffer(f, (unsigned char *)&req->elem, sizeof(req->elem));
virtio_scsi_parse_req(s, vs->cmd_vqs[n], req);
}
| static void *virtio_scsi_load_request(QEMUFile *f, SCSIRequest *sreq) {
qemu_get_buffer(f, (unsigned char *)&req->elem, sizeof(req->elem));
assert(req->elem.in_num <= ARRAY_SIZE(req->elem.in_sg));
assert(req->elem.out_num <= ARRAY_SIZE(req->elem.out_sg));
virtio_scsi_parse_req(s, vs->cmd_vqs[n], req);
}... | static void *virtio_scsi_load_request(QEMUFile *f, SCSIRequest *sreq) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
qemu_get_buffer(f, (unsigned char *)&req->elem, sizeof(req->elem));
virtio_scsi_parse_req(s, vs->cmd_vqs[n], req);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
}
| static void *virtio_scsi_load_request(QEMUFile *f, SCSIRequest *sreq) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
qemu_get_buffer(f, (unsigned char *)&req->elem, sizeof(req->elem));
assert(req->elem.in_num <= ARRAY_SIZE(req->elem.in_sg));
assert(req->elem.out_num <= ARRAY_SIZE(req->elem.out_sg));
... | static void *virtio_scsi_load_request(QEMUFile *f, SCSIRequest *sreq) {
qemu_get_buffer(f, (unsigned char *)&req->elem, sizeof(req->elem));
+ assert(req->elem.in_num <= ARRAY_SIZE(req->elem.in_sg));
+ assert(req->elem.out_num <= ARRAY_SIZE(req->elem.out_sg));
virtio_scsi_parse_req(s, vs->cmd_vqs[n], re... |
CVE-2013-4544 | QEMU | https://github.com/qemu/qemu | hw/net/vmxnet3.c | vmxnet3_post_load | static int vmxnet3_post_load(void *opaque, int version_id) {
VMXNET3State *s = opaque;
PCIDevice *d = PCI_DEVICE(s);
vmxnet_tx_pkt_init(&s->tx_pkt, s->max_tx_frags, s->peer_has_vhdr);
vmxnet_rx_pkt_init(&s->rx_pkt, s->peer_has_vhdr);
if (s->msix_used) {
if (!vmxnet3_use_msix_vectors(s, VMXNE... | static int vmxnet3_post_load(void *opaque, int version_id) {
VMXNET3State *s = opaque;
PCIDevice *d = PCI_DEVICE(s);
vmxnet_tx_pkt_init(&s->tx_pkt, s->max_tx_frags, s->peer_has_vhdr);
vmxnet_rx_pkt_init(&s->rx_pkt, s->peer_has_vhdr);
if (s->msix_used) {
if (!vmxnet3_use_msix_vectors(s, VMXNE... | static int vmxnet3_post_load(void *opaque, int version_id) {
VMXNET3State *s = opaque;
PCIDevice *d = PCI_DEVICE(s);
vmxnet_tx_pkt_init(&s->tx_pkt, s->max_tx_frags, s->peer_has_vhdr);
vmxnet_rx_pkt_init(&s->rx_pkt, s->peer_has_vhdr);
if (s->msix_used) {
if (!vmxnet3_use_msix_vectors(s, VMXNE... | static int vmxnet3_post_load(void *opaque, int version_id) {
VMXNET3State *s = opaque;
PCIDevice *d = PCI_DEVICE(s);
vmxnet_tx_pkt_init(&s->tx_pkt, s->max_tx_frags, s->peer_has_vhdr);
vmxnet_rx_pkt_init(&s->rx_pkt, s->peer_has_vhdr);
if (s->msix_used) {
if (!vmxnet3_use_msix_vectors(s, VMXNE... | static int vmxnet3_post_load(void *opaque, int version_id) {
VMXNET3State *s = opaque;
PCIDevice *d = PCI_DEVICE(s);
if (s->msix_used) {
if (!vmxnet3_use_msix_vectors(s, VMXNET3_MAX_TRS)) {
return -1;
}
}
return 0;
}
| static int vmxnet3_post_load(void *opaque, int version_id) {
VMXNET3State *s = opaque;
PCIDevice *d = PCI_DEVICE(s);
if (s->msix_used) {
if (!vmxnet3_use_msix_vectors(s, VMXNET3_MAX_TRS)) {
return -1;
}
}
vmxnet3_validate_interrupts(s);
return 0;
}
| static int vmxnet3_post_load(void *opaque, int version_id) {
VMXNET3State *s = opaque;
PCIDevice *d = PCI_DEVICE(s);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (s->msix_used) {
if (!vmxnet3_use_msix_vectors(s, VMXNET3_MAX_TRS)) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
... | static int vmxnet3_post_load(void *opaque, int version_id) {
VMXNET3State *s = opaque;
PCIDevice *d = PCI_DEVICE(s);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (s->msix_used) {
if (!vmxnet3_use_msix_vectors(s, VMXNET3_MAX_TRS)) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
... | static int vmxnet3_post_load(void *opaque, int version_id) {
VMXNET3State *s = opaque;
PCIDevice *d = PCI_DEVICE(s);
if (s->msix_used) {
if (!vmxnet3_use_msix_vectors(s, VMXNET3_MAX_TRS)) {
return -1;
}
}
+ vmxnet3_validate_interrupts(s);
return 0;
} |
CVE-2013-6399 | QEMU | https://github.com/qemu/qemu | hw/virtio/virtio.c | virtio_load | int virtio_load(VirtIODevice *vdev, QEMUFile *f) {
int i, ret;
uint32_t num;
uint32_t features;
uint32_t supported_features;
BusState *qbus = qdev_get_parent_bus(DEVICE(vdev));
VirtioBusClass *k = VIRTIO_BUS_GET_CLASS(qbus);
if (k->load_config) {
ret = k->load_config(qbus->parent, f)... | int virtio_load(VirtIODevice *vdev, QEMUFile *f) {
int i, ret;
uint32_t num;
uint32_t features;
uint32_t supported_features;
BusState *qbus = qdev_get_parent_bus(DEVICE(vdev));
VirtioBusClass *k = VIRTIO_BUS_GET_CLASS(qbus);
if (k->load_config) {
ret = k->load_config(qbus->parent, f)... | int virtio_load(VirtIODevice *vdev, QEMUFile *f) {
int num, i, ret;
uint32_t features;
uint32_t supported_features;
BusState *qbus = qdev_get_parent_bus(DEVICE(vdev));
VirtioBusClass *k = VIRTIO_BUS_GET_CLASS(qbus);
if (k->load_config) {
ret = k->load_config(qbus->parent, f);
if ... | int virtio_load(VirtIODevice *vdev, QEMUFile *f) {
int num, i, ret;
uint32_t features;
uint32_t supported_features;
BusState *qbus = qdev_get_parent_bus(DEVICE(vdev));
VirtioBusClass *k = VIRTIO_BUS_GET_CLASS(qbus);
if (k->load_config) {
ret = k->load_config(qbus->parent, f);
if ... | int virtio_load(VirtIODevice *vdev, QEMUFile *f) {
BusState *qbus = qdev_get_parent_bus(DEVICE(vdev));
qemu_get_be16s(f, &vdev->queue_sel);
qemu_get_be32s(f, &features);
if (virtio_set_features(vdev, features) < 0) {
error_report("Features 0x%x unsupported. Allowed features: 0x%x", features, sup... | int virtio_load(VirtIODevice *vdev, QEMUFile *f) {
BusState *qbus = qdev_get_parent_bus(DEVICE(vdev));
qemu_get_be16s(f, &vdev->queue_sel);
if (vdev->queue_sel >= VIRTIO_PCI_QUEUE_MAX) {
return -1;
}
qemu_get_be32s(f, &features);
if (virtio_set_features(vdev, features) < 0) {
err... | int virtio_load(VirtIODevice *vdev, QEMUFile *f) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
BusState *qbus = qdev_get_parent_bus(DEVICE(vdev));
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
qemu_get_be16s(f, &vdev->queue_sel);
qemu_get_be32s(f, &features);
if (virtio_set_features(vdev, feat... | int virtio_load(VirtIODevice *vdev, QEMUFile *f) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
BusState *qbus = qdev_get_parent_bus(DEVICE(vdev));
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
qemu_get_be16s(f, &vdev->queue_sel);
if (vdev->queue_sel >= VIRTIO_PCI_QUEUE_MAX) {
return -1;
... | int virtio_load(VirtIODevice *vdev, QEMUFile *f) {
BusState *qbus = qdev_get_parent_bus(DEVICE(vdev));
qemu_get_be16s(f, &vdev->queue_sel);
+ if (vdev->queue_sel >= VIRTIO_PCI_QUEUE_MAX) {
+ return -1;
+ }
qemu_get_be32s(f, &features);
if (virtio_set_features(vdev, features) < 0) {
... |
CVE-2013-6450 | OpenSSL | https://github.com/openssl/openssl | ssl/d1_both.c | dtls1_hm_fragment_free | static void dtls1_hm_fragment_free(hm_fragment *frag) {
if (frag->fragment) {
OPENSSL_free(frag->fragment);
}
if (frag->reassembly) {
OPENSSL_free(frag->reassembly);
}
OPENSSL_free(frag);
} | static void dtls1_hm_fragment_free(hm_fragment *frag) {
if (frag->msg_header.is_ccs) {
EVP_CIPHER_CTX_free(frag->msg_header.saved_retransmit_state.enc_write_ctx);
EVP_MD_CTX_destroy(frag->msg_header.saved_retransmit_state.write_hash);
}
if (frag->fragment) {
OPENSSL_free(frag->fragme... | static void dtls1_hm_fragment_free(hm_fragment *frag) {
if (frag->fragment) {
OPENSSL_free(frag->fragment);
}
if (frag->reassembly) {
OPENSSL_free(frag->reassembly);
}
OPENSSL_free(frag);
} | static void dtls1_hm_fragment_free(hm_fragment *frag) {
if (frag->msg_header.is_ccs) {
EVP_CIPHER_CTX_free(frag->msg_header.saved_retransmit_state.enc_write_ctx);
EVP_MD_CTX_destroy(frag->msg_header.saved_retransmit_state.write_hash);
}
if (frag->fragment) {
OPENSSL_free(frag->fragme... | static void dtls1_hm_fragment_free(hm_fragment *frag) {
if (frag->fragment) {
OPENSSL_free(frag->fragment);
}
if (frag->reassembly) {
OPENSSL_free(frag->reassembly);
}
OPENSSL_free(frag);
}
| static void dtls1_hm_fragment_free(hm_fragment *frag) {
if (frag->msg_header.is_ccs) {
EVP_CIPHER_CTX_free(frag->msg_header.saved_retransmit_state.enc_write_ctx);
EVP_MD_CTX_destroy(frag->msg_header.saved_retransmit_state.write_hash);
}
if (frag->fragment) {
OPENSSL_free(frag->fragme... | static void dtls1_hm_fragment_free(hm_fragment *frag) {
if (frag->fragment) {
OPENSSL_free(frag->fragment);
}
if (frag->reassembly) {
OPENSSL_free(frag->reassembly);
}
OPENSSL_free(frag);
}
| static void dtls1_hm_fragment_free(hm_fragment *frag) {
if (frag->msg_header.is_ccs) {
EVP_CIPHER_CTX_free(frag->msg_header.saved_retransmit_state.enc_write_ctx);
EVP_MD_CTX_destroy(frag->msg_header.saved_retransmit_state.write_hash);
}
if (frag->fragment) {
OPENSSL_free(frag->fragme... | static void dtls1_hm_fragment_free(hm_fragment *frag) {
+ if (frag->msg_header.is_ccs) {
+ EVP_CIPHER_CTX_free(frag->msg_header.saved_retransmit_state.enc_write_ctx);
+ EVP_MD_CTX_destroy(frag->msg_header.saved_retransmit_state.write_hash);
+ }
if (frag->fragment) {
OPENSSL_free(frag-... |
CVE-2013-6450 | OpenSSL | https://github.com/openssl/openssl | ssl/t1_enc.c | tls1_change_cipher_state | int tls1_change_cipher_state(SSL *s, int which) {
static const unsigned char empty[]="";
unsigned char *p,*mac_secret;
unsigned char *exp_label;
unsigned char tmp1[EVP_MAX_KEY_LENGTH];
unsigned char tmp2[EVP_MAX_KEY_LENGTH];
unsigned char iv1[EVP_MAX_IV_LENGTH*2];
unsigned char iv2[EVP_MAX_I... | int tls1_change_cipher_state(SSL *s, int which) {
static const unsigned char empty[]="";
unsigned char *p,*mac_secret;
unsigned char *exp_label;
unsigned char tmp1[EVP_MAX_KEY_LENGTH];
unsigned char tmp2[EVP_MAX_KEY_LENGTH];
unsigned char iv1[EVP_MAX_IV_LENGTH*2];
unsigned char iv2[EVP_MAX_I... | int tls1_change_cipher_state(SSL *s, int which) {
static const unsigned char empty[]="";
unsigned char *p,*mac_secret;
unsigned char *exp_label;
unsigned char tmp1[EVP_MAX_KEY_LENGTH];
unsigned char tmp2[EVP_MAX_KEY_LENGTH];
unsigned char iv1[EVP_MAX_IV_LENGTH*2];
unsigned char iv2[EVP_MAX_I... | int tls1_change_cipher_state(SSL *s, int which) {
static const unsigned char empty[]="";
unsigned char *p,*mac_secret;
unsigned char *exp_label;
unsigned char tmp1[EVP_MAX_KEY_LENGTH];
unsigned char tmp2[EVP_MAX_KEY_LENGTH];
unsigned char iv1[EVP_MAX_IV_LENGTH*2];
unsigned char iv2[EVP_MAX_I... | int tls1_change_cipher_state(SSL *s, int which) {
if (which & SSL3_CC_READ) {
} else {
if (s->s3->tmp.new_cipher->algorithm2 & TLS1_STREAM_MAC) {
s->mac_flags |= SSL_MAC_FLAG_WRITE_MAC_STREAM;
} else {
s->mac_flags &= ~SSL_MAC_FLAG_WRITE_MAC_STREAM;
}
if (... | int tls1_change_cipher_state(SSL *s, int which) {
if (which & SSL3_CC_READ) {
} else {
if (s->s3->tmp.new_cipher->algorithm2 & TLS1_STREAM_MAC) {
s->mac_flags |= SSL_MAC_FLAG_WRITE_MAC_STREAM;
} else {
s->mac_flags &= ~SSL_MAC_FLAG_WRITE_MAC_STREAM;
}
if (... | int tls1_change_cipher_state(SSL *s, int which) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (which & SSL3_CC_READ) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
} else {
if (s->s3->tmp.new_cipher->algorithm2 & TLS1_STREAM_MAC) {
s->mac_flags |= SSL_MAC_FLAG_WRITE_MAC_STREAM;... | int tls1_change_cipher_state(SSL *s, int which) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (which & SSL3_CC_READ) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
} else {
if (s->s3->tmp.new_cipher->algorithm2 & TLS1_STREAM_MAC) {
s->mac_flags |= SSL_MAC_FLAG_WRITE_MAC_STREAM;... | int tls1_change_cipher_state(SSL *s, int which) {
if (which & SSL3_CC_READ) {
} else {
if (s->s3->tmp.new_cipher->algorithm2 & TLS1_STREAM_MAC) {
s->mac_flags |= SSL_MAC_FLAG_WRITE_MAC_STREAM;
} else {
s->mac_flags &= ~SSL_MAC_FLAG_WRITE_MAC_STREAM;
}
- ... |
CVE-2013-7008 | FFmpeg | https://github.com/FFmpeg/FFmpeg | libavcodec/h264.c | decode_slice_header | static int decode_slice_header(H264Context *h, H264Context *h0) {
unsigned int first_mb_in_slice;
unsigned int pps_id;
int ret;
unsigned int slice_type, tmp, i, j;
int last_pic_structure, last_pic_droppable;
int must_reinit;
int needs_reinit = 0;
int field_pic_flag, bottom_field_flag;
... | static int decode_slice_header(H264Context *h, H264Context *h0) {
unsigned int first_mb_in_slice;
unsigned int pps_id;
int ret;
unsigned int slice_type, tmp, i, j;
int last_pic_structure, last_pic_droppable;
int must_reinit;
int needs_reinit = 0;
int field_pic_flag, bottom_field_flag;
... | static int decode_slice_header(H264Context *h, H264Context *h0) {
MpegEncContext *const s = &h->s;
MpegEncContext *const s0 = &h0->s;
unsigned int first_mb_in_slice;
unsigned int pps_id;
int num_ref_idx_active_override_flag, ret;
unsigned int slice_type, tmp, i, j;
int default_ref_list_done ... | static int decode_slice_header(H264Context *h, H264Context *h0) {
MpegEncContext *const s = &h->s;
MpegEncContext *const s0 = &h0->s;
unsigned int first_mb_in_slice;
unsigned int pps_id;
int num_ref_idx_active_override_flag, ret;
unsigned int slice_type, tmp, i, j;
int default_ref_list_done ... | static int decode_slice_header(H264Context *h, H264Context *h0) {
if (first_mb_in_slice == 0) {
if (h0->current_slice && FIELD_PICTURE(h)) {
field_end(h, 1);
}
if (!h0->first_field) {
if (h->cur_pic_ptr && !h->droppable) {
ff_thread_report_progress(&h-... | static int decode_slice_header(H264Context *h, H264Context *h0) {
if (first_mb_in_slice == 0) {
if (h0->current_slice && FIELD_PICTURE(h)) {
field_end(h, 1);
}
if (!h0->first_field) {
if (h->cur_pic_ptr && !h->droppable) {
ff_thread_report_progress(&h-... | static int decode_slice_header(H264Context *h, H264Context *h0) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (first_mb_in_slice == 0) {
if (h0->current_slice && FIELD_PICTURE) {
field_end(h, 1);
}
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (!s0->first_field) {... | static int decode_slice_header(H264Context *h, H264Context *h0) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (first_mb_in_slice == 0) {
if (h0->current_slice && FIELD_PICTURE) {
field_end(h, 1);
}
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (!s0->first_field) {... | static int decode_slice_header(H264Context *h, H264Context *h0) {
if (first_mb_in_slice == 0) {
if (h0->current_slice && FIELD_PICTURE(h)) {
field_end(h, 1);
}
if (!h0->first_field) {
if (h->cur_pic_ptr && !h->droppable) {
ff_thread_report_prog... |
CVE-2013-7009 | FFmpeg | https://github.com/FFmpeg/FFmpeg | libavcodec/rpza.c | rpza_decode_stream | static void rpza_decode_stream(RpzaContext *s) {
int width = s->avctx->width;
int stride = s->frame.linesize[0] / 2;
int row_inc = stride - 4;
int stream_ptr = 0;
int chunk_size;
unsigned char opcode;
int n_blocks;
unsigned short colorA = 0, colorB;
unsigned short color4[4];
unsi... | static void rpza_decode_stream(RpzaContext *s) {
int width = s->avctx->width;
int stride = s->frame.linesize[0] / 2;
int row_inc = stride - 4;
int stream_ptr = 0;
int chunk_size;
unsigned char opcode;
int n_blocks;
unsigned short colorA = 0, colorB;
unsigned short color4[4];
unsi... | static void rpza_decode_stream(RpzaContext *s) {
int width = s->avctx->width;
int stride = s->frame.linesize[0] / 2;
int row_inc = stride - 4;
int stream_ptr = 0;
int chunk_size;
unsigned char opcode;
int n_blocks;
unsigned short colorA = 0, colorB;
unsigned short color4[4];
unsi... | static void rpza_decode_stream(RpzaContext *s) {
int width = s->avctx->width;
int stride = s->frame.linesize[0] / 2;
int row_inc = stride - 4;
int stream_ptr = 0;
int chunk_size;
unsigned char opcode;
int n_blocks;
unsigned short colorA = 0, colorB;
unsigned short color4[4];
unsi... | static void rpza_decode_stream(RpzaContext *s) {
int row_ptr = 0;
int pixel_ptr = 0;
int block_ptr;
while (stream_ptr < chunk_size) {
opcode = s->buf[stream_ptr++];
n_blocks = (opcode & 0x1f) + 1;
if ((opcode & 0x80) == 0) {
colorA = (opcode << 8) | (s->buf[stream_ptr... | static void rpza_decode_stream(RpzaContext *s) {
int row_ptr = 0;
int pixel_ptr = -4;
int block_ptr;
while (stream_ptr < chunk_size) {
opcode = s->buf[stream_ptr++];
n_blocks = (opcode & 0x1f) + 1;
if ((opcode & 0x80) == 0) {
colorA = (opcode << 8) | (s->buf[stream_pt... | static void rpza_decode_stream(RpzaContext *s) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
int row_ptr = 0;
int pixel_ptr = 0;
int block_ptr;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
while (stream_ptr < chunk_size) {
opcode = s->buf[stream_ptr++];
n_blocks = (opcode & 0x... | static void rpza_decode_stream(RpzaContext *s) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
int row_ptr = 0;
int pixel_ptr = -4;
int block_ptr;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
while (stream_ptr < chunk_size) {
opcode = s->buf[stream_ptr++];
n_blocks = (opcode & 0... | static void rpza_decode_stream(RpzaContext *s) {
int row_ptr = 0;
- int pixel_ptr = 0;
+ int pixel_ptr = -4;
int block_ptr;
while (stream_ptr < chunk_size) {
opcode = s->buf[stream_ptr++];
n_blocks = (opcode & 0x1f) + 1;
if ((opcode & 0x80) == 0) {
colorA = ... |
CVE-2013-7010 | FFmpeg | https://github.com/FFmpeg/FFmpeg | libavcodec/dsputil.c | add_bytes_c | static void add_bytes_c(uint8_t *dst, uint8_t *src, int w) {
long i;
for(i=0; i<=w-sizeof(long); i+=sizeof(long)) {
long a = *(long*)(src+i);
long b = *(long*)(dst+i);
*(long*)(dst+i) = ((a&pb_7f) + (b&pb_7f)) ^ ((a^b)&pb_80);
}
for(; i<w; i++)
dst[i+0] += src[i+0];
} | static void add_bytes_c(uint8_t *dst, uint8_t *src, int w) {
long i;
for(i=0; i<=w-(int)sizeof(long); i+=sizeof(long)) {
long a = *(long*)(src+i);
long b = *(long*)(dst+i);
*(long*)(dst+i) = ((a&pb_7f) + (b&pb_7f)) ^ ((a^b)&pb_80);
}
for(; i<w; i++)
dst[i+0] += src[i+0];
... | static void add_bytes_c(uint8_t *dst, uint8_t *src, int w) {
long i;
for(i=0; i<=w-sizeof(long); i+=sizeof(long)) {
long a = *(long*)(src+i);
long b = *(long*)(dst+i);
*(long*)(dst+i) = ((a&pb_7f) + (b&pb_7f)) ^ ((a^b)&pb_80);
}
for(; i<w; i++)
dst[i+0] += src[i+0];
} | static void add_bytes_c(uint8_t *dst, uint8_t *src, int w) {
long i;
for(i=0; i<=w-(int)sizeof(long); i+=sizeof(long)) {
long a = *(long*)(src+i);
long b = *(long*)(dst+i);
*(long*)(dst+i) = ((a&pb_7f) + (b&pb_7f)) ^ ((a^b)&pb_80);
}
for(; i<w; i++)
dst[i+0] += src[i+0];
... | static void add_bytes_c(uint8_t *dst, uint8_t *src, int w) {
long i;
for(i=0; i<=w-sizeof(long); i+=sizeof(long)) {
long a = *(long*)(src+i);
long b = *(long*)(dst+i);
*(long*)(dst+i) = ((a&pb_7f) + (b&pb_7f)) ^ ((a^b)&pb_80);
}
for(; i<w; i++)
dst[i+0] += src[i+0];
}
| static void add_bytes_c(uint8_t *dst, uint8_t *src, int w) {
long i;
for(i=0; i<=w-(int)sizeof(long); i+=sizeof(long)) {
long a = *(long*)(src+i);
long b = *(long*)(dst+i);
*(long*)(dst+i) = ((a&pb_7f) + (b&pb_7f)) ^ ((a^b)&pb_80);
}
for(; i<w; i++)
dst[i+0] += src[i+0];
... | static void add_bytes_c(uint8_t *dst, uint8_t *src, int w) {
long i;
for(i=0; i<=w-sizeof(long); i+=sizeof(long)) {
long a = *(long*)(src+i);
long b = *(long*)(dst+i);
*(long*)(dst+i) = ((a&pb_7f) + (b&pb_7f)) ^ ((a^b)&pb_80);
}
for(; i<w; i++)
dst[i+0] += src[i+0];
}
| static void add_bytes_c(uint8_t *dst, uint8_t *src, int w) {
long i;
for(i=0; i<=w-(int)sizeof(long); i+=sizeof(long)) {
long a = *(long*)(src+i);
long b = *(long*)(dst+i);
*(long*)(dst+i) = ((a&pb_7f) + (b&pb_7f)) ^ ((a^b)&pb_80);
}
for(; i<w; i++)
dst[i+0] += src[i+0];
... | static void add_bytes_c(uint8_t *dst, uint8_t *src, int w) {
long i;
- for(i=0; i<=w-sizeof(long); i+=sizeof(long)) {
+ for(i=0; i<=w-(int)sizeof(long); i+=sizeof(long)) {
long a = *(long*)(src+i);
long b = *(long*)(dst+i);
*(long*)(dst+i) = ((a&pb_7f) + (b&pb_7f)) ^ ((a^b)&pb_80)... |
CVE-2013-7010 | FFmpeg | https://github.com/FFmpeg/FFmpeg | libavcodec/dsputil.c | diff_bytes_c | static void diff_bytes_c(uint8_t *dst, const uint8_t *src1, const uint8_t *src2, int w) {
long i;
if((long)src2 & (sizeof(long)-1)) {
for(i=0; i+7<w; i+=8) {
dst[i+0] = src1[i+0]-src2[i+0];
dst[i+1] = src1[i+1]-src2[i+1];
dst[i+2] = src1[i+2]-src2[i+2];
ds... | static void diff_bytes_c(uint8_t *dst, const uint8_t *src1, const uint8_t *src2, int w) {
long i;
if((long)src2 & (sizeof(long)-1)) {
for(i=0; i+7<w; i+=8) {
dst[i+0] = src1[i+0]-src2[i+0];
dst[i+1] = src1[i+1]-src2[i+1];
dst[i+2] = src1[i+2]-src2[i+2];
ds... | static void diff_bytes_c(uint8_t *dst, const uint8_t *src1, const uint8_t *src2, int w) {
long i;
if((long)src2 & (sizeof(long)-1)) {
for(i=0; i+7<w; i+=8) {
dst[i+0] = src1[i+0]-src2[i+0];
dst[i+1] = src1[i+1]-src2[i+1];
dst[i+2] = src1[i+2]-src2[i+2];
ds... | static void diff_bytes_c(uint8_t *dst, const uint8_t *src1, const uint8_t *src2, int w) {
long i;
if((long)src2 & (sizeof(long)-1)) {
for(i=0; i+7<w; i+=8) {
dst[i+0] = src1[i+0]-src2[i+0];
dst[i+1] = src1[i+1]-src2[i+1];
dst[i+2] = src1[i+2]-src2[i+2];
ds... | static void diff_bytes_c(uint8_t *dst, const uint8_t *src1, const uint8_t *src2, int w) {
if((long)src2 & (sizeof(long)-1)) {
} else {
for(i=0; i<=w-sizeof(long); i+=sizeof(long)) {
long a = *(long*)(src1+i);
long b = *(long*)(src2+i);
*(long*)(dst+i) = ((a|pb_80) - (... | static void diff_bytes_c(uint8_t *dst, const uint8_t *src1, const uint8_t *src2, int w) {
if((long)src2 & (sizeof(long)-1)) {
} else {
for(i=0; i<=w-(int)sizeof(long); i+=sizeof(long)) {
long a = *(long*)(src1+i);
long b = *(long*)(src2+i);
*(long*)(dst+i) = ((a|pb_80... | static void diff_bytes_c(uint8_t *dst, const uint8_t *src1, const uint8_t *src2, int w) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if((long)src2 & (sizeof(long)-1)) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
} else {
for(i=0; i<=w-sizeof(long); i+=sizeof(long)) {
long a = *... | static void diff_bytes_c(uint8_t *dst, const uint8_t *src1, const uint8_t *src2, int w) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if((long)src2 & (sizeof(long)-1)) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
} else {
for(i=0; i<=w-(int)sizeof(long); i+=sizeof(long)) {
long ... | static void diff_bytes_c(uint8_t *dst, const uint8_t *src1, const uint8_t *src2, int w) {
if((long)src2 & (sizeof(long)-1)) {
} else {
- for(i=0; i<=w-sizeof(long); i+=sizeof(long)) {
+ for(i=0; i<=w-(int)sizeof(long); i+=sizeof(long)) {
long a = *(long*)(src1+i);
long... |
CVE-2013-7011 | FFmpeg | https://github.com/FFmpeg/FFmpeg | libavcodec/ffv1dec.c | read_header | static int read_header(FFV1Context *f) {
uint8_t state[CONTEXT_SIZE];
int i, j, context_count = -1;
RangeCoder *const c = &f->slice_context[0]->c;
memset(state, 128, sizeof(state));
if (f->version < 2) {
unsigned v= get_symbol(c, state, 0);
if (v >= 2) {
av_log(f->avctx, ... | static int read_header(FFV1Context *f) {
uint8_t state[CONTEXT_SIZE];
int i, j, context_count = -1;
RangeCoder *const c = &f->slice_context[0]->c;
memset(state, 128, sizeof(state));
if (f->version < 2) {
int chroma_planes, chroma_h_shift, chroma_v_shift, transparency;
unsigned v= get... | static int read_header(FFV1Context *f) {
uint8_t state[CONTEXT_SIZE];
int i, j, context_count = -1;
RangeCoder *const c = &f->slice_context[0]->c;
memset(state, 128, sizeof(state));
if (f->version < 2) {
unsigned v= get_symbol(c, state, 0);
if (v >= 2) {
av_log(f->avctx, ... | static int read_header(FFV1Context *f) {
uint8_t state[CONTEXT_SIZE];
int i, j, context_count = -1;
RangeCoder *const c = &f->slice_context[0]->c;
memset(state, 128, sizeof(state));
if (f->version < 2) {
int chroma_planes, chroma_h_shift, chroma_v_shift, transparency;
unsigned v= get... | static int read_header(FFV1Context *f) {
RangeCoder *const c = &f->slice_context[0]->c;
memset(state, 128, sizeof(state));
if (f->version < 2) {
unsigned v= get_symbol(c, state, 0);
f->ac = f->avctx->coder_type = get_symbol(c, state, 0);
if (f->ac > 1) {
for (i = 1; i < 2... | static int read_header(FFV1Context *f) {
RangeCoder *const c = &f->slice_context[0]->c;
memset(state, 128, sizeof(state));
if (f->version < 2) {
int chroma_planes, chroma_h_shift, chroma_v_shift, transparency;
unsigned v= get_symbol(c, state, 0);
f->ac = f->avctx->coder_type = get_sy... | static int read_header(FFV1Context *f) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
RangeCoder *const c = &f->slice_context[0]->c;
memset(state, 128, sizeof(state));
if (f->version < 2) {
unsigned v= get_symbol(c, state, 0);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
f->ac = f-... | static int read_header(FFV1Context *f) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
RangeCoder *const c = &f->slice_context[0]->c;
memset(state, 128, sizeof(state));
if (f->version < 2) {
int chroma_planes, chroma_h_shift, chroma_v_shift, transparency;
unsigned v= get_symbol(c, state,... | static int read_header(FFV1Context *f) {
RangeCoder *const c = &f->slice_context[0]->c;
memset(state, 128, sizeof(state));
if (f->version < 2) {
+ int chroma_planes, chroma_h_shift, chroma_v_shift, transparency;
unsigned v= get_symbol(c, state, 0);
f->ac = f->avctx->coder_type =... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.