Merge pull request #1001 from thomasvl/fix_last_objc_conformance_tests

Set the stream limit to the length of the data.
This commit is contained in:
Thomas Van Lenten 2015-11-23 14:08:11 -05:00
commit bc6a85dbac
2 changed files with 2 additions and 7 deletions

View file

@ -1,2 +1 @@
ProtobufInput.PrematureEofInDelimitedDataForKnownNonRepeatedValue.MESSAGE
ProtobufInput.PrematureEofInDelimitedDataForKnownRepeatedValue.MESSAGE
# No tests currently failing.

View file

@ -264,10 +264,6 @@ void GPBCodedInputStreamPopLimit(GPBCodedInputStreamState *state,
}
size_t GPBCodedInputStreamBytesUntilLimit(GPBCodedInputStreamState *state) {
if (state->currentLimit == SIZE_T_MAX) {
return state->currentLimit;
}
return state->currentLimit - state->bufferPos;
}
@ -299,7 +295,7 @@ void GPBCodedInputStreamCheckLastTagWas(GPBCodedInputStreamState *state,
buffer_ = [data retain];
state_.bytes = (const uint8_t *)[data bytes];
state_.bufferSize = [data length];
state_.currentLimit = NSUIntegerMax;
state_.currentLimit = state_.bufferSize;
}
return self;
}