git://git.exim.org
/
exim.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
30339e0
)
Fix NULL pointer deref when there is no message data whatsoever
author
Tom Kistner
<tom@duncanthrax.net>
Sat, 14 Nov 2009 14:01:16 +0000
(14:01 +0000)
committer
Tom Kistner
<tom@duncanthrax.net>
Sat, 14 Nov 2009 14:01:16 +0000
(14:01 +0000)
src/src/pdkim/pdkim.c
patch
|
blob
|
history
diff --git
a/src/src/pdkim/pdkim.c
b/src/src/pdkim/pdkim.c
index d875e1f89cf145b8b254bae12abb62b1a15791b1..2cf323366a473c3c8c72eb60dcf4ca66bd93078d 100644
(file)
--- a/
src/src/pdkim/pdkim.c
+++ b/
src/src/pdkim/pdkim.c
@@
-20,7
+20,7
@@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-/* $Cambridge: exim/src/src/pdkim/pdkim.c,v 1.
7 2009/11/09 14:19:48
tom Exp $ */
+/* $Cambridge: exim/src/src/pdkim/pdkim.c,v 1.
8 2009/11/14 14:01:16
tom Exp $ */
#include <stdlib.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdio.h>
@@
-1267,7
+1267,7
@@
DLLEXPORT int pdkim_feed_finish(pdkim_ctx *ctx, pdkim_signature **return_signatu
/* 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>' */
/* 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);
int rc = pdkim_header_complete(ctx);
if (rc != PDKIM_OK) return rc;
pdkim_update_bodyhash(ctx,"\r\n",2);