<feed xmlns='http://www.w3.org/2005/Atom'>
<title>go/src/encoding/gob/decoder.go, branch makepkg</title>
<subtitle>Fork of Go programming language with my patches.</subtitle>
<id>http://git.kilabit.info/go/atom?h=makepkg</id>
<link rel='self' href='http://git.kilabit.info/go/atom?h=makepkg'/>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/'/>
<updated>2025-02-03T18:30:40Z</updated>
<entry>
<title>all: replace reflect.Value.Type.Kind with reflect.Value.Kind</title>
<updated>2025-02-03T18:30:40Z</updated>
<author>
<name>Sean Liao</name>
<email>sean@liao.dev</email>
</author>
<published>2024-12-01T20:06:26Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=439d39a719da12c213aeb69a09c5aaef83d9df67'/>
<id>urn:sha1:439d39a719da12c213aeb69a09c5aaef83d9df67</id>
<content type='text'>
Fixes #46107

Change-Id: I170f3cacda652752cd740e04b565a616a0e43fd1
Reviewed-on: https://go-review.googlesource.com/c/go/+/632635
Reviewed-by: Rob Pike &lt;r@golang.org&gt;
Reviewed-by: Cherry Mui &lt;cherryyz@google.com&gt;
Commit-Queue: Ian Lance Taylor &lt;iant@google.com&gt;
LUCI-TryBot-Result: Go LUCI &lt;golang-scoped@luci-project-accounts.iam.gserviceaccount.com&gt;
Reviewed-by: Ian Lance Taylor &lt;iant@google.com&gt;
Auto-Submit: Ian Lance Taylor &lt;iant@google.com&gt;
</content>
</entry>
<entry>
<title>encoding/gob: cover missed cases when checking ignore depth</title>
<updated>2024-09-05T16:42:09Z</updated>
<author>
<name>Roland Shoemaker</name>
<email>bracewell@google.com</email>
</author>
<published>2024-05-03T13:21:39Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=08c84420bc40d1cd5eb71b85cbe3a36f707bdb3f'/>
<id>urn:sha1:08c84420bc40d1cd5eb71b85cbe3a36f707bdb3f</id>
<content type='text'>
This change makes sure that we are properly checking the ignored field
recursion depth in decIgnoreOpFor consistently. This prevents stack
exhaustion when attempting to decode a message that contains an
extremely deeply nested struct which is ignored.

Thanks to Md Sakib Anwar of The Ohio State University (anwar.40@osu.edu)
for reporting this issue.

Fixes #69139
Fixes CVE-2024-34156

Change-Id: Iacce06be95a5892b3064f1c40fcba2e2567862d6
Reviewed-on: https://go-internal-review.googlesource.com/c/go/+/1440
Reviewed-by: Russ Cox &lt;rsc@google.com&gt;
Reviewed-by: Damien Neil &lt;dneil@google.com&gt;
Reviewed-on: https://go-review.googlesource.com/c/go/+/611239
LUCI-TryBot-Result: Go LUCI &lt;golang-scoped@luci-project-accounts.iam.gserviceaccount.com&gt;
Reviewed-by: Dmitri Shuralyov &lt;dmitshur@google.com&gt;
Reviewed-by: Roland Shoemaker &lt;roland@golang.org&gt;
Auto-Submit: Dmitri Shuralyov &lt;dmitshur@golang.org&gt;
</content>
</entry>
<entry>
<title>encoding: modernize Go documentation</title>
<updated>2023-09-08T19:04:28Z</updated>
<author>
<name>Joe Tsai</name>
<email>joetsai@digital-static.net</email>
</author>
<published>2023-09-01T08:54:25Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=dac9b9ddbd5160c5f4552410f5f8281bd5eed38c'/>
<id>urn:sha1:dac9b9ddbd5160c5f4552410f5f8281bd5eed38c</id>
<content type='text'>
Across all encoding packages, linkify declarations if possible.
In some cases, we convert a code block into a bulleted list,
which then further allows for more linkification.

