[DVDnav-discuss] [PATCH] crash while processing mac the ripper "feature title extract" images

Dominik 'Rathann' Mierzejewski dominik at greysector.net
Mon Dec 7 14:37:59 CET 2009


On Wednesday, 18 November 2009 at 00:41, John Stebbins wrote:
> Mac the ripper's feature title extraction removes menus from the 
> resulting image, but does not remove navigation instructions that 
> attempt to jump to those menus.  This patch checks that a menu exists 
> before acting on such instructions.  If the menu does not exist, the it 
> puts the vm into the stopped state.

[...]
> @@ -1488,6 +1495,10 @@
>        /* Allowed from anywhere except the VTS Title domain */
>        /* Stop SPRM9 Timer and any GPRM counters */
>        assert((vm->state).domain != VTS_DOMAIN); /* ?? */
> +      if(vm->vmgi == NULL || vm->vmgi->pgci_ut == NULL) {
> +        link_values.command = Exit;
> +        break;
> +      }
>        (vm->state).domain = VMGM_DOMAIN;
>        if(!set_MENU(vm, link_values.data1))
>  	assert(0);
> @@ -1504,14 +1515,22 @@
>  	if (link_values.data1 != (vm->state).vtsN) {
>  	  /* the normal case */
>  	  assert((vm->state).domain == VMGM_DOMAIN || (vm->state).domain == FP_DOMAIN); /* ?? */
> -	  (vm->state).domain = VTSM_DOMAIN;
>  	  if (!ifoOpenNewVTSI(vm, vm->dvd, link_values.data1))  /* Also sets (vm->state).vtsN */
>  	    assert(0);
> +          if(vm->vtsi == NULL || vm->vtsi->pgci_ut == NULL) {
> +            link_values.command = Exit;
> +            break;

Code duplication. Maybe replace all such blocks with a goto fail, like above?

Regards,
R.

-- 
Fedora http://fedoraproject.org/wiki/User:Rathann
RPMFusion http://rpmfusion.org | MPlayer http://mplayerhq.hu
"Faith manages."
        -- Delenn to Lennier in Babylon 5:"Confessions and Lamentations"


More information about the DVDnav-discuss mailing list