[asterisk-commits] phsultan: trunk r85551 - /trunk/res/res_jabber.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Mon Oct 15 08:51:22 CDT 2007
Author: phsultan
Date: Mon Oct 15 08:51:21 2007
New Revision: 85551
URL: http://svn.digium.com/view/asterisk?view=rev&rev=85551
Log:
Allocate more space for the base64 output we need to generate.
Closes issue #10913, reported by tootai, who graciously granted us access
to his Asterisk server, thanks! Daniel, feel free to reopen the bug in
case you can reproduce this on 1.4.
Modified:
trunk/res/res_jabber.c
Modified: trunk/res/res_jabber.c
URL: http://svn.digium.com/view/asterisk/trunk/res/res_jabber.c?view=diff&rev=85551&r1=85550&r2=85551
==============================================================================
--- trunk/res/res_jabber.c (original)
+++ trunk/res/res_jabber.c Mon Oct 15 08:51:21 2007
@@ -561,10 +561,10 @@
iks_insert_attrib(x, "xmlns", IKS_NS_XMPP_SASL);
len = strlen(username) + strlen(pass) + 3;
s = alloca(len);
- base64 = alloca((len + 1) * 4 / 3);
+ base64 = alloca((len + 2) * 4 / 3);
iks_insert_attrib(x, "mechanism", "PLAIN");
snprintf(s, len, "%c%s%c%s", 0, username, 0, pass);
- ast_base64encode(base64, (const unsigned char *) s, len, (len + 1) * 4 / 3);
+ ast_base64encode(base64, (const unsigned char *) s, len, (len + 2) * 4 / 3);
iks_insert_cdata(x, base64, 0);
iks_send(prs, x);
iks_delete(x);
More information about the asterisk-commits
mailing list