summaryrefslogtreecommitdiff
path: root/unotools
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2011-11-21 12:56:43 +0000
committerCaolán McNamara <caolanm@redhat.com>2011-11-21 12:56:43 +0000
commitc6560c6f07f7f71842d7314157feaca2fa4a03c9 (patch)
treeef1f697f645e624fe61d3f6841415d5b9758a87c /unotools
parent6a9593f8825c1c91007099ceae8ed0c497693ae9 (diff)
Resolves fdo#41295 tmp name reuse in mass pdf export
Diffstat (limited to 'unotools')
-rw-r--r--unotools/source/ucbhelper/tempfile.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/unotools/source/ucbhelper/tempfile.cxx b/unotools/source/ucbhelper/tempfile.cxx
index d157bab79d01..6728c808f985 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 );