[vlc-commits] keychain: Store port as integer

David Fuhrmann git at videolan.org
Thu Apr 19 01:09:03 CEST 2018


vlc | branch: master | David Fuhrmann <dfuhrmann at videolan.org> | Thu Apr 19 00:31:24 2018 +0200| [c4d34f9ded0b9c9d2d29566988916dfccfc09624] | committer: David Fuhrmann

keychain: Store port as integer

The value for that key must be an NSNumber according to docu.
This fixes a crash on 10.7 in find().

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=c4d34f9ded0b9c9d2d29566988916dfccfc09624
---

 modules/keystore/keychain.m | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/keystore/keychain.m b/modules/keystore/keychain.m
index 0099b4c099..991651497b 100644
--- a/modules/keystore/keychain.m
+++ b/modules/keystore/keychain.m
@@ -269,7 +269,7 @@ static void SetAttributesForQuery(const char *const ppsz_values[KEY_MAX], NSMuta
         [query setObject:[NSString stringWithUTF8String:psz_path] forKey:(__bridge id)kSecAttrPath];
     }
     if (psz_port) {
-        [query setObject:[NSString stringWithUTF8String:psz_port] forKey:(__bridge id)kSecAttrPort];
+        [query setObject:[NSNumber numberWithInt:atoi(psz_port)] forKey:(__bridge id)kSecAttrPort];
     }
 }
 



More information about the vlc-commits mailing list