Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Make sure that edge records have the correct number of fields

  • Loading branch information...
commit 32310ecde4a640e965c94800b78dad94859fe885 1 parent ffe7e37
Jared Simpson authored
Showing with 7 additions and 0 deletions.
  1. +7 −0 src/SQG/ASQG.cpp
7 src/SQG/ASQG.cpp
View
@@ -266,6 +266,13 @@ void EdgeRecord::parse(const std::string& record)
// Tokenize record
StringVector tokens = SQG::tokenizeRecord(record);
+ if(tokens.size() < 2)
+ {
+ std::cerr << "Error: Edge record is incomplete.\n";
+ std::cerr << "Record: " << record << std::endl;
+ exit(EXIT_FAILURE);
+ }
+
// Ensure the first token indicates this is a valid edge record
if(tokens[0].compare(EDGE_TAG) != 0)
{
Please sign in to comment.
Something went wrong with that request. Please try again.