When "getNextBlock" was called after "getNextLine", the pointer could still on the newline.
The pointer to a newline could not advance enough, when the line ended with \r\n. The resulting buffer was correct, as the buffer range went from <start> until \r, but that the pointer increased by just 1 could lead to the problem that the next pointer points at \n, which is still part of the newline and therefore, "getNextBlock" got 1 byte too much. Refs Issue #4871
This commit is contained in:
@@ -420,7 +420,7 @@ bool PLY::DOM::ParseHeader(IOStreamBuffer<char> &streamBuffer, std::vector<char>
|
||||
if (PLY::Element::ParseElement(streamBuffer, buffer, &out)) {
|
||||
// add the element to the list of elements
|
||||
alElements.push_back(out);
|
||||
} else if (TokenMatch(buffer, "end_header", 10)) { //checks for /n ending, if it doesn't end with /r/n
|
||||
} else if (TokenMatch(buffer, "end_header", 10)) {
|
||||
// we have reached the end of the header
|
||||
break;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user