Skip to content

Commit

Permalink
Fix forcetypeassert checks #2
Browse files Browse the repository at this point in the history
  • Loading branch information
aankur committed Oct 2, 2024
1 parent cbe05b3 commit 3c1c74d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion crypto.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@ func xorBytesCTR(block cipher.Block, iv []byte, dst, src []byte) error {

xorBuf := xorBufferPool.Get()
defer xorBufferPool.Put(xorBuf)
buffer := xorBuf.([]byte)
buffer, ok := xorBuf.([]byte)
if !ok {
return errFailedTypeAssertion

Check warning on line 40 in crypto.go

View check run for this annotation

Codecov / codecov/patch

crypto.go#L40

Added line #L40 was not covered by tests
}

ctr := buffer[:len(iv)]
copy(ctr, iv)
Expand Down

0 comments on commit 3c1c74d

Please sign in to comment.