Changeset 247 for trunk/src/sh_hash.c


Ignore:
Timestamp:
Sep 17, 2009, 10:22:48 PM (15 years ago)
Author:
katerina
Message:

Fix a race condition that might have caused ticket #163.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/sh_hash.c

    r227 r247  
    820820    }
    821821
    822   sh_fin_fd = fdopen(get_the_fd(fd), "rb");
     822  sh_fin_fd = fdopen(dup(get_the_fd(fd)), "rb");
    823823  if (!sh_fin_fd)
    824824    {
     
    11281128#if defined(WITH_GPG) || defined(WITH_PGP)
    11291129  extern int get_the_fd (SL_TICKET ticket);
    1130   FILE *   fin_cp;
     1130  FILE *   fin_cp = NULL;
    11311131
    11321132  char * buf  = NULL;
     
    12431243  fdTmp = open_tmp();
    12441244
    1245   fin_cp = fdopen(get_the_fd(fd), "rb");
     1245  fin_cp = fdopen(dup(get_the_fd(fd)), "rb");
    12461246  buf = SH_ALLOC(FGETS_BUF);
    12471247
Note: See TracChangeset for help on using the changeset viewer.