mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
Add extra fflush (stdout)
This commit is contained in:
parent
57591eb76f
commit
7b3e35a24c
2 changed files with 15 additions and 0 deletions
|
@ -69,6 +69,12 @@ handle_plaintext( PKT_plaintext *pt, md_filter_context_t *mfx,
|
|||
{
|
||||
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 @@ handle_plaintext( PKT_plaintext *pt, md_filter_context_t *mfx,
|
|||
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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue