SecBSD's official ports repository
This commit is contained in:
commit
2c0afcbbf3
64331 changed files with 5339189 additions and 0 deletions
32
security/mcrypt/patches/patch-src_rfc2440_c
Normal file
32
security/mcrypt/patches/patch-src_rfc2440_c
Normal file
|
@ -0,0 +1,32 @@
|
|||
- Don't use malloc.h header on OpenBSD
|
||||
- Fix segv : http://sourceforge.net/p/mcrypt/patches/13/
|
||||
|
||||
--- src/rfc2440.c.orig Sun Nov 16 14:50:01 2008
|
||||
+++ src/rfc2440.c Thu Nov 20 02:24:36 2014
|
||||
@@ -23,7 +23,6 @@
|
||||
#include <zlib.h>
|
||||
#endif
|
||||
#include <stdio.h>
|
||||
-#include <malloc.h>
|
||||
|
||||
#include "xmalloc.h"
|
||||
#include "keys.h"
|
||||
@@ -497,7 +496,7 @@ plaintext_encode(const USTRING dat)
|
||||
time_t t;
|
||||
|
||||
assert(dat->len > 0);
|
||||
- result = make_ustring( NULL, 2 * dat->len); /* xxx */
|
||||
+ result = make_ustring( NULL, dat->len + 12); /* xxx */
|
||||
newdat = (USTRING)dat;
|
||||
result->d[pos++] = (0x80 | 0x40 | PKT_PLAINTEXT);
|
||||
|
||||
@@ -810,7 +809,8 @@ encrypted_encode(const USTRING pt, const DEK *dek)
|
||||
_mcrypt_encrypt(dek->hd, rndpref, dek->blocklen + 2, NULL, 0);
|
||||
_mcrypt_sync(dek->hd, rndpref, dek->blocklen);
|
||||
|
||||
- ct = make_ustring( rndpref, 2 * pt->len); /* xxx */
|
||||
+ ct = make_ustring( NULL, dek->blocklen + 2 + pt->len + 12); /* xxx */
|
||||
+ memcpy(ct->d, rndpref, dek->blocklen + 2);
|
||||
pos = dek->blocklen + 2;
|
||||
|
||||
_mcrypt_encrypt(dek->hd, ct->d + pos, pt->len, pt->d, pt->len);
|
Loading…
Add table
Add a link
Reference in a new issue