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:
@@ -3044,17 +3044,17 @@ bool HTMLGo(void)
|
|||||||
|
|
||||||
wxChar buf[300];
|
wxChar buf[300];
|
||||||
if (truncateFilenames)
|
if (truncateFilenames)
|
||||||
wxSnprintf(buf, sizeof(buf), _T("%s.htm"), FileRoot);
|
wxSnprintf(buf, WXSIZEOF(buf), _T("%s.htm"), FileRoot);
|
||||||
else
|
else
|
||||||
wxSnprintf(buf, sizeof(buf), _T("%s_contents.html"), FileRoot);
|
wxSnprintf(buf, WXSIZEOF(buf), _T("%s_contents.html"), FileRoot);
|
||||||
if (TitlepageName) delete[] TitlepageName;
|
if (TitlepageName) delete[] TitlepageName;
|
||||||
TitlepageName = copystring(buf);
|
TitlepageName = copystring(buf);
|
||||||
Titlepage = wxFopen(buf, _T("w"));
|
Titlepage = wxFopen(buf, _T("w"));
|
||||||
|
|
||||||
if (truncateFilenames)
|
if (truncateFilenames)
|
||||||
wxSnprintf(buf, sizeof(buf), _T("%s_fc.htm"), FileRoot);
|
wxSnprintf(buf, WXSIZEOF(buf), _T("%s_fc.htm"), FileRoot);
|
||||||
else
|
else
|
||||||
wxSnprintf(buf, sizeof(buf), _T("%s_fcontents.html"), FileRoot);
|
wxSnprintf(buf, WXSIZEOF(buf), _T("%s_fcontents.html"), FileRoot);
|
||||||
|
|
||||||
contentsFrameName = copystring(buf);
|
contentsFrameName = copystring(buf);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user