Bug 1653659 - Part 3: Only allow non-empty paths in RLBoxHunspell r=tjr

Differential Revision: https://phabricator.services.mozilla.com/D114925
This commit is contained in:
Deian Stefan 2021-05-17 18:19:27 +00:00
parent 9e0841b081
commit 351efdd226

View File

@ -52,8 +52,12 @@ RLBoxHunspell::RLBoxHunspell(const nsAutoCString& affpath,
#endif
// Add the aff and dict files to allow list
mozHunspellCallbacks::AllowFile(affpath);
mozHunspellCallbacks::AllowFile(dpath);
if (!affpath.IsEmpty()) {
mozHunspellCallbacks::AllowFile(affpath);
}
if (!dpath.IsEmpty()) {
mozHunspellCallbacks::AllowFile(dpath);
}
// Register callbacks
mCreateFilemgr =