[DVDnav-discuss] r1018 - in trunk/libdvdnav/src: navigation.c vm/vm.c

Nico Sabbi Nicola.Sabbi at poste.it
Tue Apr 22 09:37:47 CEST 2008


On Tuesday 22 April 2008 00:34:11 Erik Hovland wrote:

> Without the if clause to return 0, then vm_get_current_menu will
> cause any program that uses that function to segfault on the next
> line with the NULL pgcit is dereferenced.
>
> Let me know if I am totally off of my rocker.
>
> E
>
>  src/vm/vm.c |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/src/vm/vm.c b/src/vm/vm.c
> index 129b330..996f0ea 100644
> --- a/src/vm/vm.c
> +++ b/src/vm/vm.c
> @@ -612,6 +612,7 @@ int vm_get_current_menu(vm_t *vm, int *menuid)
> { int pgcn;
>    pgcn = (vm->state).pgcN;
>    pgcit = get_PGCIT(vm);
> +  if (pgcit == NULL) return 0;
>    *menuid = pgcit->pgci_srp[pgcn - 1].entry_id & 0xf ;
>    return 1;
>  }


you are correct, committed



More information about the DVDnav-discuss mailing list