forked from enlightenment/efl
Ecore con: Prevent possible use of uninitialised buffer on the stack.
I'm not actually sure if it's a false, because finding the possible options is hard. Just to be safe, it's better to set buf to "" in the else case. I'm doing this instead of initialising the variable so the compiler/static analyser will be able to warn us if there are other code paths that should probably set buf, but don't. CID 1316016 @fix
This commit is contained in:
parent
fa2ecb3af6
commit
681328feb5
|
@ -303,6 +303,10 @@ ecore_con_local_listen(
|
|||
strncpy(buf, svr->name, sizeof(buf) - 1);
|
||||
buf[sizeof(buf) - 1] = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
buf[0] = '\0';
|
||||
}
|
||||
|
||||
pmode = umask(mask);
|
||||
start:
|
||||
|
|
Loading…
Reference in New Issue