Skip to content

Commit 85e3a6a

Browse files
committed
Fix a memory corrupt issue in NSData copy implementation
1 parent 66bd183 commit 85e3a6a

File tree

1 file changed

+1
-1
lines changed
  • cryptography-providers/base/src/appleMain/kotlin

1 file changed

+1
-1
lines changed

cryptography-providers/base/src/appleMain/kotlin/NSData.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public fun <R> ByteArray.useNSData(block: (NSData) -> R): R {
3232
NSData.dataWithBytesNoCopy(
3333
bytes = it.addressOf(0),
3434
length = size.convert(),
35-
freeWhenDone = true
35+
freeWhenDone = false
3636
)
3737
)
3838
}

0 commit comments

Comments
 (0)