Fix handling of spaces in ADM_mkdir which lead to crashes
A free video editor to cut, filter, and encode projects
Status: Beta
Brought to you by:
mean
I had an issue with avidemux2 crashing immediately on startup in OS X (due to KERN_INVALID_ADDRESS in strlen).
Investigation showed that the problem occurred while trying to create the .avidemux prefs folder in the user's HOME directory.
The user's HOME had a space in it - ADM_mkdir() then tried to create a new dir in the protected /Users directory (e.g. mkdir /Users/With Space) which got denied.
The code upstack (presumably ADM_getBaseDir) proceeds to return NULL, which probably leads to strlen(NULL) and the above-mentioned KERN_INVALID_ADDRESS at some point.
ADM_fileio.cpp: Add quotes around directories sent to mkdir command