[PATCH] crash while processing mac the ripper "feature title extract" images
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.
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.
I am not opposed to this patch. But in the first set the fail marker does the same thing as a success (return 0). Could the fail marker have a negative return value? If so, what effect does that have? E -- Erik Hovland erik@hovland.org http://hovland.org/
On 11/17/2009 04:19 PM, Erik Hovland 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.
I am not opposed to this patch. But in the first set the fail marker does the same thing as a success (return 0). Could the fail marker have a negative return value? If so, what effect does that have?
E
For that function success is this block: if(get_PGCIT(vm) && set_MENU(vm, menuid)) { process_command(vm, play_PGC(vm)); return 1; /* Jump */ } else { If it gets to the end of the function, it has failed.
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"
On 12/07/2009 05:37 AM, Dominik 'Rathann' Mierzejewski wrote:
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.
I didn't add a goto because I was trying to adhere to the style used in the rest of that function. There are several places in that function where link_values.command is assigned Exit in error conditions and then "break"s. After having a second look, the other goto I added isn't necessary either. "return 0" is all that's needed there. Anyway, I found another condition similar to the missing menu issue. A jump to a missing VTS also crashes. So here's an updated patch that addresses this as well.
On Tuesday, 08 December 2009 at 17:15, John Stebbins wrote:
On 12/07/2009 05:37 AM, Dominik 'Rathann' Mierzejewski wrote:
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.
[...]
I didn't add a goto because I was trying to adhere to the style used in the rest of that function. There are several places in that function where link_values.command is assigned Exit in error conditions and then "break"s. After having a second look, the other goto I added isn't necessary either. "return 0" is all that's needed there.
Anyway, I found another condition similar to the missing menu issue. A jump to a missing VTS also crashes. So here's an updated patch that addresses this as well.
Ping Nico. :) Regards, your friendly patch tracker. :) -- 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"
On Friday, 05 March 2010 at 22:19, Dominik 'Rathann' Mierzejewski wrote:
On Tuesday, 08 December 2009 at 17:15, John Stebbins wrote:
On 12/07/2009 05:37 AM, Dominik 'Rathann' Mierzejewski wrote:
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.
[...]
I didn't add a goto because I was trying to adhere to the style used in the rest of that function. There are several places in that function where link_values.command is assigned Exit in error conditions and then "break"s. After having a second look, the other goto I added isn't necessary either. "return 0" is all that's needed there.
Anyway, I found another condition similar to the missing menu issue. A jump to a missing VTS also crashes. So here's an updated patch that addresses this as well.
Ping Nico. :)
Regards, your friendly patch tracker. :)
I believe this has been applied by Erik as r1219. Regards, Dominik -- 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"
participants (3)
-
Dominik 'Rathann' Mierzejewski -
Erik Hovland -
John Stebbins