~ubuntu-branches/ubuntu/oneiric/gnupg2/oneiric-proposed

« back to all changes in this revision

Viewing changes to g10/plaintext.c

  • Committer: Bazaar Package Importer
  • Author(s): Marc Deslauriers
  • Date: 2011-05-25 14:27:35 UTC
  • mfrom: (1.1.15 upstream) (7.1.7 sid)
  • Revision ID: james.westby@ubuntu.com-20110525142735-jccyw0fopnyv728q
Tags: 2.0.17-2ubuntu1
* Merge from debian unstable. Remaining changes:
  - Add udev rules to give gpg access to some smartcard readers;
    Debian #543217.
    . debian/gnupg2.dev: udev rules to set ACLs on SCM smartcard readers.
    . debian/rules: Call dh_installudev.
  - debian/control: Rename Vcs-* to XS-Debian-Vcs-*.

Show diffs side-by-side

added added

removed removed

Lines of Context:
402
402
    /* Make sure that stdout gets flushed after the plaintext has
403
403
       been handled.  This is for extra security as we do a
404
404
       flush anyway before checking the signature.  */
405
 
    fflush (stdout);
 
405
    if (fflush (stdout))
 
406
      {
 
407
        /* We need to check the return code to detect errors like disk
 
408
           full for short plaintexts.  See bug#1207.  Checking return
 
409
           values is a good idea in any case.  */
 
410
        if (!rc)
 
411
          rc = gpg_error_from_syserror ();
 
412
        log_error ("error flushing `%s': %s\n", "[stdout]", strerror (errno) );
 
413
      }
406
414
 
407
415
    if( fp && fp != stdout )
408
416
      fclose (fp);
623
631
{
624
632
  PKT_plaintext *pt;
625
633
 
626
 
  if(filename || opt.set_filename)
 
634
  if ((filename && !iobuf_is_pipe_filename (filename))
 
635
       || (opt.set_filename && !iobuf_is_pipe_filename (opt.set_filename)))
627
636
    {
628
637
      char *s;
629
638