OSDN Git Service
(root)
/
handbrake-jp
/
handbrake-jp-git.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
db77e5a
)
Don't crash just because some dvd title uses an illegal pgn number.
author
van
<van@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Sun, 2 Mar 2008 05:15:56 +0000
(
05:15
+0000)
committer
van
<van@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Sun, 2 Mar 2008 05:15:56 +0000
(
05:15
+0000)
(Fixes bug reported in http://forum.handbrake.fr/viewtopic.php?p=28767&sid=
23308d0c02b70fceb54db71b0d0f2660
#p28767).
git-svn-id: svn://localhost/HandBrake/trunk@1324
b64f7644
-9d1e-0410-96f1-
a4d463321fa5
libhb/dvd.c
patch
|
blob
|
history
diff --git
a/libhb/dvd.c
b/libhb/dvd.c
index
05e9bde
..
1c4eb60
100644
(file)
--- a/
libhb/dvd.c
+++ b/
libhb/dvd.c
@@
-178,6
+178,12
@@
hb_title_t * hb_dvd_title_scan( hb_dvd_t * d, int t )
goto fail;
}
+ if( pgn <= 0 || pgn > 99 )
+ {
+ hb_error( "scan: pgn %d not valid, skipping", pgn );
+ goto fail;
+ }
+
/* Start cell */
title->cell_start = d->pgc->program_map[pgn-1] - 1;
title->block_start = d->pgc->cell_playback[title->cell_start].first_sector;