[iOS] Fix missing 0 byte after passphrase
FossilOrigin-Name: b57405c1d07a52c27807f6fe19eff1b1277663f051690a3a3336dc626c6f4825
This commit is contained in:
parent
df23f59e9d
commit
e74d034db4
1 changed files with 2 additions and 2 deletions
|
@ -153,8 +153,8 @@ class ShowDetailsController: UITableViewController, UITextFieldDelegate {
|
|||
}
|
||||
|
||||
let passphraseText = (passphraseField?.text ?? "") as NSString
|
||||
let passphraseLen =
|
||||
passphraseText.lengthOfBytes(using: String.Encoding.utf8.rawValue)
|
||||
let passphraseLen = passphraseText.lengthOfBytes(
|
||||
using: String.Encoding.utf8.rawValue) + 1
|
||||
let passphrase = OFSecureData(count: passphraseLen,
|
||||
allowsSwappableMemory: false)
|
||||
memcpy(passphrase.mutableItems, passphraseText.utf8String!,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue