projects
/
platform
/
upstream
/
orc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e6ff84b
)
orc: Don't set memory protection if there's no code
author
Nirbheek Chauhan
<nirbheek@centricular.com>
Thu, 2 Jul 2020 09:32:57 +0000
(15:02 +0530)
committer
Nirbheek Chauhan
<nirbheek@centricular.com>
Thu, 2 Jul 2020 09:32:57 +0000
(15:02 +0530)
If the size of the JIT code is 0, there's no code and the *mem is
uninitialized. This can happen when orcc.exe is used to generate
backup C code.
Part-of: <https://gitlab.freedesktop.org/gstreamer/orc/-/merge_requests/44>
orc/orccompiler.c
patch
|
blob
|
history
diff --git
a/orc/orccompiler.c
b/orc/orccompiler.c
index
23a1a84
..
63eee29
100644
(file)
--- a/
orc/orccompiler.c
+++ b/
orc/orccompiler.c
@@
-223,6
+223,9
@@
_set_virtual_protect (void * mem, size_t size, int code_protect)
char *msg;
DWORD old_protect;
+ /* No code, so we 'succeed' */
+ if (size == 0)
+ return TRUE;
if (!mem)
return FALSE;