taler-ios

iOS apps for GNU Taler (wallet)
Log | Files | Refs | README | LICENSE

commit b68da53923d78420be58d05e1abec5464527f64b
parent 2208c29f1a731d65d5da76ede258c5ffbd5f9aa4
Author: Marc Stibane <marc@taler.net>
Date:   Mon, 29 Jun 2026 12:56:30 +0200

fix potential array out-of-bounds

Diffstat:
MTalerWallet1/Helper/CStringArray.swift | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/TalerWallet1/Helper/CStringArray.swift b/TalerWallet1/Helper/CStringArray.swift @@ -44,7 +44,7 @@ public struct CStringArray { // This uses the deallocator available on the data structure as a solution to the fact that structs do not have `deinit` self.data = Data(bytesNoCopy: pointer, count: MemoryLayout<UnsafeMutablePointer<CChar>>.size * count, deallocator: .custom({_,_ in - for i in 0...count - 1 { + for i in 0..<count { free(pointer[i]) } pointer.deallocate()