git.samba.org
/
jerry
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a302e31
)
good security patch from Timothy.Sell@unisys.com
author
Andrew Tridgell
<tridge@samba.org>
Sun, 28 Jul 2002 06:08:30 +0000
(06:08 +0000)
committer
Andrew Tridgell
<tridge@samba.org>
Sun, 28 Jul 2002 06:08:30 +0000
(06:08 +0000)
we could generate short passwords!
samba-patches 880
source/lib/genrand.c
patch
|
blob
|
history
diff --git
a/source/lib/genrand.c
b/source/lib/genrand.c
index ee8bc0b1d5abc59a11e75596cdc39872d3a0c874..fe756169a669735b58b0dfa81ac32bf43a4f5293 100644
(file)
--- a/
source/lib/genrand.c
+++ b/
source/lib/genrand.c
@@
-259,7
+259,7
@@
char *generate_random_str(size_t len)
len = sizeof(retstr) -1;
generate_random_buffer( retstr, len, False);
for (i = 0; i < len; i++)
- retstr[i] = c_list[ retstr[i] %
sizeof(c_list
) ];
+ retstr[i] = c_list[ retstr[i] %
(sizeof(c_list)-1
) ];
retstr[i] = '\0';