[fprint] AES2501 state confusion
Bastien Nocera
hadess at hadess.net
Fri Jul 10 14:13:08 BST 2009
On Fri, 2009-07-10 at 01:40 -0700, Philippe Troin wrote:
> Hi,
>
> I'm using libfprint 0.1.0-pre2 with fprintd in Fedora 11.
<snip>
> - However, if I just use the tip of my finger to roll over the sensor
> quickly, gdm asks me: "Place your finger on the reader again".
I can make any imaging fingerprint readers confuse the hell out of
libfprint's state machine, by pressing the finger real quick. I have no
idea how to fix it.
> - At this point, I swipe my finger normally, and fprintd crashes.
>
> I have a patch to solve the problem, but it is quite lacking as I do
> not understand libfprint in its entirety.
>
> Let me quote the patch inline, as it is very brief:
>
> diff -ru libfprint-0.1.0-pre2.orig/libfprint/drivers/aes2501.c libfprint-0.1.0-pre2/libfprint/drivers/aes2501.c
> --- libfprint-0.1.0-pre2.orig/libfprint/drivers/aes2501.c 2008-11-20 06:53:01.000000000 -0800
> +++ libfprint-0.1.0-pre2/libfprint/drivers/aes2501.c 2009-07-10 01:21:12.000000000 -0700
> @@ -355,6 +355,7 @@
> g_slist_foreach(aesdev->strips, (GFunc) g_free, NULL);
> g_slist_free(aesdev->strips);
> aesdev->strips = NULL;
> + aesdev->strips_len = 0;
> }
Even better would be to get rid of strips_len and use g_slist_length
instead everywhere (the list wouldn't be long enough as for this to
matter, right?).
Cheers
More information about the fprint
mailing list