diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-11-21 15:05:53 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2011-11-21 15:05:53 +0100 |
commit | b5b7699c6a42f6cca7da6d91eac0dada9e48ee35 (patch) | |
tree | 8084f02df8cf6291e2928ffa5c008b9f54ae8011 | |
parent | d87712a52d33ade9fd2821b91caf92d11ef31a93 (diff) |
Resolves fdo#41295 tmp name reuse in mass pdf export
Cherry-picked from http://cgit.freedesktop.org/libreoffice/core/commit/?id=c6560c6f07f7f71842d7314157feaca2fa4a03c9
Signed-off-by: Stephan Bergmann <sbergman@redhat.com>
-rw-r--r-- | unotools/source/ucbhelper/tempfile.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/unotools/source/ucbhelper/tempfile.cxx b/unotools/source/ucbhelper/tempfile.cxx index 95c63cc3b4..9d49bce9c1 100644 --- a/unotools/source/ucbhelper/tempfile.cxx +++ b/unotools/source/ucbhelper/tempfile.cxx @@ -206,8 +206,8 @@ void CreateTempName_Impl( String& rName, sal_Bool bKeep, sal_Bool bDir = sal_Tru aName += String::CreateFromAscii( "lu" ); rName.Erase(); - unsigned long nSeed = Time::GetSystemTicks() % nMax; - for ( unsigned long u = nSeed; ++u != nSeed; ) + static unsigned long u = Time::GetSystemTicks() % nMax; + for ( unsigned long nSeed = u; ++u != nSeed; ) { u %= nMax; String aTmp( aName ); |