forked from enlightenment/efl
ecore: Fix Asan stack overflow warning
Summary: As argument can be passed by register (depending on the compiler optimization) when we take the adress of the nbytes and pass it to send() function which reades 4 bytes from it ASAN flags it as a stack overflow . So just assign the value to a local variable to avoid the warning. Reviewers: Hermet Reviewed By: Hermet Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D11914
This commit is contained in:
parent
7e1da90093
commit
e94b5d014f
|
@ -204,6 +204,7 @@ ecore_pipe_write(Ecore_Pipe *p,
|
|||
size_t already_written = 0;
|
||||
int retry = ECORE_PIPE_WRITE_RETRY;
|
||||
Eina_Bool ok = EINA_FALSE;
|
||||
unsigned int bytes = nbytes;
|
||||
|
||||
if (!ECORE_MAGIC_CHECK(p, ECORE_MAGIC_PIPE))
|
||||
{
|
||||
|
@ -217,7 +218,7 @@ ecore_pipe_write(Ecore_Pipe *p,
|
|||
|
||||
do // First write the len into the pipe
|
||||
{
|
||||
ret = pipe_write(p->fd_write, &nbytes, sizeof(nbytes));
|
||||
ret = pipe_write(p->fd_write, &bytes, sizeof(bytes));
|
||||
if (ret == sizeof(nbytes))
|
||||
{
|
||||
retry = ECORE_PIPE_WRITE_RETRY;
|
||||
|
|
Loading…
Reference in New Issue