Skip to content
Snippets Groups Projects
Commit bb91e3d4 authored by Mathieu Westphal (Kitware)'s avatar Mathieu Westphal (Kitware) :zap:
Browse files

Fix a potential segfault while parsing OBJ

parent cd274431
No related branches found
No related tags found
No related merge requests found
......@@ -232,7 +232,7 @@ bool tokenGetTexture(size_t& t, std::vector<Token>& tokens, vtkOBJImportedMateri
// with spaces in them
current_mtl->texture_filename += tokens[tt].StringValue;
++tt;
while (tokens[tt].Type != Token::LineEnd)
while (tt < tokens.size() && tokens[tt].Type != Token::LineEnd)
{
current_mtl->texture_filename += tokens[tt].StringValue;
++tt;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment