When checking to see whether or not a new name is unique, the code was
using the wrong length parameter, which could cause the anti-collision
loop for a long time trying to find what it thinks is a unique name.
Addresses-Sourceforge-Bug: #
3540545
Reported-by: Vitaly Oratovsky <vmo@users.sourceforge.net>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
mutate_name(new_name, &new_len);
for (j=0; j < fd->num_array; j++) {
if ((i==j) ||
- ((ent->dir->name_len & 0xFF) !=
+ ((new_len & 0xFF) !=
(fd->harray[j].dir->name_len & 0xFF)) ||
(strncmp(new_name, fd->harray[j].dir->name,
new_len & 0xFF)))