From bc743ca7ced997e75ee72b8f493f6ffb14879aad Mon Sep 17 00:00:00 2001 From: Perttu Ahola Date: Wed, 4 Jan 2012 00:37:46 +0200 Subject: Add missing checks to texture caching --- src/client.cpp | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'src/client.cpp') diff --git a/src/client.cpp b/src/client.cpp index aca38b166..38ed14978 100644 --- a/src/client.cpp +++ b/src/client.cpp @@ -1276,6 +1276,13 @@ void Client::ProcessData(u8 *data, u32 datasize, u16 sender_peer_id) //read texture from cache std::string name = deSerializeString(is); std::string sha1_texture = deSerializeString(is); + + // if name contains illegal characters, ignore the texture + if(!string_allowed(name, TEXTURENAME_ALLOWED_CHARS)){ + errorstream<<"Client: ignoring illegal texture name " + <<"sent by server: \""< data_rw(data.c_str(), data.size()); // Create an irrlicht memory file -- cgit v1.2.3