Mercurial > libdvdnav.hg
diff navigation.c @ 344:fb2fbd4cfbf6 src
in get_PGCIT() check the validity of vm->vtsi before risking to dereference NULL;
also change dvdnav_get_current_menu() accordingly.
Patch by Erik Hovland - erik hovland org
author | nicodvb |
---|---|
date | Sun, 20 Apr 2008 08:29:02 +0000 |
parents | 68736572c62c |
children | 2e9382be8e25 |
line wrap: on
line diff
--- a/navigation.c Sun Apr 20 08:18:52 2008 +0000 +++ b/navigation.c Sun Apr 20 08:29:02 2008 +0000 @@ -104,7 +104,10 @@ if ( (this->vm->state.domain == VTSM_DOMAIN) || (this->vm->state.domain == VMGM_DOMAIN) ) { /* Get current Menu ID: into *part. */ - vm_get_current_menu(this->vm, part); + if(! vm_get_current_menu(this->vm, part)) { + pthread_mutex_unlock(&this->vm_lock); + return DVDNAV_STATUS_ERR; + } if (*part > -1) { *title = 0; pthread_mutex_unlock(&this->vm_lock);