please test the attached patch
(picked from upstream cvs repository)

ciao
Riccardo
diff --git a/ChangeLog b/ChangeLog
index c4d47e6..3c4eda4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2008-10-07  radu corlan  <[EMAIL PROTECTED]>
+
+       * attempted a fix for a 64-bit pointer problem in psf_new; pending
+       testing by brian.
+
 0.9.12
        fixed equation B.8 in the manual (thanks to Brad Walter for
        spotting the error).
diff --git a/src/psf.c b/src/psf.c
index e72f1b9..4581343 100644
--- a/src/psf.c
+++ b/src/psf.c
@@ -122,10 +122,10 @@ struct psf *psf_new(int w, int h)
        psf = calloc(1, sizeof(struct psf));
        g_assert(psf != NULL);
 
-       d = malloc(w * (h + 1) * sizeof(float *));
+       d = malloc(w * h * sizeof(float) + w * sizeof(float *));
        g_assert(d != NULL);
 
-       f = (float *)d + w;
+       f = (float *)(d + w);
        for (i = 0; i < w; i++) {
                d[i] = f;
                f += h;

Attachment: signature.asc
Description: Digital signature



Reply via email to