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

Garbled, varying text after symlink destinations #30

Closed
sbond75 opened this issue Apr 17, 2024 · 3 comments
Closed

Garbled, varying text after symlink destinations #30

sbond75 opened this issue Apr 17, 2024 · 3 comments

Comments

@sbond75
Copy link

sbond75 commented Apr 17, 2024

Hello,

After using hfsfuse to transfer some files from an HFS+ drive with rsync, I noticed that running ls on some symlinks shows random bytes appearing, appended at the end of the actual destination. For example:

$ ls -la 'node_modules/puppeteer/.local-chromium/mac-869685/chrome-mac/Chromium.app/Contents/Frameworks/Chromium Framework.framework/Versions/'
total 4
drwxr-xr-x 1 99 99  36 May 11  2021 .
drwxr-xr-x 1 99 99 158 May 11  2021 ..
drwxr-xr-x 1 99 99 142 May 11  2021 91.0.4469.0
lrwxrwxrwx 1 99 99  14 May 11  2021 Current -> '91.0.4469.0'$'\324\374\177'

A few more examples can be seen in this rsync output from when I was copying from the HFS+ drive:

sending incremental file list
download -> /Volumes/Seagate/Downloads/
UserData/RunningChromeVersion -> 91.0.4469.0\#324\#374^?
UserData/SingletonCookie -> 14662535177158702104\#374^?
UserData/SingletonLock -> Sebastians-MacBook-Pro.local-13512w\#324\#374^?
UserData/SingletonSocket -> /var/folders/yg/9244vmfs33v7l8m1wm7glkp40000gn/T/.org.chromium.Chromium.xBO8KQ/SingletonSocket
node_modules/.bin/extract-zip -> ../extract-zip/cli.js^?
node_modules/.bin/rimraf -> ../rimraf/bin.jsli.js^?
node_modules/puppeteer/.local-chromium/mac-869685/chrome-mac/Chromium.app/Contents/Frameworks/Chromium Framework.framework/Chromium Framework -> Versions/Current/Chromium Framework\#324\#374^?
node_modules/puppeteer/.local-chromium/mac-869685/chrome-mac/Chromium.app/Contents/Frameworks/Chromium Framework.framework/Helpers -> Versions/Current/Helpersm Framework\#324\#374^?
node_modules/puppeteer/.local-chromium/mac-869685/chrome-mac/Chromium.app/Contents/Frameworks/Chromium Framework.framework/Internet Plug-Ins -> Versions/Current/Internet Plug-Insk\#324\#374^?
node_modules/puppeteer/.local-chromium/mac-869685/chrome-mac/Chromium.app/Contents/Frameworks/Chromium Framework.framework/Libraries -> Versions/Current/LibrariesPlug-Insk\#324\#374^?
node_modules/puppeteer/.local-chromium/mac-869685/chrome-mac/Chromium.app/Contents/Frameworks/Chromium Framework.framework/Resources -> Versions/Current/ResourcesPlug-Insk\#324\#374^?
node_modules/puppeteer/.local-chromium/mac-869685/chrome-mac/Chromium.app/Contents/Frameworks/Chromium Framework.framework/XPCServices -> Versions/Current/XPCServicesug-Insk\#324\#374^?
node_modules/puppeteer/.local-chromium/mac-869685/chrome-mac/Chromium.app/Contents/Frameworks/Chromium Framework.framework/Versions/Current -> 91.0.4469.0\#324\#374^?

Strangely, after remounting, the issue sometimes goes away when using ls -la to see what the symlinks point to, but re-running rsync shows that rsync is detecting differnces in what the symlinks point to:

sending incremental file list
UserData/RunningChromeVersion -> 91.0.4469.0!\#374^?
UserData/SingletonLock -> Sebastians-MacBook-Pro.local-13512\#340!\#374^?
node_modules/puppeteer/.local-chromium/mac-869685/chrome-mac/Chromium.app/Contents/Frameworks/Chromium Framework.framework/Chromium Framework -> Versions/Current/Chromium Framework!\#374^?
node_modules/puppeteer/.local-chromium/mac-869685/chrome-mac/Chromium.app/Contents/Frameworks/Chromium Framework.framework/Helpers -> Versions/Current/Helpersm Framework!\#374^?
node_modules/puppeteer/.local-chromium/mac-869685/chrome-mac/Chromium.app/Contents/Frameworks/Chromium Framework.framework/Internet Plug-Ins -> Versions/Current/Internet Plug-Insk!\#374^?
node_modules/puppeteer/.local-chromium/mac-869685/chrome-mac/Chromium.app/Contents/Frameworks/Chromium Framework.framework/Libraries -> Versions/Current/LibrariesPlug-Insk!\#374^?
node_modules/puppeteer/.local-chromium/mac-869685/chrome-mac/Chromium.app/Contents/Frameworks/Chromium Framework.framework/Resources -> Versions/Current/ResourcesPlug-Insk!\#374^?
node_modules/puppeteer/.local-chromium/mac-869685/chrome-mac/Chromium.app/Contents/Frameworks/Chromium Framework.framework/XPCServices -> Versions/Current/XPCServicesug-Insk!\#374^?
node_modules/puppeteer/.local-chromium/mac-869685/chrome-mac/Chromium.app/Contents/Frameworks/Chromium Framework.framework/Versions/Current -> 91.0.4469.0!\#374^?

This seems like it might be a reading out-of-bounds type of issue - maybe somewhere in the code it reads outside the string or doesn't put a null terminator early enough. Where could this problem be in the code - maybe where link resolution happens like in hfsfuse_readlink or hfsfuse_opendir?

@sbond75
Copy link
Author

sbond75 commented Apr 17, 2024

Also I am on the latest commit, 295e58a

@0x09
Copy link
Owner

0x09 commented Apr 18, 2024

Hi, thanks a lot for opening this. I pushed a fix to master just now at 529cb8b which resolves it. I'll publish a release with this shortly. Let me know if you try this out and run into any issues.

edit: release with these changes added at https://github.com/0x09/hfsfuse/releases/tag/0.214

@sbond75
Copy link
Author

sbond75 commented Apr 18, 2024

Nice, that fixed it. I have another slight issue which I think I will make a new issue for.

@sbond75 sbond75 closed this as completed Apr 18, 2024
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

2 participants