Change-Id: I68fedf362615b34228bab5d4859b7d87d831c570
Reviewed-on: https://go-review.googlesource.com/c/go/+/524977
LUCI-TryBot-Result: Go LUCI &lt;golang-scoped@luci-project-accounts.iam.gserviceaccount.com&gt;
Reviewed-by: Daniel Martí &lt;mvdan@mvdan.cc&gt;
Reviewed-by: Ian Lance Taylor &lt;iant@google.com&gt;
Reviewed-by: qiulaidongfeng &lt;2645477756@qq.com&gt;
Reviewed-by: Matthew Dempsky &lt;mdempsky@google.com&gt;
</content>
</entry>
<entry>
<title>encoding/gob: use saferio to read large buffer</title>
<updated>2022-08-19T16:03:42Z</updated>
<author>
<name>Ian Lance Taylor</name>
<email>iant@golang.org</email>
</author>
<published>2022-06-25T00:00:24Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=dee9adc0f73d361d00a4d9230bb3517f2448b3b0'/>
<id>urn:sha1:dee9adc0f73d361d00a4d9230bb3517f2448b3b0</id>
<content type='text'>
Avoid allocating large amounts of memory for corrupt input.

No test case because the problem can only happen for invalid data.
Let the fuzzer find cases like this.

Fixes #53369

