Hi Bastien, Daniel, i found a lite bug on function fpi_im_resize (gdkpixbuf.c).
Instead of copy resized image into newimg, the function copy it on old img so, new image is empty and, in some case, it generated a segmentation fault error. The attached patch fix the function. Bye Sergio
>From 794aff4b3bae3d0bf1e3e2b1e00ba8778494a8c1 Mon Sep 17 00:00:00 2001 From: Sergio Cerlesi <[email protected]> Date: Tue, 22 Feb 2011 14:39:11 +0100 Subject: [PATCH] Fix function fpi_im_resize on create new image The function fpi_im_resize copy the new resized image into old fp_img instead of newimg so, new image is empty and often it generated a segmentation fault error. --- libfprint/gdkpixbuf.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/libfprint/gdkpixbuf.c b/libfprint/gdkpixbuf.c index 7ffc099..ea2d5bc 100644 --- a/libfprint/gdkpixbuf.c +++ b/libfprint/gdkpixbuf.c @@ -75,7 +75,7 @@ struct fp_img *fpi_im_resize(struct fp_img *img, unsigned int factor) for (x = 0; x < newimg->width; x++) { guchar *p, *r; - r = img->data + y * img->width + x; + r = newimg->data + y * newimg->width + x; p = pixels + y * rowstride + x * 3; r[0] = p[0]; } -- 1.7.3.4
_______________________________________________ fprint mailing list [email protected] http://lists.reactivated.net/mailman/listinfo/fprint
