[DVDnav-discuss] Do not crash in set_FP_PGC if vmgi was not set

Jean-Baptiste Kempf git at videolan.org
Tue Mar 4 15:35:41 CET 2014


libdvdnav | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Tue Mar  4 15:00:55 2014 +0100| [06893e33195fe435e8c37d8028ffe8e6d6632913] | committer: Jean-Baptiste Kempf

Do not crash in set_FP_PGC if vmgi was not set

LP: #487414

> http://git.videolan.org/gitweb.cgi/libdvdnav.git/?a=commit;h=06893e33195fe435e8c37d8028ffe8e6d6632913
---

 src/vm/getset.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/vm/getset.c b/src/vm/getset.c
index 26ea5fb..f286a8f 100644
--- a/src/vm/getset.c
+++ b/src/vm/getset.c
@@ -127,6 +127,8 @@ int set_VTS_PROG(vm_t *vm, int vtsN, int vts_ttn, int pgcn, int pgn) {
 }
 
 int set_FP_PGC(vm_t *vm) {
+  if (!vm || !vm->vmgi)
+      return 1;
   (vm->state).domain = DVD_DOMAIN_FirstPlay;
   if (!vm->vmgi->first_play_pgc) {
     return set_PGCN(vm, 1);



More information about the DVDnav-discuss mailing list