tags 345943 +patch thanks This is the result of an error in my patch for #321183. Here's a second patch on top of that that should correct the range check to allow for action buttons, and extends the assertions to both dimensions. I'm afraid I haven't tested this yet.
Ben.
diff -u dvdauthor-0.6.11.new/src/subgen-image.c
dvdauthor-0.6.11.new/src/subgen-image.c
--- dvdauthor-0.6.11/src/subgen-image.c
+++ dvdauthor-0.6.11.new/src/subgen-image.c
@@ -361,17 +361,18 @@
gs=malloc(ng*sizeof(palgroup));
memset(gs,0,ng*sizeof(palgroup));
- assert(!useimg || s->xd <= s->img.width);
- assert(s->xd <= s->hlt.width);
- assert(s->xd <= s->sel.width);
+ assert(!useimg || (s->xd <= s->img.width && s->yd <= s->img.height));
+ assert(s->xd <= s->hlt.width && s->yd <= s->hlt.height);
+ assert(s->xd <= s->sel.width && s->yd <= s->sel.height);
// fprintf(stderr,"attempt %d groups, %d useimg\n",ng,useimg);
// find unique colors per button
for( i=0; i<s->numbuttons; i++ ) {
button *b=&s->buttons[i];
palgroup *bp=&bpgs[i];
- if( b->r.x0<0 || b->r.x0>b->r.x1 || b->r.x1>=s->xd
- || b->r.y0<0 || b->r.y0>b->r.y1 || b->r.y1>=s->yd )
+ if( b->r.x0 != b->r.x1 && b->r.y0 != b->r.y1
+ && (b->r.x0 < 0 || b->r.x0 > b->r.x1 || b->r.x1 > s->xd
+ || b->r.y0 < 0 || b->r.y0 > b->r.y1 || b->r.y1 > s->yd) )
{
if (debug > -1)
fprintf(stderr,
--
Ben Hutchings
For every complex problem
there is a solution that is simple, neat, and wrong.
signature.asc
Description: This is a digitally signed message part

