moby--moby/daemon/logger/local
Kazuyoshi Kato ada1b01de1
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>
(cherry picked from commit 48d387a757)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-01-20 09:38:32 +01: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 Reduce allocations for logfile reader 2020-04-08 12:24:31 -07:00
read.go daemon/logger: read the length header correctly 2022-01-20 09:38:32 +01:00
read_test.go daemon/logger: read the length header correctly 2022-01-20 09:38:32 +01:00