diff options
author | Mathieu Arnold <mat@FreeBSD.org> | 2016-06-20 16:23:28 +0000 |
---|---|---|
committer | Mathieu Arnold <mat@FreeBSD.org> | 2016-06-20 16:23:28 +0000 |
commit | 7ae7b018ccf7760013f368fcb83aad9ecd8982a8 (patch) | |
tree | e83ee6693050a76e305a95a376451aa583df151e /security/trousers/files/patch-src_include_tcs__utils.h | |
parent | textproc/rubygem-gitlab-grit: make it work with rubygem-mime-types again (diff) |
With the power of USES=dos2unix, get rid of most patches and files
with CRLF.
While there, run make makepatch, rename patches to use the new scheme,
and various fixes.
With hat: portmgr
Sponsored by: Absolight
Diffstat (limited to 'security/trousers/files/patch-src_include_tcs__utils.h')
-rw-r--r-- | security/trousers/files/patch-src_include_tcs__utils.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/security/trousers/files/patch-src_include_tcs__utils.h b/security/trousers/files/patch-src_include_tcs__utils.h new file mode 100644 index 000000000000..4eee71c78339 --- /dev/null +++ b/security/trousers/files/patch-src_include_tcs__utils.h @@ -0,0 +1,23 @@ +--- src/include/tcs_utils.h.orig 2016-06-20 15:21:26 UTC ++++ src/include/tcs_utils.h +@@ -18,6 +18,20 @@ + #include "tcs_tsp.h" + #include "trousers_types.h" + ++ ++ ++/* ++ * XXX malloc wrapper ++ * ++ * Linux: malloc(0) => '\0' ++ * *BSD: malloc(0) => invalid to dereference ++ * ++ * => so wrap malloc(0) => calloc(1, 16) to create ++ * a 16Byte array containing '\0' ++ * ++ */ ++#define malloc(x) ((x) == 0 ? calloc(1, 16) : calloc(1, (x))) ++ + struct key_mem_cache + { + TCPA_KEY_HANDLE tpm_handle; |