[exim-cvs] cvs commit: exim/exim-src/src dkim.c

Góra strony
Delete this message
Reply to this message
Autor: Tom Kistner
Data:  
Dla: exim-cvs
Temat: [exim-cvs] cvs commit: exim/exim-src/src dkim.c
tom 2009/10/13 19:32:05 BST

  Modified files:
    exim-src/src         dkim.c 
  Log:
  Bugzilla #890


  Revision  Changes    Path
  1.4       +7 -1      exim/exim-src/src/dkim.c


  Index: dkim.c
  ===================================================================
  RCS file: /home/cvs/exim/exim-src/src/dkim.c,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- dkim.c    31 Aug 2009 21:14:50 -0000    1.3
  +++ dkim.c    13 Oct 2009 18:32:05 -0000    1.4
  @@ -1,4 +1,4 @@
  -/* $Cambridge: exim/exim-src/src/dkim.c,v 1.3 2009/08/31 21:14:50 tom Exp $ */
  +/* $Cambridge: exim/exim-src/src/dkim.c,v 1.4 2009/10/13 18:32:05 tom Exp $ */


   /*************************************************
   *     Exim - an Internet mail transport agent    *
  @@ -456,7 +456,13 @@
       /* Looks like a filename, load the private key. */
       memset(big_buffer,0,big_buffer_size);
       privkey_fd = open(CS dkim_private_key,O_RDONLY);
  -    (void)read(privkey_fd,big_buffer,16383);
  +    if (privkey_fd < 0) {
  +      log_write(0, LOG_MAIN|LOG_PANIC, "unable to open "
  +        "private key file for reading: %s", dkim_private_key);
  +      rc = NULL;
  +      goto CLEANUP;
  +    }
  +    (void)read(privkey_fd,big_buffer,(big_buffer_size-2));
       (void)close(privkey_fd);
       dkim_private_key = big_buffer;
     }