[Fingerforce-commits] [fprintd] 04/12: tests: Fix possible crash in fprintd-verify

Didier Raboud odyx at moszumanska.debian.org
Sun Apr 12 13:12:06 UTC 2015


This is an automated email from the git hooks/post-receive script.

odyx pushed a commit to branch master
in repository fprintd.

commit 73ed60a60d650cb60dbc429a5dbd743c2ed80791
Author: Bastien Nocera <hadess at hadess.net>
Date:   Tue Feb 18 18:32:48 2014 +0100

    tests: Fix possible crash in fprintd-verify
    
    https://bugs.freedesktop.org/show_bug.cgi?id=75111
---
 tests/verify.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/tests/verify.c b/tests/verify.c
index 7d3ab64..af953b0 100644
--- a/tests/verify.c
+++ b/tests/verify.c
@@ -99,8 +99,10 @@ static void find_finger(DBusGProxy *dev, const char *username)
 		g_print(" - #%d: %s\n", i, fingers[i]);
 	}
 
-	if (strcmp (finger_name, "any") == 0)
-		finger_name = fingers[0];
+	if (strcmp (finger_name, "any") == 0) {
+		g_free (finger_name);
+		finger_name = g_strdup (fingers[0]);
+	}
 
 	g_strfreev (fingers);
 }

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/fingerforce/fprintd.git



More information about the Fingerforce-commits mailing list