From e25135106d4f425bc7bdb4eec096e25114e6921f Mon Sep 17 00:00:00 2001 From: Florian Zeitz Date: Wed, 25 Jan 2012 18:06:36 +0100 Subject: [PATCH] Use strlen instead of strnlen, for compatibility with some systems --- src/XMPPJID.m | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/XMPPJID.m b/src/XMPPJID.m index 1a64e24..eb52a5a 100644 --- a/src/XMPPJID.m +++ b/src/XMPPJID.m @@ -112,7 +112,7 @@ if (((rc = stringprep_profile([node_ UTF8String], &nodepart, "Nodeprep", 0)) != STRINGPREP_OK) || (nodepart[0] == '\0') || - (strnlen(nodepart, 1024) > 1023)) + (strlen(nodepart) > 1023)) @throw [XMPPStringPrepFailedException exceptionWithClass: isa connection: nil @@ -141,7 +141,7 @@ if (((rc = stringprep_profile([domain_ UTF8String], &srv, "Nameprep", 0)) != STRINGPREP_OK) || (srv[0] == '\0') || - (strnlen(srv, 1024) > 1023)) + (strlen(srv) > 1023)) @throw [XMPPStringPrepFailedException exceptionWithClass: isa connection: nil @@ -176,7 +176,7 @@ if (((rc = stringprep_profile([resource_ UTF8String], &res, "Resourceprep", 0)) != STRINGPREP_OK) || (res[0] == '\0') || - (strnlen(res, 1024) > 1023)) + (strlen(res) > 1023)) @throw [XMPPStringPrepFailedException exceptionWithClass: isa connection: nil