Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -211,9 +211,13 @@ private static Geometry readPoints(GeometryFactory geomFactory, List<Integer> ge

// Guard: header data unsupported by geometry command buffer
// (require header and at least 1 value * 2 params)
if(cmdLength * GeomCmd.MoveTo.getParamCount() + 1 > geomCmds.size()) {
int requiredgeomCmdsLength = cmdLength * GeomCmd.MoveTo.getParamCount() + 1;
if(requiredgeomCmdsLength > geomCmds.size()) {
return null;
}
if (requiredgeomCmdsLength < geomCmds.size()) {
geomCmds = geomCmds.subList(0, requiredgeomCmdsLength); // ignore extra commands... should it return null instead?
}

final CoordinateSequence coordSeq = geomFactory.getCoordinateSequenceFactory().create(cmdLength, 2);
int coordIndex = 0;
Expand Down