aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2003-04-09 08:03:17 +0000
committerWerner Koch <[email protected]>2003-04-09 08:03:17 +0000
commit5a9e7663c12b6be01f5d07b2ee66b70d9c9f8f9d (patch)
treec4ae2a8142ad2136ae15a034aff90fc5a9def8d8
parent* hkp.c (dehtmlize): Fix bug #121 (memory corruption on some platforms). (diff)
downloadgnupg-5a9e7663c12b6be01f5d07b2ee66b70d9c9f8f9d.tar.gz
gnupg-5a9e7663c12b6be01f5d07b2ee66b70d9c9f8f9d.zip
* decrypt.c (decrypt_messages): Fixed error handling; the fucntion
used to re-loop with same file after an error. Reported by Joseph Walton.
-rw-r--r--THANKS1
-rw-r--r--g10/ChangeLog6
-rw-r--r--g10/decrypt.c21
3 files changed, 15 insertions, 13 deletions
diff --git a/THANKS b/THANKS
index 5bda68d19..432b15330 100644
--- a/THANKS
+++ b/THANKS
@@ -102,6 +102,7 @@ John A. Martin [email protected]
Johnny Teve�en [email protected]
J�rg Schilling [email protected]
Jos Backus [email protected]
+Joseph Walton [email protected]
Jun Kuriyama [email protected]
Kahil D. Jallad [email protected]
Karl Fogel [email protected]
diff --git a/g10/ChangeLog b/g10/ChangeLog
index 67d71ac3a..9cc383108 100644
--- a/g10/ChangeLog
+++ b/g10/ChangeLog
@@ -1,3 +1,9 @@
+2003-04-09 Werner Koch <[email protected]>
+
+ * decrypt.c (decrypt_messages): Fixed error handling; the fucntion
+ used to re-loop with same file after an error. Reported by Joseph
+ Walton.
+
2003-04-08 David Shaw <[email protected]>
* hkp.c (dehtmlize): Fix bug #121 (memory corruption on some
diff --git a/g10/decrypt.c b/g10/decrypt.c
index 297ee3418..b17eeb527 100644
--- a/g10/decrypt.c
+++ b/g10/decrypt.c
@@ -1,5 +1,5 @@
/* decrypt.c - verify signed data
- * Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+ * Copyright (C) 1998,1999,2000,2001,2002,2003 Free Software Foundation, Inc.
*
* This file is part of GnuPG.
*
@@ -99,12 +99,12 @@ decrypt_messages(int nfiles, char **files)
print_file_status(STATUS_FILE_START, *files, 3);
output = make_outfile_name(*files);
if (!output)
- continue;
+ goto next_file;
fp = iobuf_open(*files);
if (!fp)
{
log_error(_("can't open `%s'\n"), print_fname_stdin(*files));
- continue;
+ goto next_file;
}
if (!opt.no_armor)
{
@@ -122,17 +122,12 @@ decrypt_messages(int nfiles, char **files)
p = get_last_passphrase();
set_next_passphrase(p);
m_free (p);
- files++;
- m_free(output);
+
+ next_file:
+ /* Note that we emit file_done even after an error. */
write_status( STATUS_FILE_DONE );
+ m_free(output);
+ files++;
}
set_next_passphrase(NULL);
}
-
-
-
-
-
-
-
-