Fixed a potential buffer overflow in xmpp_stanza_to_text when the stanza length was greater than the default buffer size of 1024. Tested on Windows only.

This commit is contained in:
Sharjeel Aziz
2013-07-31 10:33:52 -04:00
parent a2a50d104a
commit 4b194b98cf

View File

@@ -398,7 +398,7 @@ int xmpp_stanza_to_text(xmpp_stanza_t *stanza,
return XMPP_EMEM;
}
ret = _render_stanza_recursive(stanza, buffer, length);
ret = _render_stanza_recursive(stanza, buffer, length - 1);
if (ret < 0) return ret;
if (ret > length - 1) {