diff options
author | Thomas Van Lenten <thomasvl@google.com> | 2015-11-23 14:08:11 -0500 |
---|---|---|
committer | Thomas Van Lenten <thomasvl@google.com> | 2015-11-23 14:08:11 -0500 |
commit | bc6a85dbac699a9dc72491959787385397073d5b (patch) | |
tree | 08bfcfb7687cfe4fa903ce884f5d184fe0b1451e | |
parent | 4e3388168df413133e0e97791cc131f8131f478c (diff) | |
parent | ba800e2e57baf6ed9525dba1c48d21c1a79fafb5 (diff) | |
download | protobuf-bc6a85dbac699a9dc72491959787385397073d5b.tar.gz protobuf-bc6a85dbac699a9dc72491959787385397073d5b.tar.bz2 protobuf-bc6a85dbac699a9dc72491959787385397073d5b.zip |
Merge pull request #1001 from thomasvl/fix_last_objc_conformance_tests
Set the stream limit to the length of the data.
-rw-r--r-- | conformance/failure_list_objc.txt | 3 | ||||
-rw-r--r-- | objectivec/GPBCodedInputStream.m | 6 |
2 files changed, 2 insertions, 7 deletions
diff --git a/conformance/failure_list_objc.txt b/conformance/failure_list_objc.txt index a34b3f5b..f53230ca 100644 --- a/conformance/failure_list_objc.txt +++ b/conformance/failure_list_objc.txt @@ -1,2 +1 @@ -ProtobufInput.PrematureEofInDelimitedDataForKnownNonRepeatedValue.MESSAGE -ProtobufInput.PrematureEofInDelimitedDataForKnownRepeatedValue.MESSAGE +# No tests currently failing. diff --git a/objectivec/GPBCodedInputStream.m b/objectivec/GPBCodedInputStream.m index 71758baa..9371228a 100644 --- a/objectivec/GPBCodedInputStream.m +++ b/objectivec/GPBCodedInputStream.m @@ -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; } |