1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
moby--moby/daemon/logger/local
Kazuyoshi Kato 48d387a757 daemon/logger: read the length header correctly
Before this change, if Decode() couldn't read a log record fully,
the subsequent invocation of Decode() would read the record's non-header part
as a header and cause a huge heap allocation.

This change prevents such a case by having the intermediate buffer in
the decoder struct.

Fixes #42125.

Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
2021-12-15 15:13:02 -08:00
..
config.go Add new local log driver 2018-08-17 09:36:56 -07:00
doc.go Add new local log driver 2018-08-17 09:36:56 -07:00
local.go daemon/logger: normalize comment formatting 2019-11-27 15:42:27 +01:00
local_test.go refactor: move from io/ioutil to io and os package 2021-08-27 14:56:57 +08:00
read.go daemon/logger: read the length header correctly 2021-12-15 15:13:02 -08:00
read_test.go daemon/logger: read the length header correctly 2021-12-15 15:13:02 -08:00