Skip to content

Commit

Permalink
Fixed DKIM body filters to reserve extra space in the output buffer
Browse files Browse the repository at this point in the history
Fixes issue #188
  • Loading branch information
jstedfast committed Nov 17, 2015
1 parent 71abff2 commit 3405909
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion MimeKit/Cryptography/DkimRelaxedBodyFilter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ unsafe int Filter (byte* inbuf, int length, byte* outbuf)
/// <param name="flush">If set to <c>true</c>, all internally buffered data should be flushed to the output buffer.</param>
protected override byte[] Filter (byte[] input, int startIndex, int length, out int outputIndex, out int outputLength, bool flush)
{
EnsureOutputSize (length + (lwsp ? 1 : 0) + EmptyLines * 2, false);
EnsureOutputSize (length + (lwsp ? 1 : 0) + EmptyLines * 2 + 1, false);

unsafe {
fixed (byte* inptr = input, outptr = OutputBuffer) {
Expand Down
2 changes: 1 addition & 1 deletion MimeKit/Cryptography/DkimSimpleBodyFilter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ unsafe int Filter (byte* inbuf, int length, byte* outbuf)
/// <param name="flush">If set to <c>true</c>, all internally buffered data should be flushed to the output buffer.</param>
protected override byte[] Filter (byte[] input, int startIndex, int length, out int outputIndex, out int outputLength, bool flush)
{
EnsureOutputSize (length + EmptyLines * 2, false);
EnsureOutputSize (length + EmptyLines * 2 + 1, false);

unsafe {
fixed (byte* inptr = input, outptr = OutputBuffer) {
Expand Down

0 comments on commit 3405909

Please sign in to comment.