This is the bug/patch tracker for Rockbox. Click here for more information.
Quick links: Bugs · Patches · Rockbox frontpage
FS#9197 - Return correct failure code if the WPS has too many viewports
|
DetailsThe title says it all, I have nothing to add
|
This task depends upon
Have you tested this patch? I don't think it will work correctly, because the value of PARSE_FAIL_LIMITS_EXCEEDED is positive, whereas parsing functions like parse_viewport are supposed to return either the number of characters they read or a strictly negative error value. Maybe there is no apparent problem (thanks to the other check for the viewport limit), but this looks wrong to me.
To be honest, I have not tested the patch. I just have seen that a wrong literal is used in this case and have assumed that the general frame is correctly set up. If it's not, then a fix is needed at another place (but this fix is still correct IMHO).
Here is another try. Now also tested, although not very extensively. Also added some comments.