#1 Fix handling of spaces in ADM_mkdir which lead to crashes

open
nobody
None
5
2012-10-04
2011-05-17
Nathaniel Dose
No

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.

Discussion

  • Nathaniel Dose
    Nathaniel Dose
    2011-05-17

    ADM_fileio.cpp: Add quotes around directories sent to mkdir command

     
    Attachments