mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-20 07:24:41 +02:00
More CodeQL fixes
This commit is contained in:
@@ -131,8 +131,8 @@ func Encrypt_cmd(cmd *utils.RemoteControlCmd, password string, other_pubkey []by
|
||||
}
|
||||
|
||||
func Encrypt_data(data []byte, other_pubkey []byte, encryption_protocol string) (ans []byte, err error) {
|
||||
d := make([]byte, 0, len(data)+32)
|
||||
d = append(d, []byte(fmt.Sprintf("%s:", strconv.FormatInt(time.Now().UnixNano(), 10)))...)
|
||||
d := make([]byte, 0, uint64(len(data))+32)
|
||||
d = fmt.Appendf(d, "%s:", strconv.FormatInt(time.Now().UnixNano(), 10))
|
||||
d = append(d, data...)
|
||||
iv, tag, ciphertext, pubkey, err := encrypt(d, other_pubkey, encryption_protocol)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user