Skip to content

Commit

Permalink
Fix invalid log in createCipher
Browse files Browse the repository at this point in the history
Expected/actual were flipped leading to incorrect error message
  • Loading branch information
zcc0077 authored and JoeTurki committed Jan 19, 2025
1 parent ee975a6 commit 05b6f4f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion context.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ func (c *Context) createCipher(mki, masterKey, masterSalt []byte, encryptSRTP, e
}

if masterKeyLen := len(masterKey); masterKeyLen != keyLen {
return nil, fmt.Errorf("%w expected(%d) actual(%d)", errShortSrtpMasterKey, masterKey, keyLen)
return nil, fmt.Errorf("%w expected(%d) actual(%d)", errShortSrtpMasterKey, keyLen, masterKey)
} else if masterSaltLen := len(masterSalt); masterSaltLen != saltLen {
return nil, fmt.Errorf("%w expected(%d) actual(%d)", errShortSrtpMasterSalt, saltLen, masterSaltLen)
}
Expand Down

0 comments on commit 05b6f4f

Please sign in to comment.