libfprint/SOURCES/0063-fpi-ssm-Bug-on-handler...

27 lines
760 B
Diff

From dac6c01df94333686d810a049dedfb32ee8b132b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= <mail@3v1n0.net>
Date: Thu, 28 Nov 2019 20:15:21 +0100
Subject: [PATCH 063/181] 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;
--
2.24.1