I patched this program to remove the crashes, and sent the patches
upstream. I think we can assume upstream has stopped?

The program makes a number of errors in calculations, that result in it
attempting to access memory it shouldn't.

Here is a corrected version of the "mirror" function from filter.c

I will try and dig out the fuller patch I made to filter.c for the
laplace transform.

 Simon



void mirror (unsigned char *image, int x, int y, int z)
{
    int i, j, k;
    unsigned char tmp;

    for (i = 0; i < y; i++) {
        for (j = 0; j < x/2; j++) {
            for (k = 0; k < z; k++) {
                /*ow, my brain! */
                tmp = image[(i * x * z) + (j * z) + k];
                image[(i * x * z) + (j * z) + k] =
                    image[(i * x * z) - (j * z) + k];
                image[(i * x * z) - (j * z) + k] = tmp;
            }

        }

    }

}


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to