In the find method of Packer.java the break statement
occurs too early; because of this, the last word in a
block may not be found. This may lead to easy passwords
being erroneously recognised as safe.
The correct for-loop in find has to look like this:
for (;;) {
int middle = lwm + ((hwm - lwm + 1) / 2);
int cmp = s.compareTo(get(middle));
if ( cmp == 0 )
return middle;
if ( hwm == middle ) break;
if (cmp < 0) {
hwm = middle;
} else {
lwm = middle;
}
}
Nobody/Anonymous
None
None
Public
Copyright © 2010 Geeknet, Inc. All rights reserved. Terms of Use