diff options
author | Daiki Ueno <dueno@redhat.com> | 2017-02-16 11:35:18 +0100 |
---|---|---|
committer | Daiki Ueno <ueno@gnu.org> | 2017-02-16 12:54:59 +0100 |
commit | 873d391fa5015e8c5c82457a0641ed5bb1e2b7e3 (patch) | |
tree | 9737fa63ee899901c60407c5e810ce9bcd96dacc | |
parent | b8f1e4febe31f18bf63a3a9ad0e336ede82dd0f1 (diff) |
compat: Fix character generation in mk{s,d}temp()
-rw-r--r-- | common/compat.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; |