core: Don't insert null byte in temporary file names

This commit is contained in:
Colin Walters 2011-12-15 13:10:41 -05:00
parent 8ab2296a70
commit ecbffd4915
1 changed files with 1 additions and 1 deletions

View File

@ -990,7 +990,7 @@ subst_xxxxxx (GRand *rand,
while (*xxxxxx == 'X') while (*xxxxxx == 'X')
{ {
int offset = g_random_int_range (0, sizeof (table)); int offset = g_random_int_range (0, sizeof (table) - 1);
*xxxxxx = (guint8)table[offset]; *xxxxxx = (guint8)table[offset];
xxxxxx++; xxxxxx++;
} }