From 3fa3c0daf7f909187870f4f8136a9e830d18bdfb Mon Sep 17 00:00:00 2001 From: Daniel Drake Date: Fri, 16 Nov 2007 13:14:30 +0000 Subject: [PATCH] Initialize enrolled image pointer to NULL Currently this is a dangling pointer if the image capture fails, and then we try to standardize an invalid pointer --> crash --- libfprint/imgdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libfprint/imgdev.c b/libfprint/imgdev.c index b9da4b5..1e99998 100644 --- a/libfprint/imgdev.c +++ b/libfprint/imgdev.c @@ -159,7 +159,7 @@ err: int img_dev_enroll(struct fp_dev *dev, gboolean initial, int stage, struct fp_print_data **ret, struct fp_img **_img) { - struct fp_img *img; + struct fp_img *img = NULL; struct fp_img_dev *imgdev = dev->priv; struct fp_print_data *print; int r; -- 2.11.4.GIT