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

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Tom Kistner
Date:  
À: exim-cvs
Sujet: [exim-cvs] cvs commit: exim/exim-src/src/pdkim pdkim.c
tom 2009/11/14 14:01:16 GMT

  Modified files:
    exim-src/src/pdkim   pdkim.c 
  Log:
  Fix NULL pointer deref when there is no message data whatsoever


  Revision  Changes    Path
  1.8       +1 -1      exim/exim-src/src/pdkim/pdkim.c


  Index: pdkim.c
  ===================================================================
  RCS file: /home/cvs/exim/exim-src/src/pdkim/pdkim.c,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- pdkim.c    9 Nov 2009 14:19:48 -0000    1.7
  +++ pdkim.c    14 Nov 2009 14:01:16 -0000    1.8
  @@ -20,7 +20,7 @@
    *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
    */


-/* $Cambridge: exim/exim-src/src/pdkim/pdkim.c,v 1.7 2009/11/09 14:19:48 tom Exp $ */
+/* $Cambridge: exim/exim-src/src/pdkim/pdkim.c,v 1.8 2009/11/14 14:01:16 tom Exp $ */

   #include <stdlib.h>
   #include <stdio.h>
  @@ -1267,7 +1267,7 @@
     /* Check if we must still flush a (partial) header. If that is the
        case, the message has no body, and we must compute a body hash
        out of '<CR><LF>' */
  -  if (ctx->cur_header->len) {
  +  if (ctx->cur_header && ctx->cur_header->len) {
       int rc = pdkim_header_complete(ctx);
       if (rc != PDKIM_OK) return rc;
       pdkim_update_bodyhash(ctx,"\r\n",2);