fuse-jna icon indicating copy to clipboard operation
fuse-jna copied to clipboard

Possible endless loop in FuseJna.getFilesystemName()

Open centic9 opened this issue 9 years ago • 0 comments

The following code will loop endlessly, if there is already a mount for the mountPoint, as it only changes the value for the given key, but not the key itself so it will always return non-null when the mountPoint is already contained in the map.

    String suffix;
    do {
        suffix = Long.toString(defaultFilesystemRandom.nextLong());
    }
    while (filesystemNames.put(mountPoint, fuseName + suffix) != null);

centic9 avatar Feb 04 '15 11:02 centic9