fix some buffer overflows (closes #10500)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@59105 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2009-02-23 11:51:34 +00:00
parent b5d6d28172
commit 3860d4fa2b

View File

@@ -3044,17 +3044,17 @@ bool HTMLGo(void)
wxChar buf[300];
if (truncateFilenames)
wxSnprintf(buf, sizeof(buf), _T("%s.htm"), FileRoot);
wxSnprintf(buf, WXSIZEOF(buf), _T("%s.htm"), FileRoot);
else
wxSnprintf(buf, sizeof(buf), _T("%s_contents.html"), FileRoot);
wxSnprintf(buf, WXSIZEOF(buf), _T("%s_contents.html"), FileRoot);
if (TitlepageName) delete[] TitlepageName;
TitlepageName = copystring(buf);
Titlepage = wxFopen(buf, _T("w"));
if (truncateFilenames)
wxSnprintf(buf, sizeof(buf), _T("%s_fc.htm"), FileRoot);
wxSnprintf(buf, WXSIZEOF(buf), _T("%s_fc.htm"), FileRoot);
else
wxSnprintf(buf, sizeof(buf), _T("%s_fcontents.html"), FileRoot);
wxSnprintf(buf, WXSIZEOF(buf), _T("%s_fcontents.html"), FileRoot);
contentsFrameName = copystring(buf);