Browse Source

Merge pull request #37 from adombeck/master

Fix ls.manifest.template and check for NULL after malloc
Don Porter 7 years ago
parent
commit
debf5fdeb0

+ 1 - 5
LibOS/shim/test/native/ls.manifest.template

@@ -15,15 +15,11 @@ fs.mount.bin.type = chroot
 fs.mount.bin.path = /bin
 fs.mount.bin.uri = file:/bin
 
-# allow to bind on port 8000
-net.rules.1 = 127.0.0.1:8000:0.0.0.0:0-65535
-# allow to connect to port 8000
-net.rules.2 = 0.0.0.0:0-65535:127.0.0.1:8000
-
 # sgx-related
 sgx.trusted_files.ld = file:$(LIBCDIR)/ld-linux-x86-64.so.2
 sgx.trusted_files.libc = file:$(LIBCDIR)/libc.so.6
 sgx.trusted_files.libdl = file:$(LIBCDIR)/libdl.so.2
+sgx.trusted_files.libpthread = file:$(LIBCDIR)/libpthread.so.0
 sgx.trusted_files.libselinux = file:/lib/x86_64-linux-gnu/libselinux.so.1
 sgx.trusted_files.libacl = file:/lib/x86_64-linux-gnu/libacl.so.1
 sgx.trusted_files.libpcre = file:/lib/x86_64-linux-gnu/libpcre.so.3

+ 1 - 1
Pal/src/host/Linux-SGX/enclave_framework.c

@@ -186,7 +186,7 @@ int load_trusted_file (PAL_HANDLE file, sgx_arch_mac_t ** stubptr,
                 (tf->size % TRUSTED_STUB_SIZE ? 1 : 0);
 
     sgx_arch_mac_t * stubs = malloc(sizeof(sgx_arch_mac_t) * nstubs);
-    if (!tf)
+    if (!stubs)
         return -PAL_ERROR_NOMEM;
 
     sgx_arch_mac_t * s = stubs;