mirror of
git://repo.or.cz/tinycc.git
synced 2026-07-01 09:08:40 +08:00
Fix missing mem_size assignment when using mmap()
This commit is contained in:
parent
fdf9fba578
commit
80b36ab628
2
tccrun.c
2
tccrun.c
@ -60,6 +60,8 @@ LIBTCCAPI int tcc_relocate(TCCState *s1, void *ptr)
|
|||||||
|
|
||||||
#ifdef HAVE_SELINUX
|
#ifdef HAVE_SELINUX
|
||||||
{ /* Use mmap instead of malloc for Selinux. */
|
{ /* Use mmap instead of malloc for Selinux. */
|
||||||
|
s1->mem_size = ret;
|
||||||
|
|
||||||
s1->write_mem = mmap (NULL, ret, PROT_READ|PROT_WRITE,
|
s1->write_mem = mmap (NULL, ret, PROT_READ|PROT_WRITE,
|
||||||
MAP_PRIVATE|MAP_ANONYMOUS, -1, 0);
|
MAP_PRIVATE|MAP_ANONYMOUS, -1, 0);
|
||||||
if (s1->write_mem == MAP_FAILED)
|
if (s1->write_mem == MAP_FAILED)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user