mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-05 06:58:56 +00:00
Don't read beyond the last cell in a chapter (fixes invalid memory access)
Original commit message from CVS: Don't read beyond the last cell in a chapter (fixes invalid memory access)
This commit is contained in:
parent
50b7c32b3e
commit
be2a70cf23
2 changed files with 14 additions and 1 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
2005-01-17 Tim-Philipp Müller <tim at centricular dot net>
|
||||||
|
|
||||||
|
* ext/dvdread/dvdreadsrc.c: (_read):
|
||||||
|
Don't read beyond the last cell in a chapter (fixes
|
||||||
|
invalid memory access)
|
||||||
|
|
||||||
2005-01-17 Tim-Philipp Müller <tim at centricular dot net>
|
2005-01-17 Tim-Philipp Müller <tim at centricular dot net>
|
||||||
|
|
||||||
* ext/dvdread/stream_labels.c:
|
* ext/dvdread/stream_labels.c:
|
||||||
|
|
|
@ -777,10 +777,17 @@ _read (DVDReadSrcPrivate * priv, int angle, int new_seek, GstBuffer * buf)
|
||||||
if (new_seek)
|
if (new_seek)
|
||||||
priv->cur_cell = priv->start_cell;
|
priv->cur_cell = priv->start_cell;
|
||||||
|
|
||||||
|
again:
|
||||||
|
|
||||||
if (priv->cur_cell < priv->last_cell) {
|
if (priv->cur_cell < priv->last_cell) {
|
||||||
if (priv->new_cell || new_seek) {
|
if (priv->new_cell || new_seek) {
|
||||||
if (!new_seek)
|
if (!new_seek) {
|
||||||
priv->cur_cell = priv->next_cell;
|
priv->cur_cell = priv->next_cell;
|
||||||
|
if (priv->cur_cell >= priv->last_cell) {
|
||||||
|
GST_LOG ("last cell in chapter");
|
||||||
|
goto again;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* take angle into account */
|
/* take angle into account */
|
||||||
if (priv->cur_pgc->cell_playback[priv->cur_cell].block_type
|
if (priv->cur_pgc->cell_playback[priv->cur_cell].block_type
|
||||||
|
|
Loading…
Reference in a new issue