From 9541e78219f29b89b91aa282ee78b6ccc34c039e Mon Sep 17 00:00:00 2001 From: kervala Date: Wed, 4 Jan 2017 14:24:25 +0100 Subject: [PATCH] Changed: Exit if line is truncated --HG-- branch : develop --- code/nel/tools/3d/textures_tool/main.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/code/nel/tools/3d/textures_tool/main.cpp b/code/nel/tools/3d/textures_tool/main.cpp index 62a1c9ef3..592df935f 100644 --- a/code/nel/tools/3d/textures_tool/main.cpp +++ b/code/nel/tools/3d/textures_tool/main.cpp @@ -332,6 +332,12 @@ int main(int argc, char **argv) std::string line(buffer); + if (line.size() > 1022) + { + nlwarning("More than 1022 bytes on a line!"); + return 1; + } + if (line.size() < 3) continue; // texture coordinate