fuse-jna
fuse-jna copied to clipboard
Possible endless loop in FuseJna.getFilesystemName()
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);