Change-Id: I67c5e75bf181ad84988d6d6da12507df0e6df8e8
Reviewed-on: https://go-review.googlesource.com/c/go/+/413979
Reviewed-by: Joseph Tsai &lt;joetsai@digital-static.net&gt;
Run-TryBot: Ian Lance Taylor &lt;iant@google.com&gt;
Auto-Submit: Ian Lance Taylor &lt;iant@google.com&gt;
Reviewed-by: Ian Lance Taylor &lt;iant@google.com&gt;
Reviewed-by: Joedian Reid &lt;joedian@golang.org&gt;
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
</content>
</entry>
<entry>
<title>all: gofmt main repo</title>
<updated>2022-04-11T16:34:30Z</updated>
<author>
<name>Russ Cox</name>
<email>rsc@golang.org</email>
</author>
<published>2022-02-03T19:12:08Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=19309779ac5e2f5a2fd3cbb34421dafb2855ac21'/>
<id>urn:sha1:19309779ac5e2f5a2fd3cbb34421dafb2855ac21</id>
<content type='text'>
[This CL is part of a sequence implementing the proposal #51082.
The design doc is at https://go.dev/s/godocfmt-design.]

Run the updated gofmt, which reformats doc comments,
on the main repository. Vendored files are excluded.

For #51082.

Change-Id: I7332f099b60f716295fb34719c98c04eb1a85407
Reviewed-on: https://go-review.googlesource.com/c/go/+/384268
Reviewed-by: Jonathan Amsterdam &lt;jba@google.com&gt;
Reviewed-by: Ian Lance Taylor &lt;iant@golang.org&gt;
</content>
</entry>
<entry>
<title>all: gofmt -w -r 'interface{} -&gt; any' src</title>
<updated>2021-12-13T18:45:54Z</updated>
<author>
<name>Russ Cox</name>
<email>rsc@golang.org</email>
</author>
<published>2021-12-01T17:15:45Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=2580d0e08d5e9f979b943758d3c49877fb2324cb'/>
<id>urn:sha1:2580d0e08d5e9f979b943758d3c49877fb2324cb</id>
<content type='text'>
And then revert the bootstrap cmd directories and certain testdata.
And adjust tests as needed.

Not reverting the changes in std that are bootstrapped,
because some of those changes would appear in API docs,
and we want to use any consistently.
Instead, rewrite 'any' to 'interface{}' in cmd/dist for those directories
when preparing the bootstrap copy.

A few files changed as a result of running gofmt -w
not because of interface{} -&gt; any but because they
hadn't been updated for the new //go:build lines.

Fixes #49884.

Change-Id: Ie8045cba995f65bd79c694ec77a1b3d1fe01bb09
Reviewed-on: https://go-review.googlesource.com/c/go/+/368254
Trust: Russ Cox &lt;rsc@golang.org&gt;
Run-TryBot: Russ Cox &lt;rsc@golang.org&gt;
Reviewed-by: Robert Griesemer &lt;gri@golang.org&gt;
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
</content>
</entry>
<entry>
<title>all: use reflect.{Pointer,PointerTo}</title>
<updated>2021-10-26T14:24:17Z</updated>
<author>
<name>Cuong Manh Le</name>
<email>cuong.manhle.vn@gmail.com</email>
</author>
<published>2021-10-25T16:00:56Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=283d8a3d53ac1c7e1d7e297497480bf0071b6300'/>
<id>urn:sha1:283d8a3d53ac1c7e1d7e297497480bf0071b6300</id>
<content type='text'>
Updates #47651
Updates #48665

Change-Id: I69a87b45a5cad7a07fbd855040cd9935cf874554
Reviewed-on: https://go-review.googlesource.com/c/go/+/358454
Trust: Cuong Manh Le &lt;cuong.manhle.vn@gmail.com&gt;
Run-TryBot: Cuong Manh Le &lt;cuong.manhle.vn@gmail.com&gt;
TryBot-Result: Go Bot &lt;gobot@golang.org&gt;
Reviewed-by: Brad Fitzpatrick &lt;bradfitz@golang.org&gt;
</content>
</entry>
<entry>
<title>encoding/gob: follow documented io.EOF semantics</title>
<updated>2021-10-11T21:58:33Z</updated>
<author>
<name>Daniel Martí</name>
<email>mvdan@mvdan.cc</email>
</author>
<published>2021-10-11T10:12:38Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=d973bb107e9142cf17e4a7f2666a71ed2d457e91'/>
<id>urn:sha1:d973bb107e9142cf17e4a7f2666a71ed2d457e91</id>
<content type='text'>
The docs say:

	If the input is at EOF, Decode returns io.EOF and does not modify e.

However, the added test fails:

	--- FAIL: TestDecodePartial (0.00s)
		encoder_test.go:1263: 31/81: expected io.ErrUnexpectedEOF: EOF
		encoder_test.go:1263: 51/81: expected io.ErrUnexpectedEOF: EOF

In particular, the decoder would return io.EOF after reading a valid
message for a type specification, and then hit EOF before reading a data
item message.

Fix that by only allowing a Decode call to return io.EOF if the reader
hits EOF immediately, without successfully reading any message.
Otherwise, hitting EOF is an ErrUnexpectedEOF, like in other cases.

Also fix a net/rpc test that, coincidentally, expected an io.EOF
as an error when feeding bad non-zero data to a gob decoder.
An io.ErrUnexpectedEOF is clearly better in that scenario.

Fixes #48905.

Change-Id: Ied6a0d8ac8377f89646319a18c0380c4f2b09b85
Reviewed-on: https://go-review.googlesource.com/c/go/+/354972
Trust: Daniel Martí &lt;mvdan@mvdan.cc&gt;
Run-TryBot: Daniel Martí &lt;mvdan@mvdan.cc&gt;
TryBot-Result: Go Bot &lt;gobot@golang.org&gt;
Reviewed-by: Rob Pike &lt;r@golang.org&gt;
</content>
</entry>
<entry>
<title>all: remove redundant spaces before . and ,</title>
<updated>2021-04-20T00:49:17Z</updated>
<author>
<name>Yury Smolsky</name>
<email>yury@smolsky.by</email>
</author>
<published>2021-04-17T09:12:28Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=4f5aec46039347c7abc02a10103f35f936f39c2b'/>
<id>urn:sha1:4f5aec46039347c7abc02a10103f35f936f39c2b</id>
<content type='text'>
Change-Id: I6a4bd2544276d0638bddf07ebcf2ee636db30fea
Reviewed-on: https://go-review.googlesource.com/c/go/+/311009
Run-TryBot: Yury Smolsky &lt;yury@smolsky.by&gt;
TryBot-Result: Go Bot &lt;gobot@golang.org&gt;
Reviewed-by: Ian Lance Taylor &lt;iant@golang.org&gt;
Trust: Emmanuel Odeke &lt;emmanuel@orijtech.com&gt;
</content>
</entry>
<entry>
<title>encoding/gob: ensure "duplicate type received" decoder errors surface up</title>
<updated>2021-03-13T11:52:17Z</updated>
<author>
<name>Aman Karmani</name>
<email>aman@tmm1.net</email>
</author>
<published>2021-03-02T19:52:34Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=b3235b75d109f06eec0d3603c606b2d8373b9d4c'/>
<id>urn:sha1:b3235b75d109f06eec0d3603c606b2d8373b9d4c</id>
<content type='text'>
Previously re-using a decoder with a new stream resulted in a confusing
"extra data in buffer" error message.

Change-Id: Ia4c4c3a2d4b63c59e37e53faa61a500d5ff6e5f1
Reviewed-on: https://go-review.googlesource.com/c/go/+/297949
Reviewed-by: Rob Pike &lt;r@golang.org&gt;
Run-TryBot: Rob Pike &lt;r@golang.org&gt;
TryBot-Result: Go Bot &lt;gobot@golang.org&gt;
Trust: Emmanuel Odeke &lt;emmanuel@orijtech.com&gt;
</content>
</entry>
</feed>
