summaryrefslogtreecommitdiff
path: root/vendor/github.com/gogo/protobuf/proto/encode.go
diff options
context:
space:
mode:
authorValentin Rothberg <rothberg@redhat.com>2020-04-07 12:09:48 +0200
committerValentin Rothberg <rothberg@redhat.com>2020-04-07 12:09:48 +0200
commit42fcdbf1a85c8e23ccc25a0e7e66b3a51b8f11dd (patch)
tree3344313b57b160a877044f56eec3d8e3c1c1669c /vendor/github.com/gogo/protobuf/proto/encode.go
parent64b6a197339e0436168e254ef9caf674ee9ff932 (diff)
downloadpodman-42fcdbf1a85c8e23ccc25a0e7e66b3a51b8f11dd.tar.gz
podman-42fcdbf1a85c8e23ccc25a0e7e66b3a51b8f11dd.tar.bz2
podman-42fcdbf1a85c8e23ccc25a0e7e66b3a51b8f11dd.zip
vendor c/image v5.4.2
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
Diffstat (limited to 'vendor/github.com/gogo/protobuf/proto/encode.go')
-rw-r--r--vendor/github.com/gogo/protobuf/proto/encode.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/vendor/github.com/gogo/protobuf/proto/encode.go b/vendor/github.com/gogo/protobuf/proto/encode.go
index 3abfed2cf..9581ccd30 100644
--- a/vendor/github.com/gogo/protobuf/proto/encode.go
+++ b/vendor/github.com/gogo/protobuf/proto/encode.go
@@ -189,6 +189,8 @@ type Marshaler interface {
// prefixed by a varint-encoded length.
func (p *Buffer) EncodeMessage(pb Message) error {
siz := Size(pb)
+ sizVar := SizeVarint(uint64(siz))
+ p.grow(siz + sizVar)
p.EncodeVarint(uint64(siz))
return p.Marshal(pb)
}