From b0effae9907e095afb463c3e88cd62049f762166 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Thu, 28 Nov 2019 20:15:21 +0100 Subject: [PATCH] fpi-ssm: Bug on handler set to a NULL function We would crash otherwise, while this is quite obvious there was no code enforcing this. --- libfprint/fpi-ssm.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libfprint/fpi-ssm.c b/libfprint/fpi-ssm.c index 0f54b1d..4498ce9 100644 --- a/libfprint/fpi-ssm.c +++ b/libfprint/fpi-ssm.c @@ -114,6 +114,7 @@ fpi_ssm_new (FpDevice *dev, FpiSsm *machine; BUG_ON (nr_states < 1); + BUG_ON (handler == NULL); machine = g_new0 (FpiSsm, 1); machine->handler = handler;