Skip to content

Commit 72485cd

Browse files
authored
ct/client: fix dropped errors (#367)
1 parent 3b5d618 commit 72485cd

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

ct/client/logclient.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -375,12 +375,18 @@ func (c *LogClient) GetEntries(start, end int64) ([]ct.LogEntry, error) {
375375
entries := make([]ct.LogEntry, len(resp.Entries))
376376
for index, entry := range resp.Entries {
377377
leafBytes, err := base64.StdEncoding.DecodeString(entry.LeafInput)
378+
if err != nil {
379+
return nil, err
380+
}
378381
leaf, err := ct.ReadMerkleTreeLeaf(bytes.NewBuffer(leafBytes))
379382
if err != nil {
380383
return nil, err
381384
}
382385
entries[index].Leaf = *leaf
383386
chainBytes, err := base64.StdEncoding.DecodeString(entry.ExtraData)
387+
if err != nil {
388+
return nil, err
389+
}
384390

385391
var chain []ct.ASN1Cert
386392
switch leaf.TimestampedEntry.EntryType {

0 commit comments

Comments
 (0)