| Server IP : 82.208.35.60 / Your IP : 216.73.217.33 Web Server : Apache/2.4.55 (FreeBSD) OpenSSL/1.1.1q-freebsd PHP/7.3.31 System : FreeBSD server7.d2m.cz 12.4-RELEASE-p9 FreeBSD 12.4-RELEASE-p9 GENERIC amd64 User : studiokobylisy_cz ( 1008) PHP Version : 7.3.31 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /usr/ports/security/trousers/files/ |
Upload File : |
--- src/include/tcs_utils.h.orig 2016-11-19 03:09:49 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;