projects
/
exim.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7600349
)
DKIM: reduce memory usage (2nd go)
author
Jeremy Harris
<jgh146exb@wizmail.org>
Mon, 8 Aug 2016 20:07:55 +0000
(21:07 +0100)
committer
Jeremy Harris
<jgh146exb@wizmail.org>
Mon, 8 Aug 2016 20:07:55 +0000
(21:07 +0100)
src/src/pdkim/pdkim.c
patch
|
blob
|
blame
|
history
diff --git
a/src/src/pdkim/pdkim.c
b/src/src/pdkim/pdkim.c
index 915b90e5c321bf28d7e5f9a0d4700a6510d5ff69..bf2bbba6c2e393bc5d87ce831ae61ae8642a3c9f 100644
(file)
--- a/
src/src/pdkim/pdkim.c
+++ b/
src/src/pdkim/pdkim.c
@@
-723,7
+723,12
@@
while (sig)
const char *p;
int q = 0;
- relaxed_data = store_get(len+1);
+ /* We want to be able to free this else we allocate
+ for the entire message which could be many MB. Since
+ we don't know what allocations the SHA routines might
+ do, not safe to use store_get()/store_reset(). */
+
+ relaxed_data = malloc(len+1);
for (p = data; *p; p++)
{
@@
-767,6
+772,7
@@
while (sig)
sig = sig->next;
}
+if (relaxed_data) free(relaxed_data);
return PDKIM_OK;
}