[seahorse] Stop parsing SSH private keys if all data was consumed.
- From: Stefan Walter <stefw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [seahorse] Stop parsing SSH private keys if all data was consumed.
- Date: Mon, 14 Mar 2011 21:29:56 +0000 (UTC)
commit ad9638ace3f799161b26a325c1be505ba5e43d8c
Author: Stef Walter <stefw collabora co uk>
Date: Thu Mar 10 17:49:46 2011 +0100
Stop parsing SSH private keys if all data was consumed.
This fixes a crash.
ssh/seahorse-ssh-key-data.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/ssh/seahorse-ssh-key-data.c b/ssh/seahorse-ssh-key-data.c
index b140394..dfb562c 100644
--- a/ssh/seahorse-ssh-key-data.c
+++ b/ssh/seahorse-ssh-key-data.c
@@ -261,6 +261,10 @@ seahorse_ssh_key_data_parse (const gchar *data, SeahorseSSHPublicKeyParsed publi
if (!(secret_cb) (secdata, arg))
break;
}
+
+ if (!*l)
+ break;
+ line = *l;
}
/* Comments and empty lines, not a parse error, but no data */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]