From 873d391fa5015e8c5c82457a0641ed5bb1e2b7e3 Mon Sep 17 00:00:00 2001 From: Daiki Ueno Date: Thu, 16 Feb 2017 11:35:18 +0100 Subject: compat: Fix character generation in mk{s,d}temp() --- common/compat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/compat.c b/common/compat.c index 1255b0e..970e5ed 100644 --- a/common/compat.c +++ b/common/compat.c @@ -672,7 +672,7 @@ _gettemp (char *path, /* Fill space with random characters */ while (trv >= path && *trv == 'X') { - rnd = rand () % sizeof (padchar) - 1; + rnd = rand () % (sizeof (padchar) - 1); *trv-- = padchar[rnd]; } start = trv + 1; -- cgit v1.1