Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
sgxwallet
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
董子豪
sgxwallet
Commits
e3f9007c
Unverified
Commit
e3f9007c
authored
Feb 29, 2020
by
kladko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SKALE-2298 Printf
parent
7e0e7d99
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
7 deletions
+11
-7
oc_alloc.c
oc_alloc.c
+9
-5
secure_enclave.c
secure_enclave/secure_enclave.c
+1
-1
secure_enclave.edl
secure_enclave/secure_enclave.edl
+1
-1
No files found.
oc_alloc.c
View file @
e3f9007c
...
...
@@ -42,13 +42,17 @@ uint64_t oc_realloc (void *optr, size_t osz, size_t nsz)
return
(
uint64_t
)
nptr
;
}
void
oc_printf
(
const
char
*
str
)
{
/* Proxy/Bridge will check the length and null-terminate
* the input string to prevent buffer overflow.
* */
fprintf
(
stderr
,
"***ENCLAVE_LOG***: %s"
,
str
);
}
void
oc_free
(
void
*
ptr
,
size_t
sz
)
{
free
(
ptr
);
}
void
oc_printf
()
{
fprintf
(
stderr
,
"haha
\n
"
);
}
\ No newline at end of file
secure_enclave/secure_enclave.c
View file @
e3f9007c
...
...
@@ -73,7 +73,7 @@ void free_function(void *, size_t);
void
tgmp_init
()
{
oc_printf
();
oc_printf
(
"Initing tgmp library
\n
"
);
oc_realloc_func
=
&
reallocate_function
;
oc_free_func
=
&
free_function
;
...
...
secure_enclave/secure_enclave.edl
View file @
e3f9007c
...
...
@@ -314,7 +314,7 @@ enclave {
include "gmp.h"
uint64_t oc_realloc([user_check] void *optr, size_t osz, size_t nsz);
void oc_printf();
void oc_printf(
[in, string] const char *str
);
void oc_free([user_check] void *optr, size_t sz);
};
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment