From 9b44aed00a199640f8de7f9368d1ee69f1495be2 Mon Sep 17 00:00:00 2001 From: fgenesis Date: Mon, 9 Jun 2014 23:40:29 +0200 Subject: [PATCH] Disable tinyxml2's LoadFile() functions to catch ttvfs bypass for reading --- ExternalLibs/tinyxml2.cpp | 7 +++++-- ExternalLibs/tinyxml2.h | 4 ++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/ExternalLibs/tinyxml2.cpp b/ExternalLibs/tinyxml2.cpp index f54a1d5..bb5b981 100644 --- a/ExternalLibs/tinyxml2.cpp +++ b/ExternalLibs/tinyxml2.cpp @@ -21,6 +21,9 @@ must not be misrepresented as being the original software. distribution. */ +// Disabled LoadFile() functions to catch misuse - Aquaria uses its own VFS, not FILE* -- fg + + #include "tinyxml2.h" #include // yes, this one new style header, is in the Android SDK. @@ -1662,7 +1665,7 @@ XMLUnknown* XMLDocument::NewUnknown( const char* str ) return unk; } - +/* XMLError XMLDocument::LoadFile( const char* filename ) { Clear(); @@ -1724,7 +1727,7 @@ XMLError XMLDocument::LoadFile( FILE* fp ) ParseDeep( _charBuffer + (p-_charBuffer), 0 ); return _errorID; } - +*/ XMLError XMLDocument::SaveFile( const char* filename, bool compact ) { diff --git a/ExternalLibs/tinyxml2.h b/ExternalLibs/tinyxml2.h index 0a9ae1c..9043e26 100644 --- a/ExternalLibs/tinyxml2.h +++ b/ExternalLibs/tinyxml2.h @@ -1530,7 +1530,7 @@ public: Returns XML_NO_ERROR (0) on success, or an errorID. */ - XMLError LoadFile( const char* filename ); + //XMLError LoadFile( const char* filename ); /** Load an XML file from disk. You are responsible @@ -1539,7 +1539,7 @@ public: Returns XML_NO_ERROR (0) on success, or an errorID. */ - XMLError LoadFile( FILE* ); + //XMLError LoadFile( FILE* ); /** Save the XML file to disk.