From 7912a0cb26727611e0d10c1615efa99bba2576fc Mon Sep 17 00:00:00 2001 From: Justin Hall Date: Thu, 23 Apr 2026 14:18:00 -0400 Subject: [PATCH] samsung7305: guard frame-list walk against scan-build false positive scan-build flags ordered->next as a possible null deref because it cannot correlate the GSList length with frames_captured. The frames_captured >= MIN_FRAMES guard upstream of the head drop makes the deref safe in practice, but adding an explicit ordered && ordered->next check silences the analyzer without changing behavior. Co-Authored-By: Claude Opus 4.7 --- libfprint/drivers/samsung7305.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libfprint/drivers/samsung7305.c b/libfprint/drivers/samsung7305.c index af7ec3aa..05d5b038 100644 --- a/libfprint/drivers/samsung7305.c +++ b/libfprint/drivers/samsung7305.c @@ -1158,7 +1158,7 @@ m_loop_state (FpiSsm *ssm, FpDevice *dev) self->frames_captured); } - if (self->frames_captured >= 2) + if (self->frames_captured >= 2 && ordered && ordered->next) { /* Fixed stride instead of motion estimation — see the note * near ASSEMBLE_STRIDE. First frame's delta_y is forced to 0