awnumar / memguard

Secure software enclave for storage of sensitive information in memory.
Apache License 2.0
2.5k stars 123 forks source link

CopyAt: fix panic on copy #21

Closed awnumar closed 6 years ago

awnumar commented 6 years ago

Recreatable with the following script.

package main

import (
    "fmt"

    "github.com/awnumar/memguard"
)

func main() {
    key, _ := memguard.New(52, false)
    key.CopyAt(make([]byte, 10), 32)
    fmt.Println(key.Buffer)
}