Skip to content

Commit 873a9de

Browse files
committed
Fix #126
1 parent db9f825 commit 873a9de

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

protobuf/src/main/java/com/fasterxml/jackson/dataformat/protobuf/ProtobufParser.java

+5-3
Original file line numberDiff line numberDiff line change
@@ -960,10 +960,12 @@ private JsonToken _skipUnknownField(int tag, int wireType) throws IOException
960960
}
961961
while (true) {
962962
_skipUnknownValue(wireType);
963+
// 05-Dec-2017, tatu: as per [#126] seems like we need to check this not just for
964+
// STATE_NESTED_KEY but for arrays too at least?
965+
if (_checkEnd()) {
966+
return (_currToken = JsonToken.END_OBJECT);
967+
}
963968
if (_state == STATE_NESTED_KEY) {
964-
if (_checkEnd()) {
965-
return (_currToken = JsonToken.END_OBJECT);
966-
}
967969
if (_inputPtr >= _inputEnd) {
968970
loadMoreGuaranteed();
969971
}

release-notes/CREDITS

+2
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,5 @@ marsqing@github
2929
(2.8.10)
3030
* Reported #106, contributed fix for: calling _skipUnknownValue() twice
3131
(2.8.11 / 2.9.1)
32+
* Reported #126, contributed fix for: always call checkEnd() when skip unknown field
33+
(2.8.11 / 2.9.3)

release-notes/VERSION

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ Modules:
1818
#106: (protobuf) fix calling _skipUnknownValue() twice
1919
(reported, contributed fix for by marsqing@github@github)
2020
#108: (protobuf) fix NPE in skip unknown nested key
21+
#126: (protobuf) always call checkEnd() when skip unknown field
2122

2223
2.8.10 (24-Aug-2017)
2324

0 commit comments

Comments
 (0)