diff options
author | Vincent Penquerc'h <vincent.penquerch@collabora.co.uk> | 2014-04-08 14:19:29 +0100 |
---|---|---|
committer | Vincent Penquerc'h <vincent.penquerch@collabora.co.uk> | 2014-04-08 14:21:53 +0100 |
commit | 380f95ea0159b2f01b8c7f4a031d4cc5a860f714 (patch) | |
tree | f1ea5cee374f0191339e674e53bfb9b7d0e1e63e /ext | |
parent | 4898a51afe0dae7f6f3748c7ac2987edbc9e8446 (diff) | |
download | gstreamer-plugins-bad-380f95ea0159b2f01b8c7f4a031d4cc5a860f714.tar.gz |
resindvd: guard against overflow in menu subtitle streams
There is space for a single subtitle stream, but up to 255
may be used based on a uint8_t value in a struct, which may
or may not be read from the (untrusted) data.
A comment in ifo_types.h says this value is either 0 or 1, so
we can ensure this here without drawbacks.
Coverity 1139586
Diffstat (limited to 'ext')
-rw-r--r-- | ext/resindvd/resindvdsrc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/resindvd/resindvdsrc.c b/ext/resindvd/resindvdsrc.c index e17478f00..34f204395 100644 --- a/ext/resindvd/resindvdsrc.c +++ b/ext/resindvd/resindvdsrc.c @@ -1949,7 +1949,7 @@ rsn_dvdsrc_prepare_streamsinfo_event (resinDvdSrc * src) a_attrs = &vts_attr->vtsm_audio_attr; n_audio = vts_attr->nr_of_vtsm_audio_streams; s_attrs = &vts_attr->vtsm_subp_attr; - n_subp = vts_attr->nr_of_vtsm_subp_streams; + n_subp = MAX (1, vts_attr->nr_of_vtsm_subp_streams); } else { /* VTS domain */ vts_attr = get_vts_attr (src, src->vts_n); |