Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible endless loop in FuseJna.getFilesystemName() #44

Open
centic9 opened this issue Feb 4, 2015 · 0 comments
Open

Possible endless loop in FuseJna.getFilesystemName() #44

centic9 opened this issue Feb 4, 2015 · 0 comments

Comments

@centic9
Copy link
Contributor

centic9 commented Feb 4, 2015

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);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant