[vlc-commits] keychain: Store port as integer

David Fuhrmann git at videolan.org
Thu Apr 19 01:11:15 CEST 2018


vlc/vlc-3.0 | branch: master | David Fuhrmann <dfuhrmann at videolan.org> | Thu Apr 19 00:31:24 2018 +0200| [c87cd0947540165e2c85aa69af86653e8f33d634] | 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().

(cherry picked from commit c4d34f9ded0b9c9d2d29566988916dfccfc09624)
Signed-off-by: David Fuhrmann <dfuhrmann at videolan.org>

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

 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