[svn] GnuPG - r4450 - branches/STABLE-BRANCH-1-4/g10
svn author wk
cvs at cvs.gnupg.org
Thu Mar 8 13:13:16 CET 2007
Author: wk
Date: 2007-03-08 13:13:15 +0100 (Thu, 08 Mar 2007)
New Revision: 4450
Modified:
branches/STABLE-BRANCH-1-4/g10/ChangeLog
branches/STABLE-BRANCH-1-4/g10/plaintext.c
Log:
Add extra fflush (stdout)
Modified: branches/STABLE-BRANCH-1-4/g10/ChangeLog
===================================================================
--- branches/STABLE-BRANCH-1-4/g10/ChangeLog 2007-03-08 12:11:58 UTC (rev 4449)
+++ branches/STABLE-BRANCH-1-4/g10/ChangeLog 2007-03-08 12:13:15 UTC (rev 4450)
@@ -1,3 +1,7 @@
+2007-03-08 Werner Koch <wk at g10code.com>
+
+ * plaintext.c (handle_plaintext): Add two extra fflush for stdout.
+
2007-03-06 David Shaw <dshaw at jabberwocky.com>
* keyedit.c (keyedit_menu): If we modify the keyblock (via
Modified: branches/STABLE-BRANCH-1-4/g10/plaintext.c
===================================================================
--- branches/STABLE-BRANCH-1-4/g10/plaintext.c 2007-03-08 12:11:58 UTC (rev 4449)
+++ branches/STABLE-BRANCH-1-4/g10/plaintext.c 2007-03-08 12:13:15 UTC (rev 4450)
@@ -69,6 +69,12 @@
{
char status[50];
+ /* Better make sure that stdout has been flushed in case the
+ output will be written to it. This is to make sure that no
+ not-yet-flushed stuff will be written after the plaintext
+ status message. */
+ fflush (stdout);
+
sprintf(status,"%X %lu ",(byte)pt->mode,(ulong)pt->timestamp);
write_status_text_and_buffer(STATUS_PLAINTEXT,
status,pt->name,pt->namelen,0);
@@ -385,6 +391,11 @@
fp = NULL;
leave:
+ /* Make sure that stdout gets flushed after the plaintext has
+ been handled. This is for extra security as we do a
+ flush anyway before checking the signature. */
+ fflush (stdout);
+
if( fp && fp != stdout )
fclose(fp);
xfree(fname);
More information about the Gnupg-commits
mailing list