[php-maint] Bug#487643: Patch

Romain Viovi imprec at gmail.com
Tue Feb 17 17:18:34 UTC 2009


Before lenny, I was using this method, as described on google group
It would be nice to fix this bug


Edit ffmpeg_frame.c from line 396 to 411

delete

   int x, y;
    int *src = (int*)frame->data[0];

    for (y = 0; y < height; y++) {
        for (x = 0; x < width; x++) {

                        if (gdImageBoundsSafeMacro(dest, x, y)) {
                /* copy pixel to gdimage buffer zeroing the alpha channel */
                dest->tpixels[y][x] = src[x] & 0x00ffffff;
            } else {
                return -1;
            }
        }
        src += width;
    }
    return 0;




and replace by



    int x, y;
    int *src = (int*)frame->data[0];

    if (width > dest->sx || height > dest->sy)
    {
        return -1;
    }

    for (y = 0; y < height; y++) {
        for (x = 0; x < width; x++) {
                 dest->tpixels[y][x] = src[x] & 0x00ffffff;
        }
        src += width;
    }
    return 0;





-- 
Romain Viovi

romain.viovi at gmail.com





More information about the pkg-php-maint mailing list