From a3ae96c2143ee7837225772008872ed0627336e1 Mon Sep 17 00:00:00 2001 From: Sergio Cerlesi 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 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libfprint/gdkpixbuf.c b/libfprint/gdkpixbuf.c index 7ffc0990..ea2d5bcd 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]; }