mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-09 12:54:23 +01:00
Add extra flushs
This commit is contained in:
parent
c54ef0383c
commit
f7c1efc880
@ -1,3 +1,7 @@
|
|||||||
|
2007-03-08 Werner Koch <wk@g10code.com>
|
||||||
|
|
||||||
|
* plaintext.c (handle_plaintext): Add two extra fflush for stdout.
|
||||||
|
|
||||||
2007-03-08 David Shaw <dshaw@jabberwocky.com> (wk)
|
2007-03-08 David Shaw <dshaw@jabberwocky.com> (wk)
|
||||||
|
|
||||||
* keyedit.c (keyedit_menu): If we modify the keyblock (via
|
* keyedit.c (keyedit_menu): If we modify the keyblock (via
|
||||||
|
@ -69,6 +69,12 @@ handle_plaintext( PKT_plaintext *pt, md_filter_context_t *mfx,
|
|||||||
{
|
{
|
||||||
char status[50];
|
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);
|
sprintf(status,"%X %lu ",(byte)pt->mode,(ulong)pt->timestamp);
|
||||||
write_status_text_and_buffer(STATUS_PLAINTEXT,
|
write_status_text_and_buffer(STATUS_PLAINTEXT,
|
||||||
status,pt->name,pt->namelen,0);
|
status,pt->name,pt->namelen,0);
|
||||||
@ -394,8 +400,13 @@ handle_plaintext( PKT_plaintext *pt, md_filter_context_t *mfx,
|
|||||||
fp = NULL;
|
fp = NULL;
|
||||||
|
|
||||||
leave:
|
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 )
|
if( fp && fp != stdout )
|
||||||
fclose(fp);
|
fclose (fp);
|
||||||
xfree(fname);
|
xfree(fname);
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user