Merge "DO NOT MERGE. Fix crash in vold" into klp-dev

This commit is contained in:
Jeff Sharkey 2013-10-17 16:12:38 +00:00 committed by Android (Google) Code Review
commit 18afaca1ad

View file

@ -1584,7 +1584,7 @@ int VolumeManager::mkdirs(char* path) {
// Require that path lives under a volume we manage
const char* emulated_source = getenv("EMULATED_STORAGE_SOURCE");
const char* root = NULL;
if (!strncmp(path, emulated_source, strlen(emulated_source))) {
if (emulated_source && !strncmp(path, emulated_source, strlen(emulated_source))) {
root = emulated_source;
} else {
Volume* vol = getVolumeForFile(path);