use wxStrnlen() and add NULL-checks in wxMsgCatalogFile::FillHash for safer handling of corrupted MO files (closes #3151)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58106 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Francesco Montorsi
2009-01-14 19:26:14 +00:00
parent 16d4ffde1e
commit f00204d341
2 changed files with 25 additions and 8 deletions

View File

@@ -234,7 +234,8 @@ bool MyApp::OnInit()
wxLocale::AddCatalogLookupPathPrefix(wxT("."));
// Initialize the catalogs we'll be using
m_locale.AddCatalog(wxT("internat"));
if (!m_locale.AddCatalog(wxT("internat")))
wxLogError(_("Couldn't find/load the 'internat' catalog."));
// this catalog is installed in standard location on Linux systems and
// shows that you may make use of the standard message catalogs as well