summaryrefslogtreecommitdiff
path: root/sal
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-11-21 12:29:24 +0100
committerStephan Bergmann <sbergman@redhat.com>2014-11-21 12:29:45 +0100
commit2975abf7964de1f4b705204caac722b3ea69cb8b (patch)
treeeb70c5e6425bca6600f1672f078c16835b557f62 /sal
parenta87b1b07b91960601c7f39e2b40eba8ad50b1667 (diff)
Silence false cid#1255391 TOCTOU warning
Change-Id: Ifc35c379d5c68fb363ae3507ccb5bff37c8cd9aa
Diffstat (limited to 'sal')
-rw-r--r--sal/osl/unx/pipe.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/sal/osl/unx/pipe.cxx b/sal/osl/unx/pipe.cxx
index b1b5a7649ef5..ecddb6629501 100644
--- a/sal/osl/unx/pipe.cxx
+++ b/sal/osl/unx/pipe.cxx
@@ -311,6 +311,10 @@ oslPipe SAL_CALL osl_psz_createPipe(const sal_Char *pszPipeName, oslPipeOptions
if ( listen(pPipe->m_Socket, 5) < 0 )
{
OSL_TRACE("osl_createPipe failed to listen. Errno: %d; %s",errno,strerror(errno));
+ // coverity[toctou] cid#1255391 warns about unlink(name) after
+ // stat(name, &status) above, but the intervening call to bind makes
+ // those two clearly unrelated, as it would fail if name existed at
+ // that point in time:
unlink(name); /* remove filesystem entry */
close (pPipe->m_Socket);
__osl_destroyPipeImpl(pPipe);