From 7ae7b018ccf7760013f368fcb83aad9ecd8982a8 Mon Sep 17 00:00:00 2001 From: Mathieu Arnold Date: Mon, 20 Jun 2016 16:23:28 +0000 Subject: 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 --- .../trousers/files/patch-src_include_tcs__utils.h | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 security/trousers/files/patch-src_include_tcs__utils.h (limited to 'security/trousers/files/patch-src_include_tcs__utils.h') 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; -- cgit v1.2.3