Skip to content

Commit f27e724

Browse files
authored
Merge pull request diffblue#2421 from tautschnig/vs-bound
Bound the number of attempts my_mkstemps tries to compute a file name
2 parents ed98fd7 + 4b5677d commit f27e724

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/util/tempfile.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ int my_mkstemps(char *template_str, int suffix_len)
6262
static long long unsigned int random_state;
6363
random_state+=getpid()+123;
6464

65-
for(unsigned attempt=0; ; ++attempt)
65+
for(unsigned attempt = 0; attempt < 1000; ++attempt)
6666
{
6767
unsigned long long number=random_state;
6868

0 commit comments

Comments
 (0)