Skip to content

Commit cb07bfd

Browse files
committed
[Stdlib] Ensure key paths allocate space for the terminating NUL.
rdar://problem/46457346 SR-9404
1 parent 27b3427 commit cb07bfd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

stdlib/public/core/KeyPath.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2099,7 +2099,7 @@ internal func _appendingKeyPaths<
20992099
rootKVCLength = Int(_swift_stdlib_strlen(rootPtr))
21002100
leafKVCLength = Int(_swift_stdlib_strlen(leafPtr))
21012101
// root + "." + leaf
2102-
appendedKVCLength = rootKVCLength + 1 + leafKVCLength
2102+
appendedKVCLength = rootKVCLength + 1 + leafKVCLength + 1
21032103
} else {
21042104
rootKVCLength = 0
21052105
leafKVCLength = 0

0 commit comments

Comments
 (0)