From 815456844dc6b7c13387086cff9a443cb2cd153b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Fr=C3=A9d=C3=A9ric=20Marchal?= Date: Thu, 28 Jul 2011 15:21:20 +0000 Subject: [PATCH] Correctly append a suffix to the mangled temporary file name When two users end up with the same mangled temporary file name, a suffix is supposed to be added at the end of the new file name to make it distinct from the previous one but the suffix was added one byte too far making it useless. The result was that the log entries of two or more users were written into the same file overwritting each other's data and corrupting the report. Thanks to Mark Dennison for reporting this bug. --- userinfo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/userinfo.c b/userinfo.c index b76ba1f..90c1433 100644 --- a/userinfo.c +++ b/userinfo.c @@ -109,7 +109,7 @@ struct userinfostruct *userinfo_create(const char *userid) } } user->filename[j]='\0'; - flen=i; + flen=i-1; count=0; for (group=first_user_group ; group ; group=group->next) { -- 2.47.2