|
| 1 | +From 867d49d8c566b0f1284f8295ba1286d6c5e93edf Mon Sep 17 00:00:00 2001 |
| 2 | +From: kavyasree <kkaitepalli@microsoft.com> |
| 3 | +Date: Mon, 9 Dec 2024 17:03:26 +0530 |
| 4 | +Subject: [PATCH] Modified patch |
| 5 | + |
| 6 | +--- |
| 7 | + .../protobuf/encoding/protojson/well_known_types.go | 4 ++++ |
| 8 | + .../protobuf/internal/encoding/json/decode.go | 2 +- |
| 9 | + 2 files changed, 5 insertions(+), 1 deletion(-) |
| 10 | + |
| 11 | +diff --git a/vendor/google.golang.org/protobuf/encoding/protojson/well_known_types.go b/vendor/google.golang.org/protobuf/encoding/protojson/well_known_types.go |
| 12 | +index c85f846..634ba41 100644 |
| 13 | +--- a/vendor/google.golang.org/protobuf/encoding/protojson/well_known_types.go |
| 14 | ++++ b/vendor/google.golang.org/protobuf/encoding/protojson/well_known_types.go |
| 15 | +@@ -348,6 +348,10 @@ func (d decoder) skipJSONValue() error { |
| 16 | + } |
| 17 | + } |
| 18 | + } |
| 19 | ++ case json.EOF: |
| 20 | ++ // This can only happen if there's a bug in Decoder.Read. |
| 21 | ++ // Avoid an infinite loop if this does happen. |
| 22 | ++ return errors.New("unexpected EOF") |
| 23 | + } |
| 24 | + return nil |
| 25 | + } |
| 26 | +diff --git a/vendor/google.golang.org/protobuf/internal/encoding/json/decode.go b/vendor/google.golang.org/protobuf/internal/encoding/json/decode.go |
| 27 | +index b13fd29..b2be4e8 100644 |
| 28 | +--- a/vendor/google.golang.org/protobuf/internal/encoding/json/decode.go |
| 29 | ++++ b/vendor/google.golang.org/protobuf/internal/encoding/json/decode.go |
| 30 | +@@ -121,7 +121,7 @@ func (d *Decoder) Read() (Token, error) { |
| 31 | + |
| 32 | + case ObjectClose: |
| 33 | + if len(d.openStack) == 0 || |
| 34 | +- d.lastToken.kind == comma || |
| 35 | ++ d.lastToken.kind&(Name|comma) != 0 || |
| 36 | + d.openStack[len(d.openStack)-1] != ObjectOpen { |
| 37 | + return Token{}, d.newSyntaxError(tok.pos, unexpectedFmt, tok.RawString()) |
| 38 | + } |
| 39 | +-- |
| 40 | +2.34.1 |
| 41 | + |
0 commit comments