libfprint/SOURCES/0056-fpi-ssm-Also-bug-on-negative-state-value.patch
2021-09-09 20:12:48 +00:00

27 lines
794 B
Diff

From 66b6a2598b599afe874efe15bec4cdcb34f7ee79 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= <mail@3v1n0.net>
Date: Fri, 22 Nov 2019 18:03:08 +0100
Subject: [PATCH 056/181] fpi-ssm: Also bug-on negative state value
Being an integer, anything could happen.
---
libfprint/fpi-ssm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libfprint/fpi-ssm.c b/libfprint/fpi-ssm.c
index 5367e32..5299e2d 100644
--- a/libfprint/fpi-ssm.c
+++ b/libfprint/fpi-ssm.c
@@ -317,7 +317,7 @@ void
fpi_ssm_jump_to_state (FpiSsm *machine, int state)
{
BUG_ON (machine->completed);
- BUG_ON (state >= machine->nr_states);
+ BUG_ON (state < 0 || state >= machine->nr_states);
machine->cur_state = state;
__ssm_call_handler (machine);
}
--
2.24.1