1
0
Fork 0
mirror of https://github.com/AquariaOSE/Aquaria.git synced 2025-01-26 02:07:26 +00:00

Disable tinyxml2's LoadFile() functions to catch ttvfs bypass for reading

This commit is contained in:
fgenesis 2014-06-09 23:40:29 +02:00
parent 065def0674
commit 9b44aed00a
2 changed files with 7 additions and 4 deletions

View file

@ -21,6 +21,9 @@ must not be misrepresented as being the original software.
distribution. distribution.
*/ */
// Disabled LoadFile() functions to catch misuse - Aquaria uses its own VFS, not FILE* -- fg
#include "tinyxml2.h" #include "tinyxml2.h"
#include <new> // yes, this one new style header, is in the Android SDK. #include <new> // yes, this one new style header, is in the Android SDK.
@ -1662,7 +1665,7 @@ XMLUnknown* XMLDocument::NewUnknown( const char* str )
return unk; return unk;
} }
/*
XMLError XMLDocument::LoadFile( const char* filename ) XMLError XMLDocument::LoadFile( const char* filename )
{ {
Clear(); Clear();
@ -1724,7 +1727,7 @@ XMLError XMLDocument::LoadFile( FILE* fp )
ParseDeep( _charBuffer + (p-_charBuffer), 0 ); ParseDeep( _charBuffer + (p-_charBuffer), 0 );
return _errorID; return _errorID;
} }
*/
XMLError XMLDocument::SaveFile( const char* filename, bool compact ) XMLError XMLDocument::SaveFile( const char* filename, bool compact )
{ {

View file

@ -1530,7 +1530,7 @@ public:
Returns XML_NO_ERROR (0) on success, or Returns XML_NO_ERROR (0) on success, or
an errorID. an errorID.
*/ */
XMLError LoadFile( const char* filename ); //XMLError LoadFile( const char* filename );
/** /**
Load an XML file from disk. You are responsible Load an XML file from disk. You are responsible
@ -1539,7 +1539,7 @@ public:
Returns XML_NO_ERROR (0) on success, or Returns XML_NO_ERROR (0) on success, or
an errorID. an errorID.
*/ */
XMLError LoadFile( FILE* ); //XMLError LoadFile( FILE* );
/** /**
Save the XML file to disk. Save the XML file to disk.