https://github.com/bill-auger/jucegetspeciallocationsegfault
see PR #1 for terse diff
https://github.com/bill-auger/jucegetspeciallocationsegfault
Last synced: 3 months ago
JSON representation
see PR #1 for terse diff
- Host: GitHub
- URL: https://github.com/bill-auger/jucegetspeciallocationsegfault
- Owner: bill-auger
- Created: 2016-04-23T09:10:26.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2016-04-25T15:51:55.000Z (about 9 years ago)
- Last Synced: 2025-01-13T22:46:39.139Z (4 months ago)
- Language: C++
- Homepage: https://github.com/bill-auger/JuceGetSpecialLocationSegfault/pull/1/files
- Size: 661 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
this segfault occurs when calling File::getSpecialLocation() statically
if the corresponding path in ~/.config/user-dirs.dirs ends with a slash char
which may be the case when user deletes a dir such as ~/Videos
or if the file is edited manuallythe underlying issue seems to be that the File::separatorString
raw data pointer is null when referenced statically such as getting getSpecialLocation()the segfault occurs when CharPointer_UTF8->getAndAdvance() dereferences the data pointer
when a path ending in a slash char (e.g. /home/me/)
is compared to File::separatorString in File::parseAbsolutePath()
which does not happen if the path does not end in a slashjuce_File.cpp line 164 -->
```
while (path.endsWithChar (separator) && path != separatorString)
```this test case injects a pathological string into juce_linux_Files.cpp::resolveXDGFolder()
and patches the defect in two different places for demonstration
both in File::parseAbsolutePath() and CharPointer_UTF8->getAndAdvance()