From 0215483fb3f41aea0e2a2b95320fcebc3fbc2bb4 Mon Sep 17 00:00:00 2001 From: Timur Celik Date: Sat, 10 Feb 2018 01:29:04 +0100 Subject: [PATCH] assembling: Fix assembling of last frame in reverse mode The last image is always misplaced because the sign of the delta vector isn't corrected. This could result in false positives and verification failing. https://bugs.freedesktop.org/show_bug.cgi?id=105027 --- libfprint/assembling.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libfprint/assembling.c b/libfprint/assembling.c index ec37a25..7b9fb79 100644 --- a/libfprint/assembling.c +++ b/libfprint/assembling.c @@ -132,8 +132,8 @@ static unsigned int do_movement_estimation(struct fpi_frame_asmbl_ctx *ctx, if (reverse) { find_overlap(ctx, prev_stripe, cur_stripe, &min_error); - prev_stripe->delta_y = -prev_stripe->delta_y; - prev_stripe->delta_x = -prev_stripe->delta_x; + cur_stripe->delta_y = -cur_stripe->delta_y; + cur_stripe->delta_x = -cur_stripe->delta_x; } else find_overlap(ctx, cur_stripe, prev_stripe, &min_error);