idx
int64
func_before
string
Vulnerability Classification
string
vul
int64
func_after
string
patch
string
CWE ID
string
lines_before
string
lines_after
string
3,900
SProcCreateWindow(ClientPtr client) { REQUEST(xCreateWindowReq); swaps(&stuff->length); REQUEST_AT_LEAST_SIZE(xCreateWindowReq); swapl(&stuff->wid); swapl(&stuff->parent); swaps(&stuff->x); swaps(&stuff->y); swaps(&stuff->width); swaps(&stuff->height); swaps(&stuff->borderWidth);...
Exec Code Overflow
0
SProcCreateWindow(ClientPtr client) { REQUEST(xCreateWindowReq); swaps(&stuff->length); REQUEST_AT_LEAST_SIZE(xCreateWindowReq); swapl(&stuff->wid); swapl(&stuff->parent); swaps(&stuff->x); swaps(&stuff->y); swaps(&stuff->width); swaps(&stuff->height); swaps(&stuff->borderWidth);...
@@ -292,6 +292,13 @@ SProcSendEvent(ClientPtr client) swapl(&stuff->destination); swapl(&stuff->eventMask); + /* Generic events can have variable size, but SendEvent request holds + exactly 32B of event data. */ + if (stuff->event.u.u.type == GenericEvent) { + client->errorValue = stuff->...
CWE-119
null
null
3,901
SProcInternAtom(ClientPtr client) { REQUEST(xInternAtomReq); swaps(&stuff->length); REQUEST_AT_LEAST_SIZE(xInternAtomReq); swaps(&stuff->nbytes); return ((*ProcVector[X_InternAtom]) (client)); }
Exec Code Overflow
0
SProcInternAtom(ClientPtr client) { REQUEST(xInternAtomReq); swaps(&stuff->length); REQUEST_AT_LEAST_SIZE(xInternAtomReq); swaps(&stuff->nbytes); return ((*ProcVector[X_InternAtom]) (client)); }
@@ -292,6 +292,13 @@ SProcSendEvent(ClientPtr client) swapl(&stuff->destination); swapl(&stuff->eventMask); + /* Generic events can have variable size, but SendEvent request holds + exactly 32B of event data. */ + if (stuff->event.u.u.type == GenericEvent) { + client->errorValue = stuff->...
CWE-119
null
null
3,902
SProcResourceReq(ClientPtr client) { REQUEST(xResourceReq); swaps(&stuff->length); REQUEST_AT_LEAST_SIZE(xResourceReq); /* not EXACT */ swapl(&stuff->id); return (*ProcVector[stuff->reqType]) (client); }
Exec Code Overflow
0
SProcResourceReq(ClientPtr client) { REQUEST(xResourceReq); swaps(&stuff->length); REQUEST_AT_LEAST_SIZE(xResourceReq); /* not EXACT */ swapl(&stuff->id); return (*ProcVector[stuff->reqType]) (client); }
@@ -292,6 +292,13 @@ SProcSendEvent(ClientPtr client) swapl(&stuff->destination); swapl(&stuff->eventMask); + /* Generic events can have variable size, but SendEvent request holds + exactly 32B of event data. */ + if (stuff->event.u.u.type == GenericEvent) { + client->errorValue = stuff->...
CWE-119
null
null
3,903
SProcXSendExtensionEvent(ClientPtr client) { CARD32 *p; int i; xEvent eventT = { .u.u.type = 0 }; xEvent *eventP; EventSwapPtr proc; REQUEST(xSendExtensionEventReq); swaps(&stuff->length); REQUEST_AT_LEAST_SIZE(xSendExtensionEventReq); swapl(&stuff->destination); swaps(&stuff->c...
Exec Code Overflow
0
SProcXSendExtensionEvent(ClientPtr client) { CARD32 *p; int i; xEvent eventT = { .u.u.type = 0 }; xEvent *eventP; EventSwapPtr proc; REQUEST(xSendExtensionEventReq); swaps(&stuff->length); REQUEST_AT_LEAST_SIZE(xSendExtensionEventReq); swapl(&stuff->destination); swaps(&stuff->c...
@@ -117,7 +117,7 @@ SProcXSendExtensionEvent(ClientPtr client) int ProcXSendExtensionEvent(ClientPtr client) { - int ret; + int ret, i; DeviceIntPtr dev; xEvent *first; XEventClass *list; @@ -141,10 +141,12 @@ ProcXSendExtensionEvent(ClientPtr client) /* The client's event type must be one ...
CWE-119
null
null
3,904
extract_initial_length_and_fourcc (guint8 * data, guint64 * plength, guint32 * pfourcc) { guint64 length; guint32 fourcc; length = QT_UINT32 (data); GST_DEBUG ("length %08" G_GINT64_MODIFIER "x", length); fourcc = QT_FOURCC (data + 4); GST_DEBUG ("atom type %" GST_FOURCC_FORMAT, GST_FOURCC_ARGS (fourcc...
Exec Code Overflow
0
extract_initial_length_and_fourcc (guint8 * data, guint64 * plength, guint32 * pfourcc) { guint64 length; guint32 fourcc; length = QT_UINT32 (data); GST_DEBUG ("length %08" G_GINT64_MODIFIER "x", length); fourcc = QT_FOURCC (data + 4); GST_DEBUG ("atom type %" GST_FOURCC_FORMAT, GST_FOURCC_ARGS (fourcc...
@@ -3058,13 +3058,13 @@ qtdemux_parse_samples (GstQTDemux * qtdemux, QtDemuxStream * stream, stream->min_duration = 0; time = 0; index = 0; - for (i = 0; i < n_sample_times; i++) { + for (i = 0; (i < n_sample_times) && (index < stream->n_samples); i++) { guint32 n; guint32 duration; ...
CWE-119
null
null
3,905
gst_qtdemux_activate_segment (GstQTDemux * qtdemux, QtDemuxStream * stream, guint32 seg_idx, guint64 offset) { GstEvent *event; QtDemuxSegment *segment; guint32 index, kf_index; guint64 seg_time; guint64 start, stop, time; gdouble rate; GST_LOG_OBJECT (qtdemux, "activate segment %d, offset %" G_GUINT...
Exec Code Overflow
0
gst_qtdemux_activate_segment (GstQTDemux * qtdemux, QtDemuxStream * stream, guint32 seg_idx, guint64 offset) { GstEvent *event; QtDemuxSegment *segment; guint32 index, kf_index; guint64 seg_time; guint64 start, stop, time; gdouble rate; GST_LOG_OBJECT (qtdemux, "activate segment %d, offset %" G_GUINT...
@@ -3058,13 +3058,13 @@ qtdemux_parse_samples (GstQTDemux * qtdemux, QtDemuxStream * stream, stream->min_duration = 0; time = 0; index = 0; - for (i = 0; i < n_sample_times; i++) { + for (i = 0; (i < n_sample_times) && (index < stream->n_samples); i++) { guint32 n; guint32 duration; ...
CWE-119
null
null
3,906
gst_qtdemux_advance_sample (GstQTDemux * qtdemux, QtDemuxStream * stream) { QtDemuxSample *sample; QtDemuxSegment *segment; if (stream->sample_index >= stream->to_sample) { /* Mark the stream as EOS */ GST_DEBUG_OBJECT (qtdemux, "reached max allowed sample %u, mark EOS", stream->to_sample); s...
Exec Code Overflow
0
gst_qtdemux_advance_sample (GstQTDemux * qtdemux, QtDemuxStream * stream) { QtDemuxSample *sample; QtDemuxSegment *segment; if (stream->sample_index >= stream->to_sample) { /* Mark the stream as EOS */ GST_DEBUG_OBJECT (qtdemux, "reached max allowed sample %u, mark EOS", stream->to_sample); s...
@@ -3058,13 +3058,13 @@ qtdemux_parse_samples (GstQTDemux * qtdemux, QtDemuxStream * stream, stream->min_duration = 0; time = 0; index = 0; - for (i = 0; i < n_sample_times; i++) { + for (i = 0; (i < n_sample_times) && (index < stream->n_samples); i++) { guint32 n; guint32 duration; ...
CWE-119
null
null
3,907
gst_qtdemux_chain (GstPad * sinkpad, GstBuffer * inbuf) { GstQTDemux *demux; GstFlowReturn ret = GST_FLOW_OK; demux = GST_QTDEMUX (gst_pad_get_parent (sinkpad)); gst_adapter_push (demux->adapter, inbuf); GST_DEBUG_OBJECT (demux, "pushing in inbuf %p, neededbytes:%u, available:%u", inbuf, demux->neede...
Exec Code Overflow
0
gst_qtdemux_chain (GstPad * sinkpad, GstBuffer * inbuf) { GstQTDemux *demux; GstFlowReturn ret = GST_FLOW_OK; demux = GST_QTDEMUX (gst_pad_get_parent (sinkpad)); gst_adapter_push (demux->adapter, inbuf); GST_DEBUG_OBJECT (demux, "pushing in inbuf %p, neededbytes:%u, available:%u", inbuf, demux->neede...
@@ -3058,13 +3058,13 @@ qtdemux_parse_samples (GstQTDemux * qtdemux, QtDemuxStream * stream, stream->min_duration = 0; time = 0; index = 0; - for (i = 0; i < n_sample_times; i++) { + for (i = 0; (i < n_sample_times) && (index < stream->n_samples); i++) { guint32 n; guint32 duration; ...
CWE-119
null
null
3,908
gst_qtdemux_class_init (GstQTDemuxClass * klass) { GObjectClass *gobject_class; GstElementClass *gstelement_class; gobject_class = (GObjectClass *) klass; gstelement_class = (GstElementClass *) klass; parent_class = g_type_class_peek_parent (klass); gobject_class->dispose = gst_qtdemux_dispose; gstele...
Exec Code Overflow
0
gst_qtdemux_class_init (GstQTDemuxClass * klass) { GObjectClass *gobject_class; GstElementClass *gstelement_class; gobject_class = (GObjectClass *) klass; gstelement_class = (GstElementClass *) klass; parent_class = g_type_class_peek_parent (klass); gobject_class->dispose = gst_qtdemux_dispose; gstele...
@@ -3058,13 +3058,13 @@ qtdemux_parse_samples (GstQTDemux * qtdemux, QtDemuxStream * stream, stream->min_duration = 0; time = 0; index = 0; - for (i = 0; i < n_sample_times; i++) { + for (i = 0; (i < n_sample_times) && (index < stream->n_samples); i++) { guint32 n; guint32 duration; ...
CWE-119
null
null
3,909
gst_qtdemux_clip_buffer (GstQTDemux * qtdemux, QtDemuxStream * stream, GstBuffer * buf) { gint64 start, stop, cstart, cstop, diff; GstClockTime timestamp = GST_CLOCK_TIME_NONE, duration = GST_CLOCK_TIME_NONE; guint8 *data; guint size; gint num_rate, denom_rate; gint frame_size; gboolean clip_data; ...
Exec Code Overflow
0
gst_qtdemux_clip_buffer (GstQTDemux * qtdemux, QtDemuxStream * stream, GstBuffer * buf) { gint64 start, stop, cstart, cstop, diff; GstClockTime timestamp = GST_CLOCK_TIME_NONE, duration = GST_CLOCK_TIME_NONE; guint8 *data; guint size; gint num_rate, denom_rate; gint frame_size; gboolean clip_data; ...
@@ -3058,13 +3058,13 @@ qtdemux_parse_samples (GstQTDemux * qtdemux, QtDemuxStream * stream, stream->min_duration = 0; time = 0; index = 0; - for (i = 0; i < n_sample_times; i++) { + for (i = 0; (i < n_sample_times) && (index < stream->n_samples); i++) { guint32 n; guint32 duration; ...
CWE-119
null
null
3,910
gst_qtdemux_combine_flows (GstQTDemux * demux, QtDemuxStream * stream, GstFlowReturn ret) { gint i; gboolean unexpected = FALSE, not_linked = TRUE; GST_LOG_OBJECT (demux, "flow return: %s", gst_flow_get_name (ret)); /* store the value */ stream->last_ret = ret; for (i = 0; i < demux->n_streams; i++) ...
Exec Code Overflow
0
gst_qtdemux_combine_flows (GstQTDemux * demux, QtDemuxStream * stream, GstFlowReturn ret) { gint i; gboolean unexpected = FALSE, not_linked = TRUE; GST_LOG_OBJECT (demux, "flow return: %s", gst_flow_get_name (ret)); /* store the value */ stream->last_ret = ret; for (i = 0; i < demux->n_streams; i++) ...
@@ -3058,13 +3058,13 @@ qtdemux_parse_samples (GstQTDemux * qtdemux, QtDemuxStream * stream, stream->min_duration = 0; time = 0; index = 0; - for (i = 0; i < n_sample_times; i++) { + for (i = 0; (i < n_sample_times) && (index < stream->n_samples); i++) { guint32 n; guint32 duration; ...
CWE-119
null
null
3,911
gst_qtdemux_dispose (GObject * object) { GstQTDemux *qtdemux = GST_QTDEMUX (object); if (qtdemux->adapter) { g_object_unref (G_OBJECT (qtdemux->adapter)); qtdemux->adapter = NULL; } G_OBJECT_CLASS (parent_class)->dispose (object); }
Exec Code Overflow
0
gst_qtdemux_dispose (GObject * object) { GstQTDemux *qtdemux = GST_QTDEMUX (object); if (qtdemux->adapter) { g_object_unref (G_OBJECT (qtdemux->adapter)); qtdemux->adapter = NULL; } G_OBJECT_CLASS (parent_class)->dispose (object); }
@@ -3058,13 +3058,13 @@ qtdemux_parse_samples (GstQTDemux * qtdemux, QtDemuxStream * stream, stream->min_duration = 0; time = 0; index = 0; - for (i = 0; i < n_sample_times; i++) { + for (i = 0; (i < n_sample_times) && (index < stream->n_samples); i++) { guint32 n; guint32 duration; ...
CWE-119
null
null
3,912
gst_qtdemux_do_seek (GstQTDemux * qtdemux, GstPad * pad, GstEvent * event) { gdouble rate; GstFormat format; GstSeekFlags flags; GstSeekType cur_type, stop_type; gint64 cur, stop; gboolean flush; gboolean res; gboolean update; GstSegment seeksegment; int i; if (event) { GST_DEBUG_OBJECT (qtde...
Exec Code Overflow
0
gst_qtdemux_do_seek (GstQTDemux * qtdemux, GstPad * pad, GstEvent * event) { gdouble rate; GstFormat format; GstSeekFlags flags; GstSeekType cur_type, stop_type; gint64 cur, stop; gboolean flush; gboolean res; gboolean update; GstSegment seeksegment; int i; if (event) { GST_DEBUG_OBJECT (qtde...
@@ -3058,13 +3058,13 @@ qtdemux_parse_samples (GstQTDemux * qtdemux, QtDemuxStream * stream, stream->min_duration = 0; time = 0; index = 0; - for (i = 0; i < n_sample_times; i++) { + for (i = 0; (i < n_sample_times) && (index < stream->n_samples); i++) { guint32 n; guint32 duration; ...
CWE-119
null
null
3,913
gst_qtdemux_find_index (GstQTDemux * qtdemux, QtDemuxStream * str, guint64 media_time) { guint32 i; if (str->n_samples == 0) return 0; for (i = 0; i < str->n_samples; i++) { if (str->samples[i].timestamp > media_time) { /* first sample after media_time, we need the previous one */ return...
Exec Code Overflow
0
gst_qtdemux_find_index (GstQTDemux * qtdemux, QtDemuxStream * str, guint64 media_time) { guint32 i; if (str->n_samples == 0) return 0; for (i = 0; i < str->n_samples; i++) { if (str->samples[i].timestamp > media_time) { /* first sample after media_time, we need the previous one */ return...
@@ -3058,13 +3058,13 @@ qtdemux_parse_samples (GstQTDemux * qtdemux, QtDemuxStream * stream, stream->min_duration = 0; time = 0; index = 0; - for (i = 0; i < n_sample_times; i++) { + for (i = 0; (i < n_sample_times) && (index < stream->n_samples); i++) { guint32 n; guint32 duration; ...
CWE-119
null
null
3,914
gst_qtdemux_find_keyframe (GstQTDemux * qtdemux, QtDemuxStream * str, guint32 index) { guint32 new_index = index; if (index >= str->n_samples) { new_index = str->n_samples; goto beach; } /* all keyframes, return index */ if (str->all_keyframe) { new_index = index; goto beach; } /* e...
Exec Code Overflow
0
gst_qtdemux_find_keyframe (GstQTDemux * qtdemux, QtDemuxStream * str, guint32 index) { guint32 new_index = index; if (index >= str->n_samples) { new_index = str->n_samples; goto beach; } /* all keyframes, return index */ if (str->all_keyframe) { new_index = index; goto beach; } /* e...
@@ -3058,13 +3058,13 @@ qtdemux_parse_samples (GstQTDemux * qtdemux, QtDemuxStream * stream, stream->min_duration = 0; time = 0; index = 0; - for (i = 0; i < n_sample_times; i++) { + for (i = 0; (i < n_sample_times) && (index < stream->n_samples); i++) { guint32 n; guint32 duration; ...
CWE-119
null
null
3,915
gst_qtdemux_find_segment (GstQTDemux * qtdemux, QtDemuxStream * stream, guint64 time_position) { gint i; guint32 seg_idx; GST_LOG_OBJECT (qtdemux, "finding segment for %" GST_TIME_FORMAT, GST_TIME_ARGS (time_position)); /* find segment corresponding to time_position if we are looking * for a segm...
Exec Code Overflow
0
gst_qtdemux_find_segment (GstQTDemux * qtdemux, QtDemuxStream * stream, guint64 time_position) { gint i; guint32 seg_idx; GST_LOG_OBJECT (qtdemux, "finding segment for %" GST_TIME_FORMAT, GST_TIME_ARGS (time_position)); /* find segment corresponding to time_position if we are looking * for a segm...
@@ -3058,13 +3058,13 @@ qtdemux_parse_samples (GstQTDemux * qtdemux, QtDemuxStream * stream, stream->min_duration = 0; time = 0; index = 0; - for (i = 0; i < n_sample_times; i++) { + for (i = 0; (i < n_sample_times) && (index < stream->n_samples); i++) { guint32 n; guint32 duration; ...
CWE-119
null
null
3,916
gst_qtdemux_get_duration (GstQTDemux * qtdemux, gint64 * duration) { gboolean res = TRUE; *duration = GST_CLOCK_TIME_NONE; if (qtdemux->duration != 0) { if (qtdemux->duration != G_MAXINT32 && qtdemux->timescale != 0) { *duration = gst_util_uint64_scale (qtdemux->duration, GST_SECOND, qtdemux...
Exec Code Overflow
0
gst_qtdemux_get_duration (GstQTDemux * qtdemux, gint64 * duration) { gboolean res = TRUE; *duration = GST_CLOCK_TIME_NONE; if (qtdemux->duration != 0) { if (qtdemux->duration != G_MAXINT32 && qtdemux->timescale != 0) { *duration = gst_util_uint64_scale (qtdemux->duration, GST_SECOND, qtdemux...
@@ -3058,13 +3058,13 @@ qtdemux_parse_samples (GstQTDemux * qtdemux, QtDemuxStream * stream, stream->min_duration = 0; time = 0; index = 0; - for (i = 0; i < n_sample_times; i++) { + for (i = 0; (i < n_sample_times) && (index < stream->n_samples); i++) { guint32 n; guint32 duration; ...
CWE-119
null
null
3,917
gst_qtdemux_get_src_query_types (GstPad * pad) { static const GstQueryType src_types[] = { GST_QUERY_POSITION, GST_QUERY_DURATION, GST_QUERY_SEEKING, 0 }; return src_types; }
Exec Code Overflow
0
gst_qtdemux_get_src_query_types (GstPad * pad) { static const GstQueryType src_types[] = { GST_QUERY_POSITION, GST_QUERY_DURATION, GST_QUERY_SEEKING, 0 }; return src_types; }
@@ -3058,13 +3058,13 @@ qtdemux_parse_samples (GstQTDemux * qtdemux, QtDemuxStream * stream, stream->min_duration = 0; time = 0; index = 0; - for (i = 0; i < n_sample_times; i++) { + for (i = 0; (i < n_sample_times) && (index < stream->n_samples); i++) { guint32 n; guint32 duration; ...
CWE-119
null
null
3,918
gst_qtdemux_get_type (void) { static GType qtdemux_type = 0; if (!qtdemux_type) { static const GTypeInfo qtdemux_info = { sizeof (GstQTDemuxClass), (GBaseInitFunc) gst_qtdemux_base_init, NULL, (GClassInitFunc) gst_qtdemux_class_init, NULL, NULL, sizeof (GstQTDemux), 0, (GInstanceI...
Exec Code Overflow
0
gst_qtdemux_get_type (void) { static GType qtdemux_type = 0; if (!qtdemux_type) { static const GTypeInfo qtdemux_info = { sizeof (GstQTDemuxClass), (GBaseInitFunc) gst_qtdemux_base_init, NULL, (GClassInitFunc) gst_qtdemux_class_init, NULL, NULL, sizeof (GstQTDemux), 0, (GInstanceI...
@@ -3058,13 +3058,13 @@ qtdemux_parse_samples (GstQTDemux * qtdemux, QtDemuxStream * stream, stream->min_duration = 0; time = 0; index = 0; - for (i = 0; i < n_sample_times; i++) { + for (i = 0; (i < n_sample_times) && (index < stream->n_samples); i++) { guint32 n; guint32 duration; ...
CWE-119
null
null
3,919
gst_qtdemux_handle_esds (GstQTDemux * qtdemux, QtDemuxStream * stream, GNode * esds, GstTagList * list) { int len = QT_UINT32 (esds->data); guint8 *ptr = esds->data; guint8 *end = ptr + len; int tag; guint8 *data_ptr = NULL; int data_len = 0; guint8 object_type_id = 0; qtdemux_dump_mem (ptr, len); ...
Exec Code Overflow
0
gst_qtdemux_handle_esds (GstQTDemux * qtdemux, QtDemuxStream * stream, GNode * esds, GstTagList * list) { int len = QT_UINT32 (esds->data); guint8 *ptr = esds->data; guint8 *end = ptr + len; int tag; guint8 *data_ptr = NULL; int data_len = 0; guint8 object_type_id = 0; qtdemux_dump_mem (ptr, len); ...
@@ -3058,13 +3058,13 @@ qtdemux_parse_samples (GstQTDemux * qtdemux, QtDemuxStream * stream, stream->min_duration = 0; time = 0; index = 0; - for (i = 0; i < n_sample_times; i++) { + for (i = 0; (i < n_sample_times) && (index < stream->n_samples); i++) { guint32 n; guint32 duration; ...
CWE-119
null
null
3,920
gst_qtdemux_handle_sink_event (GstPad * sinkpad, GstEvent * event) { GstQTDemux *demux = GST_QTDEMUX (GST_PAD_PARENT (sinkpad)); gboolean res; switch (GST_EVENT_TYPE (event)) { case GST_EVENT_NEWSEGMENT: /* We need to convert it to a GST_FORMAT_TIME new segment */ gst_event_unref (event); r...
Exec Code Overflow
0
gst_qtdemux_handle_sink_event (GstPad * sinkpad, GstEvent * event) { GstQTDemux *demux = GST_QTDEMUX (GST_PAD_PARENT (sinkpad)); gboolean res; switch (GST_EVENT_TYPE (event)) { case GST_EVENT_NEWSEGMENT: /* We need to convert it to a GST_FORMAT_TIME new segment */ gst_event_unref (event); r...
@@ -3058,13 +3058,13 @@ qtdemux_parse_samples (GstQTDemux * qtdemux, QtDemuxStream * stream, stream->min_duration = 0; time = 0; index = 0; - for (i = 0; i < n_sample_times; i++) { + for (i = 0; (i < n_sample_times) && (index < stream->n_samples); i++) { guint32 n; guint32 duration; ...
CWE-119
null
null
3,921
gst_qtdemux_handle_src_query (GstPad * pad, GstQuery * query) { gboolean res = FALSE; GstQTDemux *qtdemux = GST_QTDEMUX (gst_pad_get_parent (pad)); switch (GST_QUERY_TYPE (query)) { case GST_QUERY_POSITION: if (GST_CLOCK_TIME_IS_VALID (qtdemux->segment.last_stop)) { gst_query_set_position (quer...
Exec Code Overflow
0
gst_qtdemux_handle_src_query (GstPad * pad, GstQuery * query) { gboolean res = FALSE; GstQTDemux *qtdemux = GST_QTDEMUX (gst_pad_get_parent (pad)); switch (GST_QUERY_TYPE (query)) { case GST_QUERY_POSITION: if (GST_CLOCK_TIME_IS_VALID (qtdemux->segment.last_stop)) { gst_query_set_position (quer...
@@ -3058,13 +3058,13 @@ qtdemux_parse_samples (GstQTDemux * qtdemux, QtDemuxStream * stream, stream->min_duration = 0; time = 0; index = 0; - for (i = 0; i < n_sample_times; i++) { + for (i = 0; (i < n_sample_times) && (index < stream->n_samples); i++) { guint32 n; guint32 duration; ...
CWE-119
null
null
3,922
gst_qtdemux_init (GstQTDemux * qtdemux) { qtdemux->sinkpad = gst_pad_new_from_static_template (&gst_qtdemux_sink_template, "sink"); gst_pad_set_activate_function (qtdemux->sinkpad, qtdemux_sink_activate); gst_pad_set_activatepull_function (qtdemux->sinkpad, qtdemux_sink_activate_pull); gst_pad_set_a...
Exec Code Overflow
0
gst_qtdemux_init (GstQTDemux * qtdemux) { qtdemux->sinkpad = gst_pad_new_from_static_template (&gst_qtdemux_sink_template, "sink"); gst_pad_set_activate_function (qtdemux->sinkpad, qtdemux_sink_activate); gst_pad_set_activatepull_function (qtdemux->sinkpad, qtdemux_sink_activate_pull); gst_pad_set_a...
@@ -3058,13 +3058,13 @@ qtdemux_parse_samples (GstQTDemux * qtdemux, QtDemuxStream * stream, stream->min_duration = 0; time = 0; index = 0; - for (i = 0; i < n_sample_times; i++) { + for (i = 0; (i < n_sample_times) && (index < stream->n_samples); i++) { guint32 n; guint32 duration; ...
CWE-119
null
null
3,923
gst_qtdemux_loop_state_header (GstQTDemux * qtdemux) { guint64 length; guint32 fourcc; GstBuffer *buf = NULL; GstFlowReturn ret = GST_FLOW_OK; guint64 cur_offset = qtdemux->offset; ret = gst_pad_pull_range (qtdemux->sinkpad, cur_offset, 16, &buf); if (ret != GST_FLOW_OK) goto beach; extract_initial...
Exec Code Overflow
0
gst_qtdemux_loop_state_header (GstQTDemux * qtdemux) { guint64 length; guint32 fourcc; GstBuffer *buf = NULL; GstFlowReturn ret = GST_FLOW_OK; guint64 cur_offset = qtdemux->offset; ret = gst_pad_pull_range (qtdemux->sinkpad, cur_offset, 16, &buf); if (ret != GST_FLOW_OK) goto beach; extract_initial...
@@ -3058,13 +3058,13 @@ qtdemux_parse_samples (GstQTDemux * qtdemux, QtDemuxStream * stream, stream->min_duration = 0; time = 0; index = 0; - for (i = 0; i < n_sample_times; i++) { + for (i = 0; (i < n_sample_times) && (index < stream->n_samples); i++) { guint32 n; guint32 duration; ...
CWE-119
null
null
3,924
gst_qtdemux_loop_state_movie (GstQTDemux * qtdemux) { GstFlowReturn ret = GST_FLOW_OK; GstBuffer *buf = NULL; QtDemuxStream *stream; guint64 min_time; guint64 offset; guint64 timestamp; guint64 duration; gboolean keyframe; guint size; gint index; gint i; gst_qtdemux_push_pending_newsegment (qtd...
Exec Code Overflow
0
gst_qtdemux_loop_state_movie (GstQTDemux * qtdemux) { GstFlowReturn ret = GST_FLOW_OK; GstBuffer *buf = NULL; QtDemuxStream *stream; guint64 min_time; guint64 offset; guint64 timestamp; guint64 duration; gboolean keyframe; guint size; gint index; gint i; gst_qtdemux_push_pending_newsegment (qtd...
@@ -3058,13 +3058,13 @@ qtdemux_parse_samples (GstQTDemux * qtdemux, QtDemuxStream * stream, stream->min_duration = 0; time = 0; index = 0; - for (i = 0; i < n_sample_times; i++) { + for (i = 0; (i < n_sample_times) && (index < stream->n_samples); i++) { guint32 n; guint32 duration; ...
CWE-119
null
null
3,925
gst_qtdemux_move_stream (GstQTDemux * qtdemux, QtDemuxStream * str, guint32 index) { /* no change needed */ if (index == str->sample_index) return; GST_DEBUG_OBJECT (qtdemux, "moving to sample %u of %u", index, str->n_samples); /* position changed, we have a discont */ str->sample_index = inde...
Exec Code Overflow
0
gst_qtdemux_move_stream (GstQTDemux * qtdemux, QtDemuxStream * str, guint32 index) { /* no change needed */ if (index == str->sample_index) return; GST_DEBUG_OBJECT (qtdemux, "moving to sample %u of %u", index, str->n_samples); /* position changed, we have a discont */ str->sample_index = inde...
@@ -3058,13 +3058,13 @@ qtdemux_parse_samples (GstQTDemux * qtdemux, QtDemuxStream * stream, stream->min_duration = 0; time = 0; index = 0; - for (i = 0; i < n_sample_times; i++) { + for (i = 0; (i < n_sample_times) && (index < stream->n_samples); i++) { guint32 n; guint32 duration; ...
CWE-119
null
null
3,926
gst_qtdemux_perform_seek (GstQTDemux * qtdemux, GstSegment * segment) { gint64 desired_offset; gint n; desired_offset = segment->last_stop; GST_DEBUG_OBJECT (qtdemux, "seeking to %" GST_TIME_FORMAT, GST_TIME_ARGS (desired_offset)); if (segment->flags & GST_SEEK_FLAG_KEY_UNIT) { guint64 min_offset...
Exec Code Overflow
0
gst_qtdemux_perform_seek (GstQTDemux * qtdemux, GstSegment * segment) { gint64 desired_offset; gint n; desired_offset = segment->last_stop; GST_DEBUG_OBJECT (qtdemux, "seeking to %" GST_TIME_FORMAT, GST_TIME_ARGS (desired_offset)); if (segment->flags & GST_SEEK_FLAG_KEY_UNIT) { guint64 min_offset...
@@ -3058,13 +3058,13 @@ qtdemux_parse_samples (GstQTDemux * qtdemux, QtDemuxStream * stream, stream->min_duration = 0; time = 0; index = 0; - for (i = 0; i < n_sample_times; i++) { + for (i = 0; (i < n_sample_times) && (index < stream->n_samples); i++) { guint32 n; guint32 duration; ...
CWE-119
null
null
3,927
gst_qtdemux_post_progress (GstQTDemux * demux, gint num, gint denom) { gint perc = (gint) ((gdouble) num * 100.0 / (gdouble) denom); gst_element_post_message (GST_ELEMENT_CAST (demux), gst_message_new_element (GST_OBJECT_CAST (demux), gst_structure_new ("progress", "percent", G_TYPE_INT, perc, NULL...
Exec Code Overflow
0
gst_qtdemux_post_progress (GstQTDemux * demux, gint num, gint denom) { gint perc = (gint) ((gdouble) num * 100.0 / (gdouble) denom); gst_element_post_message (GST_ELEMENT_CAST (demux), gst_message_new_element (GST_OBJECT_CAST (demux), gst_structure_new ("progress", "percent", G_TYPE_INT, perc, NULL...
@@ -3058,13 +3058,13 @@ qtdemux_parse_samples (GstQTDemux * qtdemux, QtDemuxStream * stream, stream->min_duration = 0; time = 0; index = 0; - for (i = 0; i < n_sample_times; i++) { + for (i = 0; (i < n_sample_times) && (index < stream->n_samples); i++) { guint32 n; guint32 duration; ...
CWE-119
null
null
3,928
gst_qtdemux_prepare_current_sample (GstQTDemux * qtdemux, QtDemuxStream * stream, guint64 * offset, guint * size, guint64 * timestamp, guint64 * duration, gboolean * keyframe) { QtDemuxSample *sample; guint64 time_position; guint32 seg_idx; g_return_val_if_fail (stream != NULL, FALSE); time_position...
Exec Code Overflow
0
gst_qtdemux_prepare_current_sample (GstQTDemux * qtdemux, QtDemuxStream * stream, guint64 * offset, guint * size, guint64 * timestamp, guint64 * duration, gboolean * keyframe) { QtDemuxSample *sample; guint64 time_position; guint32 seg_idx; g_return_val_if_fail (stream != NULL, FALSE); time_position...
@@ -3058,13 +3058,13 @@ qtdemux_parse_samples (GstQTDemux * qtdemux, QtDemuxStream * stream, stream->min_duration = 0; time = 0; index = 0; - for (i = 0; i < n_sample_times; i++) { + for (i = 0; (i < n_sample_times) && (index < stream->n_samples); i++) { guint32 n; guint32 duration; ...
CWE-119
null
null
3,929
gst_qtdemux_push_pending_newsegment (GstQTDemux * qtdemux) { if (qtdemux->pending_newsegment) { gst_qtdemux_push_event (qtdemux, qtdemux->pending_newsegment); qtdemux->pending_newsegment = NULL; } }
Exec Code Overflow
0
gst_qtdemux_push_pending_newsegment (GstQTDemux * qtdemux) { if (qtdemux->pending_newsegment) { gst_qtdemux_push_event (qtdemux, qtdemux->pending_newsegment); qtdemux->pending_newsegment = NULL; } }
@@ -3058,13 +3058,13 @@ qtdemux_parse_samples (GstQTDemux * qtdemux, QtDemuxStream * stream, stream->min_duration = 0; time = 0; index = 0; - for (i = 0; i < n_sample_times; i++) { + for (i = 0; (i < n_sample_times) && (index < stream->n_samples); i++) { guint32 n; guint32 duration; ...
CWE-119
null
null
3,930
qtdemux_inflate (void *z_buffer, int z_length, int length) { guint8 *buffer; z_stream *z; int ret; z = g_new0 (z_stream, 1); z->zalloc = qtdemux_zalloc; z->zfree = qtdemux_zfree; z->opaque = NULL; z->next_in = z_buffer; z->avail_in = z_length; buffer = (guint8 *) g_malloc (length); ret = inflat...
Exec Code Overflow
0
qtdemux_inflate (void *z_buffer, int z_length, int length) { guint8 *buffer; z_stream *z; int ret; z = g_new0 (z_stream, 1); z->zalloc = qtdemux_zalloc; z->zfree = qtdemux_zfree; z->opaque = NULL; z->next_in = z_buffer; z->avail_in = z_length; buffer = (guint8 *) g_malloc (length); ret = inflat...
@@ -3058,13 +3058,13 @@ qtdemux_parse_samples (GstQTDemux * qtdemux, QtDemuxStream * stream, stream->min_duration = 0; time = 0; index = 0; - for (i = 0; i < n_sample_times; i++) { + for (i = 0; (i < n_sample_times) && (index < stream->n_samples); i++) { guint32 n; guint32 duration; ...
CWE-119
null
null
3,931
qtdemux_parse_container (GstQTDemux * qtdemux, GNode * node, guint8 * buf, guint8 * end) { while (buf < end) { GNode *child; guint32 len; if (buf + 4 > end) { GST_LOG_OBJECT (qtdemux, "buffer overrun"); break; } len = QT_UINT32 (buf); if (len == 0) { GST_LOG_OBJECT (qtde...
Exec Code Overflow
0
qtdemux_parse_container (GstQTDemux * qtdemux, GNode * node, guint8 * buf, guint8 * end) { while (buf < end) { GNode *child; guint32 len; if (buf + 4 > end) { GST_LOG_OBJECT (qtdemux, "buffer overrun"); break; } len = QT_UINT32 (buf); if (len == 0) { GST_LOG_OBJECT (qtde...
@@ -3058,13 +3058,13 @@ qtdemux_parse_samples (GstQTDemux * qtdemux, QtDemuxStream * stream, stream->min_duration = 0; time = 0; index = 0; - for (i = 0; i < n_sample_times; i++) { + for (i = 0; (i < n_sample_times) && (index < stream->n_samples); i++) { guint32 n; guint32 duration; ...
CWE-119
null
null
3,932
qtdemux_parse_moov (GstQTDemux * qtdemux, guint8 * buffer, int length) { GNode *cmov; qtdemux->moov_node = g_node_new (buffer); GST_DEBUG_OBJECT (qtdemux, "parsing 'moov' atom"); qtdemux_parse_node (qtdemux, qtdemux->moov_node, buffer, length); cmov = qtdemux_tree_get_child_by_type (qtdemux->moov_node, FOU...
Exec Code Overflow
0
qtdemux_parse_moov (GstQTDemux * qtdemux, guint8 * buffer, int length) { GNode *cmov; qtdemux->moov_node = g_node_new (buffer); GST_DEBUG_OBJECT (qtdemux, "parsing 'moov' atom"); qtdemux_parse_node (qtdemux, qtdemux->moov_node, buffer, length); cmov = qtdemux_tree_get_child_by_type (qtdemux->moov_node, FOU...
@@ -3058,13 +3058,13 @@ qtdemux_parse_samples (GstQTDemux * qtdemux, QtDemuxStream * stream, stream->min_duration = 0; time = 0; index = 0; - for (i = 0; i < n_sample_times; i++) { + for (i = 0; (i < n_sample_times) && (index < stream->n_samples); i++) { guint32 n; guint32 duration; ...
CWE-119
null
null
3,933
qtdemux_parse_node (GstQTDemux * qtdemux, GNode * node, guint8 * buffer, int length) { guint32 fourcc; guint32 node_length; const QtNodeType *type; guint8 *end; GST_LOG_OBJECT (qtdemux, "qtdemux_parse buffer %p length %d", buffer, length); node_length = QT_UINT32 (buffer); fourcc = QT_FOURCC (buffer...
Exec Code Overflow
0
qtdemux_parse_node (GstQTDemux * qtdemux, GNode * node, guint8 * buffer, int length) { guint32 fourcc; guint32 node_length; const QtNodeType *type; guint8 *end; GST_LOG_OBJECT (qtdemux, "qtdemux_parse buffer %p length %d", buffer, length); node_length = QT_UINT32 (buffer); fourcc = QT_FOURCC (buffer...
@@ -3058,13 +3058,13 @@ qtdemux_parse_samples (GstQTDemux * qtdemux, QtDemuxStream * stream, stream->min_duration = 0; time = 0; index = 0; - for (i = 0; i < n_sample_times; i++) { + for (i = 0; (i < n_sample_times) && (index < stream->n_samples); i++) { guint32 n; guint32 duration; ...
CWE-119
null
null
3,934
qtdemux_parse_segments (GstQTDemux * qtdemux, QtDemuxStream * stream, GNode * trak) { GNode *edts; /* parse and prepare segment info from the edit list */ GST_DEBUG_OBJECT (qtdemux, "looking for edit list container"); stream->n_segments = 0; stream->segments = NULL; if ((edts = qtdemux_tree_get_child_b...
Exec Code Overflow
0
qtdemux_parse_segments (GstQTDemux * qtdemux, QtDemuxStream * stream, GNode * trak) { GNode *edts; /* parse and prepare segment info from the edit list */ GST_DEBUG_OBJECT (qtdemux, "looking for edit list container"); stream->n_segments = 0; stream->segments = NULL; if ((edts = qtdemux_tree_get_child_b...
@@ -3058,13 +3058,13 @@ qtdemux_parse_samples (GstQTDemux * qtdemux, QtDemuxStream * stream, stream->min_duration = 0; time = 0; index = 0; - for (i = 0; i < n_sample_times; i++) { + for (i = 0; (i < n_sample_times) && (index < stream->n_samples); i++) { guint32 n; guint32 duration; ...
CWE-119
null
null
3,935
qtdemux_parse_theora_extension (GstQTDemux * qtdemux, QtDemuxStream * stream, GNode * xdxt) { int len = QT_UINT32 (xdxt->data); guint8 *buf = xdxt->data; guint8 *end = buf + len; GstBuffer *buffer; /* skip size and type */ buf += 8; end -= 8; while (buf < end) { gint size; guint32 type; ...
Exec Code Overflow
0
qtdemux_parse_theora_extension (GstQTDemux * qtdemux, QtDemuxStream * stream, GNode * xdxt) { int len = QT_UINT32 (xdxt->data); guint8 *buf = xdxt->data; guint8 *end = buf + len; GstBuffer *buffer; /* skip size and type */ buf += 8; end -= 8; while (buf < end) { gint size; guint32 type; ...
@@ -3058,13 +3058,13 @@ qtdemux_parse_samples (GstQTDemux * qtdemux, QtDemuxStream * stream, stream->min_duration = 0; time = 0; index = 0; - for (i = 0; i < n_sample_times; i++) { + for (i = 0; (i < n_sample_times) && (index < stream->n_samples); i++) { guint32 n; guint32 duration; ...
CWE-119
null
null
3,936
qtdemux_parse_trak (GstQTDemux * qtdemux, GNode * trak) { int offset; GNode *tkhd; GNode *mdia; GNode *mdhd; GNode *hdlr; GNode *minf; GNode *stbl; GNode *stsd; GNode *mp4a; GNode *mp4v; GNode *wave; GNode *esds; QtDemuxStream *stream; GstTagList *list = NULL; gchar *codec = NULL; const ...
Exec Code Overflow
0
qtdemux_parse_trak (GstQTDemux * qtdemux, GNode * trak) { int offset; GNode *tkhd; GNode *mdia; GNode *mdhd; GNode *hdlr; GNode *minf; GNode *stbl; GNode *stsd; GNode *mp4a; GNode *mp4v; GNode *wave; GNode *esds; QtDemuxStream *stream; GstTagList *list = NULL; gchar *codec = NULL; const ...
@@ -3058,13 +3058,13 @@ qtdemux_parse_samples (GstQTDemux * qtdemux, QtDemuxStream * stream, stream->min_duration = 0; time = 0; index = 0; - for (i = 0; i < n_sample_times; i++) { + for (i = 0; (i < n_sample_times) && (index < stream->n_samples); i++) { guint32 n; guint32 duration; ...
CWE-119
null
null
3,937
qtdemux_parse_tree (GstQTDemux * qtdemux) { GNode *mvhd; GNode *trak; GNode *udta; gint64 duration; mvhd = qtdemux_tree_get_child_by_type (qtdemux->moov_node, FOURCC_mvhd); if (mvhd == NULL) { GST_LOG_OBJECT (qtdemux, "No mvhd node found, looking for redirects."); return qtdemux_parse_redirects (qt...
Exec Code Overflow
0
qtdemux_parse_tree (GstQTDemux * qtdemux) { GNode *mvhd; GNode *trak; GNode *udta; gint64 duration; mvhd = qtdemux_tree_get_child_by_type (qtdemux->moov_node, FOURCC_mvhd); if (mvhd == NULL) { GST_LOG_OBJECT (qtdemux, "No mvhd node found, looking for redirects."); return qtdemux_parse_redirects (qt...
@@ -3058,13 +3058,13 @@ qtdemux_parse_samples (GstQTDemux * qtdemux, QtDemuxStream * stream, stream->min_duration = 0; time = 0; index = 0; - for (i = 0; i < n_sample_times; i++) { + for (i = 0; (i < n_sample_times) && (index < stream->n_samples); i++) { guint32 n; guint32 duration; ...
CWE-119
null
null
3,938
qtdemux_parse_udta (GstQTDemux * qtdemux, GNode * udta) { GNode *meta; GNode *ilst; GNode *node; gint i; meta = qtdemux_tree_get_child_by_type (udta, FOURCC_meta); if (meta != NULL) { ilst = qtdemux_tree_get_child_by_type (meta, FOURCC_ilst); if (ilst == NULL) { GST_LOG_OBJECT (qtdemux, "no i...
Exec Code Overflow
0
qtdemux_parse_udta (GstQTDemux * qtdemux, GNode * udta) { GNode *meta; GNode *ilst; GNode *node; gint i; meta = qtdemux_tree_get_child_by_type (udta, FOURCC_meta); if (meta != NULL) { ilst = qtdemux_tree_get_child_by_type (meta, FOURCC_ilst); if (ilst == NULL) { GST_LOG_OBJECT (qtdemux, "no i...
@@ -3058,13 +3058,13 @@ qtdemux_parse_samples (GstQTDemux * qtdemux, QtDemuxStream * stream, stream->min_duration = 0; time = 0; index = 0; - for (i = 0; i < n_sample_times; i++) { + for (i = 0; (i < n_sample_times) && (index < stream->n_samples); i++) { guint32 n; guint32 duration; ...
CWE-119
null
null
3,939
qtdemux_process_redirects (GstQTDemux * qtdemux, GList * references) { GstQtReference *best; GstStructure *s; GstMessage *msg; GValue list_val = { 0, }; GList *l; g_assert (references != NULL); references = g_list_sort (references, qtdemux_redirects_sort_func); best = (GstQtReference *) references->d...
Exec Code Overflow
0
qtdemux_process_redirects (GstQTDemux * qtdemux, GList * references) { GstQtReference *best; GstStructure *s; GstMessage *msg; GValue list_val = { 0, }; GList *l; g_assert (references != NULL); references = g_list_sort (references, qtdemux_redirects_sort_func); best = (GstQtReference *) references->d...
@@ -3058,13 +3058,13 @@ qtdemux_parse_samples (GstQTDemux * qtdemux, QtDemuxStream * stream, stream->min_duration = 0; time = 0; index = 0; - for (i = 0; i < n_sample_times; i++) { + for (i = 0; (i < n_sample_times) && (index < stream->n_samples); i++) { guint32 n; guint32 duration; ...
CWE-119
null
null
3,940
qtdemux_sink_activate (GstPad * sinkpad) { if (gst_pad_check_pull_range (sinkpad)) return gst_pad_activate_pull (sinkpad, TRUE); else return gst_pad_activate_push (sinkpad, TRUE); }
Exec Code Overflow
0
qtdemux_sink_activate (GstPad * sinkpad) { if (gst_pad_check_pull_range (sinkpad)) return gst_pad_activate_pull (sinkpad, TRUE); else return gst_pad_activate_push (sinkpad, TRUE); }
@@ -3058,13 +3058,13 @@ qtdemux_parse_samples (GstQTDemux * qtdemux, QtDemuxStream * stream, stream->min_duration = 0; time = 0; index = 0; - for (i = 0; i < n_sample_times; i++) { + for (i = 0; (i < n_sample_times) && (index < stream->n_samples); i++) { guint32 n; guint32 duration; ...
CWE-119
null
null
3,941
qtdemux_sink_activate_pull (GstPad * sinkpad, gboolean active) { GstQTDemux *demux = GST_QTDEMUX (GST_PAD_PARENT (sinkpad)); if (active) { demux->pullbased = TRUE; demux->segment_running = TRUE; return gst_pad_start_task (sinkpad, (GstTaskFunction) gst_qtdemux_loop, sinkpad); } else { dem...
Exec Code Overflow
0
qtdemux_sink_activate_pull (GstPad * sinkpad, gboolean active) { GstQTDemux *demux = GST_QTDEMUX (GST_PAD_PARENT (sinkpad)); if (active) { demux->pullbased = TRUE; demux->segment_running = TRUE; return gst_pad_start_task (sinkpad, (GstTaskFunction) gst_qtdemux_loop, sinkpad); } else { dem...
@@ -3058,13 +3058,13 @@ qtdemux_parse_samples (GstQTDemux * qtdemux, QtDemuxStream * stream, stream->min_duration = 0; time = 0; index = 0; - for (i = 0; i < n_sample_times; i++) { + for (i = 0; (i < n_sample_times) && (index < stream->n_samples); i++) { guint32 n; guint32 duration; ...
CWE-119
null
null
3,942
qtdemux_sink_activate_push (GstPad * sinkpad, gboolean active) { GstQTDemux *demux = GST_QTDEMUX (GST_PAD_PARENT (sinkpad)); demux->pullbased = FALSE; return TRUE; }
Exec Code Overflow
0
qtdemux_sink_activate_push (GstPad * sinkpad, gboolean active) { GstQTDemux *demux = GST_QTDEMUX (GST_PAD_PARENT (sinkpad)); demux->pullbased = FALSE; return TRUE; }
@@ -3058,13 +3058,13 @@ qtdemux_parse_samples (GstQTDemux * qtdemux, QtDemuxStream * stream, stream->min_duration = 0; time = 0; index = 0; - for (i = 0; i < n_sample_times; i++) { + for (i = 0; (i < n_sample_times) && (index < stream->n_samples); i++) { guint32 n; guint32 duration; ...
CWE-119
null
null
3,943
qtdemux_tag_add_blob (GNode * node, GstQTDemux * demux) { gint len; guint8 *data; GstBuffer *buf; gchar *media_type, *style; GstCaps *caps; data = node->data; len = QT_UINT32 (data); buf = gst_buffer_new_and_alloc (len); memcpy (GST_BUFFER_DATA (buf), data, len); /* heuristic to determine style of...
Exec Code Overflow
0
qtdemux_tag_add_blob (GNode * node, GstQTDemux * demux) { gint len; guint8 *data; GstBuffer *buf; gchar *media_type, *style; GstCaps *caps; data = node->data; len = QT_UINT32 (data); buf = gst_buffer_new_and_alloc (len); memcpy (GST_BUFFER_DATA (buf), data, len); /* heuristic to determine style of...
@@ -3058,13 +3058,13 @@ qtdemux_parse_samples (GstQTDemux * qtdemux, QtDemuxStream * stream, stream->min_duration = 0; time = 0; index = 0; - for (i = 0; i < n_sample_times; i++) { + for (i = 0; (i < n_sample_times) && (index < stream->n_samples); i++) { guint32 n; guint32 duration; ...
CWE-119
null
null
3,944
qtdemux_tag_add_covr (GstQTDemux * qtdemux, const char *tag1, const char *dummy, GNode * node) { GNode *data; int len; int type; GstBuffer *buf; data = qtdemux_tree_get_child_by_type (node, FOURCC_data); if (data) { len = QT_UINT32 (data->data); type = QT_UINT32 ((guint8 *) data->data + 8); ...
Exec Code Overflow
0
qtdemux_tag_add_covr (GstQTDemux * qtdemux, const char *tag1, const char *dummy, GNode * node) { GNode *data; int len; int type; GstBuffer *buf; data = qtdemux_tree_get_child_by_type (node, FOURCC_data); if (data) { len = QT_UINT32 (data->data); type = QT_UINT32 ((guint8 *) data->data + 8); ...
@@ -3058,13 +3058,13 @@ qtdemux_parse_samples (GstQTDemux * qtdemux, QtDemuxStream * stream, stream->min_duration = 0; time = 0; index = 0; - for (i = 0; i < n_sample_times; i++) { + for (i = 0; (i < n_sample_times) && (index < stream->n_samples); i++) { guint32 n; guint32 duration; ...
CWE-119
null
null
3,945
qtdemux_tag_add_date (GstQTDemux * qtdemux, const char *tag, const char *dummy, GNode * node) { GNode *data; char *s; int len; int type; data = qtdemux_tree_get_child_by_type (node, FOURCC_data); if (data) { len = QT_UINT32 (data->data); type = QT_UINT32 ((guint8 *) data->data + 8); if (typ...
Exec Code Overflow
0
qtdemux_tag_add_date (GstQTDemux * qtdemux, const char *tag, const char *dummy, GNode * node) { GNode *data; char *s; int len; int type; data = qtdemux_tree_get_child_by_type (node, FOURCC_data); if (data) { len = QT_UINT32 (data->data); type = QT_UINT32 ((guint8 *) data->data + 8); if (typ...
@@ -3058,13 +3058,13 @@ qtdemux_parse_samples (GstQTDemux * qtdemux, QtDemuxStream * stream, stream->min_duration = 0; time = 0; index = 0; - for (i = 0; i < n_sample_times; i++) { + for (i = 0; (i < n_sample_times) && (index < stream->n_samples); i++) { guint32 n; guint32 duration; ...
CWE-119
null
null
3,946
qtdemux_tag_add_num (GstQTDemux * qtdemux, const char *tag1, const char *tag2, GNode * node) { GNode *data; int len; int type; int n1, n2; data = qtdemux_tree_get_child_by_type (node, FOURCC_data); if (data) { len = QT_UINT32 (data->data); type = QT_UINT32 ((guint8 *) data->data + 8); if (t...
Exec Code Overflow
0
qtdemux_tag_add_num (GstQTDemux * qtdemux, const char *tag1, const char *tag2, GNode * node) { GNode *data; int len; int type; int n1, n2; data = qtdemux_tree_get_child_by_type (node, FOURCC_data); if (data) { len = QT_UINT32 (data->data); type = QT_UINT32 ((guint8 *) data->data + 8); if (t...
@@ -3058,13 +3058,13 @@ qtdemux_parse_samples (GstQTDemux * qtdemux, QtDemuxStream * stream, stream->min_duration = 0; time = 0; index = 0; - for (i = 0; i < n_sample_times; i++) { + for (i = 0; (i < n_sample_times) && (index < stream->n_samples); i++) { guint32 n; guint32 duration; ...
CWE-119
null
null
3,947
qtdemux_tag_add_str (GstQTDemux * qtdemux, const char *tag, const char *dummy, GNode * node) { const gchar *env_vars[] = { "GST_QT_TAG_ENCODING", "GST_TAG_ENCODING", NULL }; GNode *data; char *s; int len; int type; int offset; data = qtdemux_tree_get_child_by_type (node, FOURCC_data); if (data) { ...
Exec Code Overflow
0
qtdemux_tag_add_str (GstQTDemux * qtdemux, const char *tag, const char *dummy, GNode * node) { const gchar *env_vars[] = { "GST_QT_TAG_ENCODING", "GST_TAG_ENCODING", NULL }; GNode *data; char *s; int len; int type; int offset; data = qtdemux_tree_get_child_by_type (node, FOURCC_data); if (data) { ...
@@ -3058,13 +3058,13 @@ qtdemux_parse_samples (GstQTDemux * qtdemux, QtDemuxStream * stream, stream->min_duration = 0; time = 0; index = 0; - for (i = 0; i < n_sample_times; i++) { + for (i = 0; (i < n_sample_times) && (index < stream->n_samples); i++) { guint32 n; guint32 duration; ...
CWE-119
null
null
3,948
qtdemux_tag_add_tmpo (GstQTDemux * qtdemux, const char *tag1, const char *dummy, GNode * node) { GNode *data; int len; int type; int n1; data = qtdemux_tree_get_child_by_type (node, FOURCC_data); if (data) { len = QT_UINT32 (data->data); type = QT_UINT32 ((guint8 *) data->data + 8); GST_DEB...
Exec Code Overflow
0
qtdemux_tag_add_tmpo (GstQTDemux * qtdemux, const char *tag1, const char *dummy, GNode * node) { GNode *data; int len; int type; int n1; data = qtdemux_tree_get_child_by_type (node, FOURCC_data); if (data) { len = QT_UINT32 (data->data); type = QT_UINT32 ((guint8 *) data->data + 8); GST_DEB...
@@ -3058,13 +3058,13 @@ qtdemux_parse_samples (GstQTDemux * qtdemux, QtDemuxStream * stream, stream->min_duration = 0; time = 0; index = 0; - for (i = 0; i < n_sample_times; i++) { + for (i = 0; (i < n_sample_times) && (index < stream->n_samples); i++) { guint32 n; guint32 duration; ...
CWE-119
null
null
3,949
qtdemux_tree_get_child_by_type (GNode * node, guint32 fourcc) { GNode *child; guint8 *buffer; guint32 child_fourcc; for (child = g_node_first_child (node); child; child = g_node_next_sibling (child)) { buffer = (guint8 *) child->data; child_fourcc = QT_FOURCC (buffer + 4); if (child_fourcc ...
Exec Code Overflow
0
qtdemux_tree_get_child_by_type (GNode * node, guint32 fourcc) { GNode *child; guint8 *buffer; guint32 child_fourcc; for (child = g_node_first_child (node); child; child = g_node_next_sibling (child)) { buffer = (guint8 *) child->data; child_fourcc = QT_FOURCC (buffer + 4); if (child_fourcc ...
@@ -3058,13 +3058,13 @@ qtdemux_parse_samples (GstQTDemux * qtdemux, QtDemuxStream * stream, stream->min_duration = 0; time = 0; index = 0; - for (i = 0; i < n_sample_times; i++) { + for (i = 0; (i < n_sample_times) && (index < stream->n_samples); i++) { guint32 n; guint32 duration; ...
CWE-119
null
null
3,950
qtdemux_tree_get_sibling_by_type (GNode * node, guint32 fourcc) { GNode *child; guint8 *buffer; guint32 child_fourcc; for (child = g_node_next_sibling (node); child; child = g_node_next_sibling (child)) { buffer = (guint8 *) child->data; child_fourcc = QT_FOURCC (buffer + 4); if (child_four...
Exec Code Overflow
0
qtdemux_tree_get_sibling_by_type (GNode * node, guint32 fourcc) { GNode *child; guint8 *buffer; guint32 child_fourcc; for (child = g_node_next_sibling (node); child; child = g_node_next_sibling (child)) { buffer = (guint8 *) child->data; child_fourcc = QT_FOURCC (buffer + 4); if (child_four...
@@ -3058,13 +3058,13 @@ qtdemux_parse_samples (GstQTDemux * qtdemux, QtDemuxStream * stream, stream->min_duration = 0; time = 0; index = 0; - for (i = 0; i < n_sample_times; i++) { + for (i = 0; (i < n_sample_times) && (index < stream->n_samples); i++) { guint32 n; guint32 duration; ...
CWE-119
null
null
3,951
qtdemux_zfree (void *opaque, void *addr) { g_free (addr); }
Exec Code Overflow
0
qtdemux_zfree (void *opaque, void *addr) { g_free (addr); }
@@ -3058,13 +3058,13 @@ qtdemux_parse_samples (GstQTDemux * qtdemux, QtDemuxStream * stream, stream->min_duration = 0; time = 0; index = 0; - for (i = 0; i < n_sample_times; i++) { + for (i = 0; (i < n_sample_times) && (index < stream->n_samples); i++) { guint32 n; guint32 duration; ...
CWE-119
null
null
3,952
void X509_STORE_CTX_cleanup(X509_STORE_CTX *ctx) { if (ctx->cleanup) ctx->cleanup(ctx); if (ctx->param != NULL) { if (ctx->parent == NULL) X509_VERIFY_PARAM_free(ctx->param); ctx->param = NULL; } if (ctx->tree != NULL) { X509_policy_tree_free(ctx->tree); ...
null
0
void X509_STORE_CTX_cleanup(X509_STORE_CTX *ctx) { if (ctx->cleanup) ctx->cleanup(ctx); if (ctx->param != NULL) { if (ctx->parent == NULL) X509_VERIFY_PARAM_free(ctx->param); ctx->param = NULL; } if (ctx->tree != NULL) { X509_policy_tree_free(ctx->tree); ...
@@ -328,8 +328,8 @@ int X509_verify_cert(X509_STORE_CTX *ctx) xtmp = sk_X509_pop(ctx->chain); X509_free(xtmp); num--; - ctx->last_untrusted--; } + ctx->last_untrusted = sk_X509_num(c...
CWE-254
null
null
3,953
void X509_STORE_CTX_free(X509_STORE_CTX *ctx) { if (!ctx) return; X509_STORE_CTX_cleanup(ctx); OPENSSL_free(ctx); }
null
0
void X509_STORE_CTX_free(X509_STORE_CTX *ctx) { if (!ctx) return; X509_STORE_CTX_cleanup(ctx); OPENSSL_free(ctx); }
@@ -328,8 +328,8 @@ int X509_verify_cert(X509_STORE_CTX *ctx) xtmp = sk_X509_pop(ctx->chain); X509_free(xtmp); num--; - ctx->last_untrusted--; } + ctx->last_untrusted = sk_X509_num(c...
CWE-254
null
null
3,954
X509_CRL *X509_STORE_CTX_get0_current_crl(X509_STORE_CTX *ctx) { return ctx->current_crl; }
null
0
X509_CRL *X509_STORE_CTX_get0_current_crl(X509_STORE_CTX *ctx) { return ctx->current_crl; }
@@ -328,8 +328,8 @@ int X509_verify_cert(X509_STORE_CTX *ctx) xtmp = sk_X509_pop(ctx->chain); X509_free(xtmp); num--; - ctx->last_untrusted--; } + ctx->last_untrusted = sk_X509_num(c...
CWE-254
null
null
3,955
X509 *X509_STORE_CTX_get0_current_issuer(X509_STORE_CTX *ctx) { return ctx->current_issuer; }
null
0
X509 *X509_STORE_CTX_get0_current_issuer(X509_STORE_CTX *ctx) { return ctx->current_issuer; }
@@ -328,8 +328,8 @@ int X509_verify_cert(X509_STORE_CTX *ctx) xtmp = sk_X509_pop(ctx->chain); X509_free(xtmp); num--; - ctx->last_untrusted--; } + ctx->last_untrusted = sk_X509_num(c...
CWE-254
null
null
3,956
X509_VERIFY_PARAM *X509_STORE_CTX_get0_param(X509_STORE_CTX *ctx) { return ctx->param; }
null
0
X509_VERIFY_PARAM *X509_STORE_CTX_get0_param(X509_STORE_CTX *ctx) { return ctx->param; }
@@ -328,8 +328,8 @@ int X509_verify_cert(X509_STORE_CTX *ctx) xtmp = sk_X509_pop(ctx->chain); X509_free(xtmp); num--; - ctx->last_untrusted--; } + ctx->last_untrusted = sk_X509_num(c...
CWE-254
null
null
3,957
X509_POLICY_TREE *X509_STORE_CTX_get0_policy_tree(X509_STORE_CTX *ctx) { return ctx->tree; }
null
0
X509_POLICY_TREE *X509_STORE_CTX_get0_policy_tree(X509_STORE_CTX *ctx) { return ctx->tree; }
@@ -328,8 +328,8 @@ int X509_verify_cert(X509_STORE_CTX *ctx) xtmp = sk_X509_pop(ctx->chain); X509_free(xtmp); num--; - ctx->last_untrusted--; } + ctx->last_untrusted = sk_X509_num(c...
CWE-254
null
null
3,958
STACK_OF(X509) *X509_STORE_CTX_get_chain(X509_STORE_CTX *ctx) { return ctx->chain; }
null
0
STACK_OF(X509) *X509_STORE_CTX_get_chain(X509_STORE_CTX *ctx) { return ctx->chain; }
@@ -328,8 +328,8 @@ int X509_verify_cert(X509_STORE_CTX *ctx) xtmp = sk_X509_pop(ctx->chain); X509_free(xtmp); num--; - ctx->last_untrusted--; } + ctx->last_untrusted = sk_X509_num(c...
CWE-254
null
null
3,959
X509 *X509_STORE_CTX_get_current_cert(X509_STORE_CTX *ctx) { return ctx->current_cert; }
null
0
X509 *X509_STORE_CTX_get_current_cert(X509_STORE_CTX *ctx) { return ctx->current_cert; }
@@ -328,8 +328,8 @@ int X509_verify_cert(X509_STORE_CTX *ctx) xtmp = sk_X509_pop(ctx->chain); X509_free(xtmp); num--; - ctx->last_untrusted--; } + ctx->last_untrusted = sk_X509_num(c...
CWE-254
null
null
3,960
int X509_STORE_CTX_get_error(X509_STORE_CTX *ctx) { return ctx->error; }
null
0
int X509_STORE_CTX_get_error(X509_STORE_CTX *ctx) { return ctx->error; }
@@ -328,8 +328,8 @@ int X509_verify_cert(X509_STORE_CTX *ctx) xtmp = sk_X509_pop(ctx->chain); X509_free(xtmp); num--; - ctx->last_untrusted--; } + ctx->last_untrusted = sk_X509_num(c...
CWE-254
null
null
3,961
int X509_STORE_CTX_get_error_depth(X509_STORE_CTX *ctx) { return ctx->error_depth; }
null
0
int X509_STORE_CTX_get_error_depth(X509_STORE_CTX *ctx) { return ctx->error_depth; }
@@ -328,8 +328,8 @@ int X509_verify_cert(X509_STORE_CTX *ctx) xtmp = sk_X509_pop(ctx->chain); X509_free(xtmp); num--; - ctx->last_untrusted--; } + ctx->last_untrusted = sk_X509_num(c...
CWE-254
null
null
3,962
void *X509_STORE_CTX_get_ex_data(X509_STORE_CTX *ctx, int idx) { return CRYPTO_get_ex_data(&ctx->ex_data, idx); }
null
0
void *X509_STORE_CTX_get_ex_data(X509_STORE_CTX *ctx, int idx) { return CRYPTO_get_ex_data(&ctx->ex_data, idx); }
@@ -328,8 +328,8 @@ int X509_verify_cert(X509_STORE_CTX *ctx) xtmp = sk_X509_pop(ctx->chain); X509_free(xtmp); num--; - ctx->last_untrusted--; } + ctx->last_untrusted = sk_X509_num(c...
CWE-254
null
null
3,963
int X509_STORE_CTX_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func, CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func) { /* * This function is (usually) called only once, by * SSL_g...
null
0
int X509_STORE_CTX_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func, CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func) { /* * This function is (usually) called only once, by * SSL_g...
@@ -328,8 +328,8 @@ int X509_verify_cert(X509_STORE_CTX *ctx) xtmp = sk_X509_pop(ctx->chain); X509_free(xtmp); num--; - ctx->last_untrusted--; } + ctx->last_untrusted = sk_X509_num(c...
CWE-254
null
null
3,964
int X509_STORE_CTX_get_explicit_policy(X509_STORE_CTX *ctx) { return ctx->explicit_policy; }
null
0
int X509_STORE_CTX_get_explicit_policy(X509_STORE_CTX *ctx) { return ctx->explicit_policy; }
@@ -328,8 +328,8 @@ int X509_verify_cert(X509_STORE_CTX *ctx) xtmp = sk_X509_pop(ctx->chain); X509_free(xtmp); num--; - ctx->last_untrusted--; } + ctx->last_untrusted = sk_X509_num(c...
CWE-254
null
null
3,965
int X509_STORE_CTX_init(X509_STORE_CTX *ctx, X509_STORE *store, X509 *x509, STACK_OF(X509) *chain) { int ret = 1; ctx->ctx = store; ctx->current_method = 0; ctx->cert = x509; ctx->untrusted = chain; ctx->crls = NULL; ctx->last_untrusted = 0; ctx->other_ctx = NULL;...
null
0
int X509_STORE_CTX_init(X509_STORE_CTX *ctx, X509_STORE *store, X509 *x509, STACK_OF(X509) *chain) { int ret = 1; ctx->ctx = store; ctx->current_method = 0; ctx->cert = x509; ctx->untrusted = chain; ctx->crls = NULL; ctx->last_untrusted = 0; ctx->other_ctx = NULL;...
@@ -328,8 +328,8 @@ int X509_verify_cert(X509_STORE_CTX *ctx) xtmp = sk_X509_pop(ctx->chain); X509_free(xtmp); num--; - ctx->last_untrusted--; } + ctx->last_untrusted = sk_X509_num(c...
CWE-254
null
null
3,966
X509_STORE_CTX *X509_STORE_CTX_new(void) { X509_STORE_CTX *ctx; ctx = (X509_STORE_CTX *)OPENSSL_malloc(sizeof(X509_STORE_CTX)); if (!ctx) { X509err(X509_F_X509_STORE_CTX_NEW, ERR_R_MALLOC_FAILURE); return NULL; } memset(ctx, 0, sizeof(X509_STORE_CTX)); return ctx; }
null
0
X509_STORE_CTX *X509_STORE_CTX_new(void) { X509_STORE_CTX *ctx; ctx = (X509_STORE_CTX *)OPENSSL_malloc(sizeof(X509_STORE_CTX)); if (!ctx) { X509err(X509_F_X509_STORE_CTX_NEW, ERR_R_MALLOC_FAILURE); return NULL; } memset(ctx, 0, sizeof(X509_STORE_CTX)); return ctx; }
@@ -328,8 +328,8 @@ int X509_verify_cert(X509_STORE_CTX *ctx) xtmp = sk_X509_pop(ctx->chain); X509_free(xtmp); num--; - ctx->last_untrusted--; } + ctx->last_untrusted = sk_X509_num(c...
CWE-254
null
null
3,967
void X509_STORE_CTX_set0_param(X509_STORE_CTX *ctx, X509_VERIFY_PARAM *param) { if (ctx->param) X509_VERIFY_PARAM_free(ctx->param); ctx->param = param; }
null
0
void X509_STORE_CTX_set0_param(X509_STORE_CTX *ctx, X509_VERIFY_PARAM *param) { if (ctx->param) X509_VERIFY_PARAM_free(ctx->param); ctx->param = param; }
@@ -328,8 +328,8 @@ int X509_verify_cert(X509_STORE_CTX *ctx) xtmp = sk_X509_pop(ctx->chain); X509_free(xtmp); num--; - ctx->last_untrusted--; } + ctx->last_untrusted = sk_X509_num(c...
CWE-254
null
null
3,968
void X509_STORE_CTX_set_cert(X509_STORE_CTX *ctx, X509 *x) { ctx->cert = x; }
null
0
void X509_STORE_CTX_set_cert(X509_STORE_CTX *ctx, X509 *x) { ctx->cert = x; }
@@ -328,8 +328,8 @@ int X509_verify_cert(X509_STORE_CTX *ctx) xtmp = sk_X509_pop(ctx->chain); X509_free(xtmp); num--; - ctx->last_untrusted--; } + ctx->last_untrusted = sk_X509_num(c...
CWE-254
null
null
3,969
void X509_STORE_CTX_set_chain(X509_STORE_CTX *ctx, STACK_OF(X509) *sk) { ctx->untrusted = sk; }
null
0
void X509_STORE_CTX_set_chain(X509_STORE_CTX *ctx, STACK_OF(X509) *sk) { ctx->untrusted = sk; }
@@ -328,8 +328,8 @@ int X509_verify_cert(X509_STORE_CTX *ctx) xtmp = sk_X509_pop(ctx->chain); X509_free(xtmp); num--; - ctx->last_untrusted--; } + ctx->last_untrusted = sk_X509_num(c...
CWE-254
null
null
3,970
int X509_STORE_CTX_set_default(X509_STORE_CTX *ctx, const char *name) { const X509_VERIFY_PARAM *param; param = X509_VERIFY_PARAM_lookup(name); if (!param) return 0; return X509_VERIFY_PARAM_inherit(ctx->param, param); }
null
0
int X509_STORE_CTX_set_default(X509_STORE_CTX *ctx, const char *name) { const X509_VERIFY_PARAM *param; param = X509_VERIFY_PARAM_lookup(name); if (!param) return 0; return X509_VERIFY_PARAM_inherit(ctx->param, param); }
@@ -328,8 +328,8 @@ int X509_verify_cert(X509_STORE_CTX *ctx) xtmp = sk_X509_pop(ctx->chain); X509_free(xtmp); num--; - ctx->last_untrusted--; } + ctx->last_untrusted = sk_X509_num(c...
CWE-254
null
null
3,971
void X509_STORE_CTX_set_depth(X509_STORE_CTX *ctx, int depth) { X509_VERIFY_PARAM_set_depth(ctx->param, depth); }
null
0
void X509_STORE_CTX_set_depth(X509_STORE_CTX *ctx, int depth) { X509_VERIFY_PARAM_set_depth(ctx->param, depth); }
@@ -328,8 +328,8 @@ int X509_verify_cert(X509_STORE_CTX *ctx) xtmp = sk_X509_pop(ctx->chain); X509_free(xtmp); num--; - ctx->last_untrusted--; } + ctx->last_untrusted = sk_X509_num(c...
CWE-254
null
null
3,972
void X509_STORE_CTX_set_error(X509_STORE_CTX *ctx, int err) { ctx->error = err; }
null
0
void X509_STORE_CTX_set_error(X509_STORE_CTX *ctx, int err) { ctx->error = err; }
@@ -328,8 +328,8 @@ int X509_verify_cert(X509_STORE_CTX *ctx) xtmp = sk_X509_pop(ctx->chain); X509_free(xtmp); num--; - ctx->last_untrusted--; } + ctx->last_untrusted = sk_X509_num(c...
CWE-254
null
null
3,973
int X509_STORE_CTX_set_ex_data(X509_STORE_CTX *ctx, int idx, void *data) { return CRYPTO_set_ex_data(&ctx->ex_data, idx, data); }
null
0
int X509_STORE_CTX_set_ex_data(X509_STORE_CTX *ctx, int idx, void *data) { return CRYPTO_set_ex_data(&ctx->ex_data, idx, data); }
@@ -328,8 +328,8 @@ int X509_verify_cert(X509_STORE_CTX *ctx) xtmp = sk_X509_pop(ctx->chain); X509_free(xtmp); num--; - ctx->last_untrusted--; } + ctx->last_untrusted = sk_X509_num(c...
CWE-254
null
null
3,974
void X509_STORE_CTX_set_flags(X509_STORE_CTX *ctx, unsigned long flags) { X509_VERIFY_PARAM_set_flags(ctx->param, flags); }
null
0
void X509_STORE_CTX_set_flags(X509_STORE_CTX *ctx, unsigned long flags) { X509_VERIFY_PARAM_set_flags(ctx->param, flags); }
@@ -328,8 +328,8 @@ int X509_verify_cert(X509_STORE_CTX *ctx) xtmp = sk_X509_pop(ctx->chain); X509_free(xtmp); num--; - ctx->last_untrusted--; } + ctx->last_untrusted = sk_X509_num(c...
CWE-254
null
null
3,975
int X509_STORE_CTX_set_purpose(X509_STORE_CTX *ctx, int purpose) { return X509_STORE_CTX_purpose_inherit(ctx, 0, purpose, 0); }
null
0
int X509_STORE_CTX_set_purpose(X509_STORE_CTX *ctx, int purpose) { return X509_STORE_CTX_purpose_inherit(ctx, 0, purpose, 0); }
@@ -328,8 +328,8 @@ int X509_verify_cert(X509_STORE_CTX *ctx) xtmp = sk_X509_pop(ctx->chain); X509_free(xtmp); num--; - ctx->last_untrusted--; } + ctx->last_untrusted = sk_X509_num(c...
CWE-254
null
null
3,976
int X509_STORE_CTX_set_trust(X509_STORE_CTX *ctx, int trust) { return X509_STORE_CTX_purpose_inherit(ctx, 0, 0, trust); }
null
0
int X509_STORE_CTX_set_trust(X509_STORE_CTX *ctx, int trust) { return X509_STORE_CTX_purpose_inherit(ctx, 0, 0, trust); }
@@ -328,8 +328,8 @@ int X509_verify_cert(X509_STORE_CTX *ctx) xtmp = sk_X509_pop(ctx->chain); X509_free(xtmp); num--; - ctx->last_untrusted--; } + ctx->last_untrusted = sk_X509_num(c...
CWE-254
null
null
3,977
void X509_STORE_CTX_trusted_stack(X509_STORE_CTX *ctx, STACK_OF(X509) *sk) { ctx->other_ctx = sk; ctx->get_issuer = get_issuer_sk; }
null
0
void X509_STORE_CTX_trusted_stack(X509_STORE_CTX *ctx, STACK_OF(X509) *sk) { ctx->other_ctx = sk; ctx->get_issuer = get_issuer_sk; }
@@ -328,8 +328,8 @@ int X509_verify_cert(X509_STORE_CTX *ctx) xtmp = sk_X509_pop(ctx->chain); X509_free(xtmp); num--; - ctx->last_untrusted--; } + ctx->last_untrusted = sk_X509_num(c...
CWE-254
null
null
3,978
int X509_cmp_current_time(const ASN1_TIME *ctm) { return X509_cmp_time(ctm, NULL); }
null
0
int X509_cmp_current_time(const ASN1_TIME *ctm) { return X509_cmp_time(ctm, NULL); }
@@ -328,8 +328,8 @@ int X509_verify_cert(X509_STORE_CTX *ctx) xtmp = sk_X509_pop(ctx->chain); X509_free(xtmp); num--; - ctx->last_untrusted--; } + ctx->last_untrusted = sk_X509_num(c...
CWE-254
null
null
3,979
int X509_cmp_time(const ASN1_TIME *ctm, time_t *cmp_time) { char *str; ASN1_TIME atm; long offset; char buff1[24], buff2[24], *p; int i, j, remaining; p = buff1; remaining = ctm->length; str = (char *)ctm->data; /* * Note that the following (historical) code allows much more sl...
null
0
int X509_cmp_time(const ASN1_TIME *ctm, time_t *cmp_time) { char *str; ASN1_TIME atm; long offset; char buff1[24], buff2[24], *p; int i, j, remaining; p = buff1; remaining = ctm->length; str = (char *)ctm->data; /* * Note that the following (historical) code allows much more sl...
@@ -328,8 +328,8 @@ int X509_verify_cert(X509_STORE_CTX *ctx) xtmp = sk_X509_pop(ctx->chain); X509_free(xtmp); num--; - ctx->last_untrusted--; } + ctx->last_untrusted = sk_X509_num(c...
CWE-254
null
null
3,980
int X509_get_pubkey_parameters(EVP_PKEY *pkey, STACK_OF(X509) *chain) { EVP_PKEY *ktmp = NULL, *ktmp2; int i, j; if ((pkey != NULL) && !EVP_PKEY_missing_parameters(pkey)) return 1; for (i = 0; i < sk_X509_num(chain); i++) { ktmp = X509_get_pubkey(sk_X509_value(chain, i)); if (k...
null
0
int X509_get_pubkey_parameters(EVP_PKEY *pkey, STACK_OF(X509) *chain) { EVP_PKEY *ktmp = NULL, *ktmp2; int i, j; if ((pkey != NULL) && !EVP_PKEY_missing_parameters(pkey)) return 1; for (i = 0; i < sk_X509_num(chain); i++) { ktmp = X509_get_pubkey(sk_X509_value(chain, i)); if (k...
@@ -328,8 +328,8 @@ int X509_verify_cert(X509_STORE_CTX *ctx) xtmp = sk_X509_pop(ctx->chain); X509_free(xtmp); num--; - ctx->last_untrusted--; } + ctx->last_untrusted = sk_X509_num(c...
CWE-254
null
null
3,981
ASN1_TIME *X509_gmtime_adj(ASN1_TIME *s, long adj) { return X509_time_adj(s, adj, NULL); }
null
0
ASN1_TIME *X509_gmtime_adj(ASN1_TIME *s, long adj) { return X509_time_adj(s, adj, NULL); }
@@ -328,8 +328,8 @@ int X509_verify_cert(X509_STORE_CTX *ctx) xtmp = sk_X509_pop(ctx->chain); X509_free(xtmp); num--; - ctx->last_untrusted--; } + ctx->last_untrusted = sk_X509_num(c...
CWE-254
null
null
3,982
ASN1_TIME *X509_time_adj(ASN1_TIME *s, long offset_sec, time_t *in_tm) { return X509_time_adj_ex(s, 0, offset_sec, in_tm); }
null
0
ASN1_TIME *X509_time_adj(ASN1_TIME *s, long offset_sec, time_t *in_tm) { return X509_time_adj_ex(s, 0, offset_sec, in_tm); }
@@ -328,8 +328,8 @@ int X509_verify_cert(X509_STORE_CTX *ctx) xtmp = sk_X509_pop(ctx->chain); X509_free(xtmp); num--; - ctx->last_untrusted--; } + ctx->last_untrusted = sk_X509_num(c...
CWE-254
null
null
3,983
ASN1_TIME *X509_time_adj_ex(ASN1_TIME *s, int offset_day, long offset_sec, time_t *in_tm) { time_t t; if (in_tm) t = *in_tm; else time(&t); if (s && !(s->flags & ASN1_STRING_FLAG_MSTRING)) { if (s->type == V_ASN1_UTCTIME) return ASN1_UTCT...
null
0
ASN1_TIME *X509_time_adj_ex(ASN1_TIME *s, int offset_day, long offset_sec, time_t *in_tm) { time_t t; if (in_tm) t = *in_tm; else time(&t); if (s && !(s->flags & ASN1_STRING_FLAG_MSTRING)) { if (s->type == V_ASN1_UTCTIME) return ASN1_UTCT...
@@ -328,8 +328,8 @@ int X509_verify_cert(X509_STORE_CTX *ctx) xtmp = sk_X509_pop(ctx->chain); X509_free(xtmp); num--; - ctx->last_untrusted--; } + ctx->last_untrusted = sk_X509_num(c...
CWE-254
null
null
3,984
static int cert_crl(X509_STORE_CTX *ctx, X509_CRL *crl, X509 *x) { int ok; X509_REVOKED *rev; /* * The rules changed for this... previously if a CRL contained unhandled * critical extensions it could still be used to indicate a certificate * was revoked. This has since been changed since crit...
null
0
static int cert_crl(X509_STORE_CTX *ctx, X509_CRL *crl, X509 *x) { int ok; X509_REVOKED *rev; /* * The rules changed for this... previously if a CRL contained unhandled * critical extensions it could still be used to indicate a certificate * was revoked. This has since been changed since crit...
@@ -328,8 +328,8 @@ int X509_verify_cert(X509_STORE_CTX *ctx) xtmp = sk_X509_pop(ctx->chain); X509_free(xtmp); num--; - ctx->last_untrusted--; } + ctx->last_untrusted = sk_X509_num(c...
CWE-254
null
null
3,985
static int check_cert(X509_STORE_CTX *ctx) { X509_CRL *crl = NULL, *dcrl = NULL; X509 *x; int ok, cnum; unsigned int last_reasons; cnum = ctx->error_depth; x = sk_X509_value(ctx->chain, cnum); ctx->current_cert = x; ctx->current_issuer = NULL; ctx->current_crl_score = 0; ctx->cur...
null
0
static int check_cert(X509_STORE_CTX *ctx) { X509_CRL *crl = NULL, *dcrl = NULL; X509 *x; int ok, cnum; unsigned int last_reasons; cnum = ctx->error_depth; x = sk_X509_value(ctx->chain, cnum); ctx->current_cert = x; ctx->current_issuer = NULL; ctx->current_crl_score = 0; ctx->cur...
@@ -328,8 +328,8 @@ int X509_verify_cert(X509_STORE_CTX *ctx) xtmp = sk_X509_pop(ctx->chain); X509_free(xtmp); num--; - ctx->last_untrusted--; } + ctx->last_untrusted = sk_X509_num(c...
CWE-254
null
null
3,986
static int check_cert_time(X509_STORE_CTX *ctx, X509 *x) { time_t *ptime; int i; if (ctx->param->flags & X509_V_FLAG_USE_CHECK_TIME) ptime = &ctx->param->check_time; else ptime = NULL; i = X509_cmp_time(X509_get_notBefore(x), ptime); if (i == 0) { ctx->error = X509_V_ER...
null
0
static int check_cert_time(X509_STORE_CTX *ctx, X509 *x) { time_t *ptime; int i; if (ctx->param->flags & X509_V_FLAG_USE_CHECK_TIME) ptime = &ctx->param->check_time; else ptime = NULL; i = X509_cmp_time(X509_get_notBefore(x), ptime); if (i == 0) { ctx->error = X509_V_ER...
@@ -328,8 +328,8 @@ int X509_verify_cert(X509_STORE_CTX *ctx) xtmp = sk_X509_pop(ctx->chain); X509_free(xtmp); num--; - ctx->last_untrusted--; } + ctx->last_untrusted = sk_X509_num(c...
CWE-254
null
null
3,987
static int check_chain_extensions(X509_STORE_CTX *ctx) { #ifdef OPENSSL_NO_CHAIN_VERIFY return 1; #else int i, ok = 0, must_be_ca, plen = 0; X509 *x; int (*cb) (int xok, X509_STORE_CTX *xctx); int proxy_path_length = 0; int purpose; int allow_proxy_certs; cb = ctx->verify_cb; /*- ...
null
0
static int check_chain_extensions(X509_STORE_CTX *ctx) { #ifdef OPENSSL_NO_CHAIN_VERIFY return 1; #else int i, ok = 0, must_be_ca, plen = 0; X509 *x; int (*cb) (int xok, X509_STORE_CTX *xctx); int proxy_path_length = 0; int purpose; int allow_proxy_certs; cb = ctx->verify_cb; /*- ...
@@ -328,8 +328,8 @@ int X509_verify_cert(X509_STORE_CTX *ctx) xtmp = sk_X509_pop(ctx->chain); X509_free(xtmp); num--; - ctx->last_untrusted--; } + ctx->last_untrusted = sk_X509_num(c...
CWE-254
null
null
3,988
static int check_crl(X509_STORE_CTX *ctx, X509_CRL *crl) { X509 *issuer = NULL; EVP_PKEY *ikey = NULL; int ok = 0, chnum, cnum; cnum = ctx->error_depth; chnum = sk_X509_num(ctx->chain) - 1; /* if we have an alternative CRL issuer cert use that */ if (ctx->current_issuer) issuer = ctx...
null
0
static int check_crl(X509_STORE_CTX *ctx, X509_CRL *crl) { X509 *issuer = NULL; EVP_PKEY *ikey = NULL; int ok = 0, chnum, cnum; cnum = ctx->error_depth; chnum = sk_X509_num(ctx->chain) - 1; /* if we have an alternative CRL issuer cert use that */ if (ctx->current_issuer) issuer = ctx...
@@ -328,8 +328,8 @@ int X509_verify_cert(X509_STORE_CTX *ctx) xtmp = sk_X509_pop(ctx->chain); X509_free(xtmp); num--; - ctx->last_untrusted--; } + ctx->last_untrusted = sk_X509_num(c...
CWE-254
null
null
3,989
static int check_crl_path(X509_STORE_CTX *ctx, X509 *x) { X509_STORE_CTX crl_ctx; int ret; /* Don't allow recursive CRL path validation */ if (ctx->parent) return 0; if (!X509_STORE_CTX_init(&crl_ctx, ctx->ctx, x, ctx->untrusted)) return -1; crl_ctx.crls = ctx->crls; /* Copy...
null
0
static int check_crl_path(X509_STORE_CTX *ctx, X509 *x) { X509_STORE_CTX crl_ctx; int ret; /* Don't allow recursive CRL path validation */ if (ctx->parent) return 0; if (!X509_STORE_CTX_init(&crl_ctx, ctx->ctx, x, ctx->untrusted)) return -1; crl_ctx.crls = ctx->crls; /* Copy...
@@ -328,8 +328,8 @@ int X509_verify_cert(X509_STORE_CTX *ctx) xtmp = sk_X509_pop(ctx->chain); X509_free(xtmp); num--; - ctx->last_untrusted--; } + ctx->last_untrusted = sk_X509_num(c...
CWE-254
null
null
3,990
static int check_crl_time(X509_STORE_CTX *ctx, X509_CRL *crl, int notify) { time_t *ptime; int i; if (notify) ctx->current_crl = crl; if (ctx->param->flags & X509_V_FLAG_USE_CHECK_TIME) ptime = &ctx->param->check_time; else ptime = NULL; i = X509_cmp_time(X509_CRL_get_la...
null
0
static int check_crl_time(X509_STORE_CTX *ctx, X509_CRL *crl, int notify) { time_t *ptime; int i; if (notify) ctx->current_crl = crl; if (ctx->param->flags & X509_V_FLAG_USE_CHECK_TIME) ptime = &ctx->param->check_time; else ptime = NULL; i = X509_cmp_time(X509_CRL_get_la...
@@ -328,8 +328,8 @@ int X509_verify_cert(X509_STORE_CTX *ctx) xtmp = sk_X509_pop(ctx->chain); X509_free(xtmp); num--; - ctx->last_untrusted--; } + ctx->last_untrusted = sk_X509_num(c...
CWE-254
null
null
3,991
static int check_issued(X509_STORE_CTX *ctx, X509 *x, X509 *issuer) { int ret; ret = X509_check_issued(issuer, x); if (ret == X509_V_OK) return 1; /* If we haven't asked for issuer errors don't set ctx */ if (!(ctx->param->flags & X509_V_FLAG_CB_ISSUER_CHECK)) return 0; ctx->err...
null
0
static int check_issued(X509_STORE_CTX *ctx, X509 *x, X509 *issuer) { int ret; ret = X509_check_issued(issuer, x); if (ret == X509_V_OK) return 1; /* If we haven't asked for issuer errors don't set ctx */ if (!(ctx->param->flags & X509_V_FLAG_CB_ISSUER_CHECK)) return 0; ctx->err...
@@ -328,8 +328,8 @@ int X509_verify_cert(X509_STORE_CTX *ctx) xtmp = sk_X509_pop(ctx->chain); X509_free(xtmp); num--; - ctx->last_untrusted--; } + ctx->last_untrusted = sk_X509_num(c...
CWE-254
null
null
3,992
static int check_name_constraints(X509_STORE_CTX *ctx) { X509 *x; int i, j, rv; /* Check name constraints for all certificates */ for (i = sk_X509_num(ctx->chain) - 1; i >= 0; i--) { x = sk_X509_value(ctx->chain, i); /* Ignore self issued certs unless last in chain */ if (i && (x...
null
0
static int check_name_constraints(X509_STORE_CTX *ctx) { X509 *x; int i, j, rv; /* Check name constraints for all certificates */ for (i = sk_X509_num(ctx->chain) - 1; i >= 0; i--) { x = sk_X509_value(ctx->chain, i); /* Ignore self issued certs unless last in chain */ if (i && (x...
@@ -328,8 +328,8 @@ int X509_verify_cert(X509_STORE_CTX *ctx) xtmp = sk_X509_pop(ctx->chain); X509_free(xtmp); num--; - ctx->last_untrusted--; } + ctx->last_untrusted = sk_X509_num(c...
CWE-254
null
null
3,993
static int check_policy(X509_STORE_CTX *ctx) { int ret; if (ctx->parent) return 1; ret = X509_policy_check(&ctx->tree, &ctx->explicit_policy, ctx->chain, ctx->param->policies, ctx->param->flags); if (ret == 0) { X509err(X509_F_CHECK_POLICY, ERR_R_MALLOC_FAILUR...
null
0
static int check_policy(X509_STORE_CTX *ctx) { int ret; if (ctx->parent) return 1; ret = X509_policy_check(&ctx->tree, &ctx->explicit_policy, ctx->chain, ctx->param->policies, ctx->param->flags); if (ret == 0) { X509err(X509_F_CHECK_POLICY, ERR_R_MALLOC_FAILUR...
@@ -328,8 +328,8 @@ int X509_verify_cert(X509_STORE_CTX *ctx) xtmp = sk_X509_pop(ctx->chain); X509_free(xtmp); num--; - ctx->last_untrusted--; } + ctx->last_untrusted = sk_X509_num(c...
CWE-254
null
null
3,994
static int check_revocation(X509_STORE_CTX *ctx) { int i, last, ok; if (!(ctx->param->flags & X509_V_FLAG_CRL_CHECK)) return 1; if (ctx->param->flags & X509_V_FLAG_CRL_CHECK_ALL) last = sk_X509_num(ctx->chain) - 1; else { /* If checking CRL paths this isn't the EE certificate */ ...
null
0
static int check_revocation(X509_STORE_CTX *ctx) { int i, last, ok; if (!(ctx->param->flags & X509_V_FLAG_CRL_CHECK)) return 1; if (ctx->param->flags & X509_V_FLAG_CRL_CHECK_ALL) last = sk_X509_num(ctx->chain) - 1; else { /* If checking CRL paths this isn't the EE certificate */ ...
@@ -328,8 +328,8 @@ int X509_verify_cert(X509_STORE_CTX *ctx) xtmp = sk_X509_pop(ctx->chain); X509_free(xtmp); num--; - ctx->last_untrusted--; } + ctx->last_untrusted = sk_X509_num(c...
CWE-254
null
null
3,995
static int check_trust(X509_STORE_CTX *ctx) { #ifdef OPENSSL_NO_CHAIN_VERIFY return 1; #else int i, ok; X509 *x; int (*cb) (int xok, X509_STORE_CTX *xctx); cb = ctx->verify_cb; /* For now just check the last certificate in the chain */ i = sk_X509_num(ctx->chain) - 1; x = sk_X509_value(ctx->...
null
0
static int check_trust(X509_STORE_CTX *ctx) { #ifdef OPENSSL_NO_CHAIN_VERIFY return 1; #else int i, ok; X509 *x; int (*cb) (int xok, X509_STORE_CTX *xctx); cb = ctx->verify_cb; /* For now just check the last certificate in the chain */ i = sk_X509_num(ctx->chain) - 1; x = sk_X509_value(ctx->...
@@ -328,8 +328,8 @@ int X509_verify_cert(X509_STORE_CTX *ctx) xtmp = sk_X509_pop(ctx->chain); X509_free(xtmp); num--; - ctx->last_untrusted--; } + ctx->last_untrusted = sk_X509_num(c...
CWE-254
null
null
3,996
static int crl_crldp_check(X509 *x, X509_CRL *crl, int crl_score, unsigned int *preasons) { int i; if (crl->idp_flags & IDP_ONLYATTR) return 0; if (x->ex_flags & EXFLAG_CA) { if (crl->idp_flags & IDP_ONLYUSER) return 0; } else { if (crl->idp...
null
0
static int crl_crldp_check(X509 *x, X509_CRL *crl, int crl_score, unsigned int *preasons) { int i; if (crl->idp_flags & IDP_ONLYATTR) return 0; if (x->ex_flags & EXFLAG_CA) { if (crl->idp_flags & IDP_ONLYUSER) return 0; } else { if (crl->idp...
@@ -328,8 +328,8 @@ int X509_verify_cert(X509_STORE_CTX *ctx) xtmp = sk_X509_pop(ctx->chain); X509_free(xtmp); num--; - ctx->last_untrusted--; } + ctx->last_untrusted = sk_X509_num(c...
CWE-254
null
null
3,997
static int crl_extension_match(X509_CRL *a, X509_CRL *b, int nid) { ASN1_OCTET_STRING *exta, *extb; int i; i = X509_CRL_get_ext_by_NID(a, nid, -1); if (i >= 0) { /* Can't have multiple occurrences */ if (X509_CRL_get_ext_by_NID(a, nid, i) != -1) return 0; exta = X509_...
null
0
static int crl_extension_match(X509_CRL *a, X509_CRL *b, int nid) { ASN1_OCTET_STRING *exta, *extb; int i; i = X509_CRL_get_ext_by_NID(a, nid, -1); if (i >= 0) { /* Can't have multiple occurrences */ if (X509_CRL_get_ext_by_NID(a, nid, i) != -1) return 0; exta = X509_...
@@ -328,8 +328,8 @@ int X509_verify_cert(X509_STORE_CTX *ctx) xtmp = sk_X509_pop(ctx->chain); X509_free(xtmp); num--; - ctx->last_untrusted--; } + ctx->last_untrusted = sk_X509_num(c...
CWE-254
null
null
3,998
static int crldp_check_crlissuer(DIST_POINT *dp, X509_CRL *crl, int crl_score) { int i; X509_NAME *nm = X509_CRL_get_issuer(crl); /* If no CRLissuer return is successful iff don't need a match */ if (!dp->CRLissuer) return ! !(crl_score & CRL_SCORE_ISSUER_NAME); for (i = 0; i < sk_GENERAL_NA...
null
0
static int crldp_check_crlissuer(DIST_POINT *dp, X509_CRL *crl, int crl_score) { int i; X509_NAME *nm = X509_CRL_get_issuer(crl); /* If no CRLissuer return is successful iff don't need a match */ if (!dp->CRLissuer) return ! !(crl_score & CRL_SCORE_ISSUER_NAME); for (i = 0; i < sk_GENERAL_NA...
@@ -328,8 +328,8 @@ int X509_verify_cert(X509_STORE_CTX *ctx) xtmp = sk_X509_pop(ctx->chain); X509_free(xtmp); num--; - ctx->last_untrusted--; } + ctx->last_untrusted = sk_X509_num(c...
CWE-254
null
null
3,999
static int get_crl_delta(X509_STORE_CTX *ctx, X509_CRL **pcrl, X509_CRL **pdcrl, X509 *x) { int ok; X509 *issuer = NULL; int crl_score = 0; unsigned int reasons; X509_CRL *crl = NULL, *dcrl = NULL; STACK_OF(X509_CRL) *skcrl; X509_NAME *nm = X509_get_issuer_name(x); ...
null
0
static int get_crl_delta(X509_STORE_CTX *ctx, X509_CRL **pcrl, X509_CRL **pdcrl, X509 *x) { int ok; X509 *issuer = NULL; int crl_score = 0; unsigned int reasons; X509_CRL *crl = NULL, *dcrl = NULL; STACK_OF(X509_CRL) *skcrl; X509_NAME *nm = X509_get_issuer_name(x); ...
@@ -328,8 +328,8 @@ int X509_verify_cert(X509_STORE_CTX *ctx) xtmp = sk_X509_pop(ctx->chain); X509_free(xtmp); num--; - ctx->last_untrusted--; } + ctx->last_untrusted = sk_X509_num(c...
CWE-254
null
null