Permalink
Browse files

bugfix: salt array out of range

  • Loading branch information...
1 parent 2b92576 commit c1ad4802f114dc62aee9fddbd4371c3c90bd9c8d @zhpengg committed May 23, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 bench/db-bench.c
View
@@ -35,7 +35,7 @@ void _random_key(char *key,int length) {
char salt[36]= "abcdefghijklmnopqrstuvwxyz0123456789";
for (i = 0; i < length; i++)
- key[i] = salt[rand() % length];
+ key[i] = salt[rand() % 36];
}
void _print_header(int count)

0 comments on commit c1ad480

Please sign in to comment.