From 72485cd8987668a18586ea4e43001abc63880eee Mon Sep 17 00:00:00 2001 From: Lars Lehtonen Date: Fri, 22 Sep 2023 10:43:53 -0700 Subject: [PATCH] ct/client: fix dropped errors (#367) --- ct/client/logclient.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ct/client/logclient.go b/ct/client/logclient.go index 0b7ef016..fad32570 100644 --- a/ct/client/logclient.go +++ b/ct/client/logclient.go @@ -375,12 +375,18 @@ func (c *LogClient) GetEntries(start, end int64) ([]ct.LogEntry, error) { entries := make([]ct.LogEntry, len(resp.Entries)) for index, entry := range resp.Entries { leafBytes, err := base64.StdEncoding.DecodeString(entry.LeafInput) + if err != nil { + return nil, err + } leaf, err := ct.ReadMerkleTreeLeaf(bytes.NewBuffer(leafBytes)) if err != nil { return nil, err } entries[index].Leaf = *leaf chainBytes, err := base64.StdEncoding.DecodeString(entry.ExtraData) + if err != nil { + return nil, err + } var chain []ct.ASN1Cert switch leaf.TimestampedEntry.EntryType {