Commit Graph

119 Commits

Author SHA1 Message Date
Dmitry Podgorny
52dcd26b8c sasl: don't use uninitialized variable
base64_decode() used uninitialized variable when unable to allocate memory.

Reported-by: Fabian Freyer <fabian.freyer@physik.tu-berlin.de>
2014-08-30 15:14:22 +03:00
Dmitry Podgorny
cf361d35fe auth: removed useless static declaration
_handle_open_tls() declared as static function but not defined.
2014-08-26 14:53:15 +03:00
Damian Obernikowicz
783bad0897 Fixed memory leak 2014-08-20 00:36:59 +03:00
James Booth
15650f16b9 Revert "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 reverts commit 4b194b98cf.
2014-04-30 21:43:50 +01:00
Alexander Kass
03b6e90b94 warning fix 2013-09-07 11:58:16 +04:00
Alexander Kass
badebfa840 standard memset error
size of pointer instead of object
2013-09-07 11:58:16 +04:00
Alexander Kass
55b6da74d8 len should be signed 2013-09-07 11:58:16 +04:00
Sharjeel Aziz
4b194b98cf 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. 2013-07-31 10:33:52 -04:00
KuRi
28319c2c0d Fixed Indenting 2013-04-19 23:13:15 +02:00
KuRi
43aa61f3db Updated file format 2013-04-19 22:49:05 +02:00
KuRi
840bfda332 Changed TimedOut error to Conn Reset 2013-04-19 22:45:02 +02:00
Luis Angel Curiel Sanz
cc9e29c671 Fixed sock_read on Windows when returning cero
Fixed coding style
2013-04-19 10:46:47 +02:00
Luis Angel Curiel Sanz
b41732ada7 Fixed bug on sock_read. It returns 0 when an error reading occurs, and this situation was not being controlled. 2013-04-19 08:39:59 +02:00
Alexandre Erwin Ittner
c0b1e5b7fe Fix escaping of XML text and attributes
There was a bug in xmpp_send which caused XML special characters to be
sent to the server verbatim, implying in invalid stanzas and making the
server drop the connection. This commit fixed the bug escaping such
characters with the usual rules.

Bugs: The code now do several (de)allocation operations in every send,
this may have a negative effect on performance when used with slow
memory managers.

License: This code is distributed under the same license used by strophe
(i.e., GPLv3 or MIT).
2012-09-23 17:18:53 -03:00
James Booth
5875390968 Fixed spacing 2012-05-20 05:16:20 +01:00
James Booth
a572d055a8 Fixed wrong flag setting 2012-05-20 02:10:19 +01:00
James Booth
9615a55856 Added option to disable TLS
The connection object includes a tls_support flag, which can
be disabled with xmpp_conn_disable_tls().
2012-05-20 01:50:32 +01:00
Jack Moffitt
713cfa245a Another try at OpenBSD fixes.
nameser_compat.h is required on Darwin, but doesn't exist on
OpenBSD. Also, OpenBSD doesn't support the ns_c_in or ns_t_srv enums,
so the C_IN and T_SRV macros are required.
2012-02-10 22:10:32 -07:00
Jack Moffitt
f9471368f5 Fix snprintf warnings about missing format strings. 2012-02-08 21:46:37 -07:00
Jack Moffitt
143eec7e1f Remove need for nameser_compat.h. 2012-02-08 21:46:25 -07:00
Jack Moffitt
7032ede88a Missed a bit of cleanup. 2012-02-08 08:52:16 -07:00
Andrew Potter
128c155681 Fix memory leak in commit 30d4f2b7
va_end() has to be called after each invocation of va_copy(). So when
log messages are short, the copy was leaked. When log messages were
long, the old ap would get lost.
2012-02-08 00:00:57 -07:00
Jack Moffitt
fc3d025c7f Fix compiler warning. 2012-02-07 22:57:46 -07:00
Jack Moffitt
801a844e30 Initialize conn->state.
Fixes #13.
2012-02-07 22:54:09 -07:00
Jack Moffitt
13175787fc Document handler return values. 2012-02-07 22:49:56 -07:00
Jack Moffitt
ee8afdb64e Memory leak fixes from @elisamanfrin.
Fixes issue #4.
2012-02-07 22:46:38 -07:00
Jack Moffitt
90d4c54d81 Merge pull request #12 from vladmihaisima/fix_ssl
Bug when using SSL communication
2012-02-07 20:33:56 -08:00
U-vladms-pc\vladms
5344669bb7 Added tls_pending to windows schannel implementation of tls 2012-01-10 17:35:53 +01:00
Vlad-Mihai Sima
511606835d Bug fix: when using tls, if a stanza is bigger than the buffer of 4096 in event.c, the stanza will not be read as select will return 0 on the ssl socket and the data will be in ssl buffers. Partial fix, only for Linux for now 2012-01-01 20:09:18 +01:00
Rob Hoelz
30d4f2b78d Fixing logging when stanzas are too big 2011-09-07 20:09:19 -05:00
Russell Zuck
28da8ea988 fix for error in return status logic from libxml2 function 2011-05-05 13:22:23 -06:00
Dustin Sallings
d048124969 Capture the bound jid.
I'd kind of like to be able to discover the JID with full resource for
some operations.
2009-06-15 14:37:21 -07:00
Jack Moffitt
370a371800 Dual licensed libstrophe under MIT and GPLv3.
Updated copyright headers.
2009-06-15 15:26:10 -06:00
Jack Moffitt
a58b0e4b04 Patch to fix select time values from xue yong zhi <xue.yong.zhi@gmail.com> applied. 2009-05-05 13:29:01 -06:00
Jack Moffitt
2eb9847ba8 Fixed memory leak in one off handlers. 2009-04-14 15:53:04 -06:00
Jack Moffitt
398d774c59 Fixed memory leak in new parser abstraction. 2009-04-14 15:36:03 -06:00
Jack Moffitt
b522704567 Merge commit 'dustin/master'
* commit 'dustin/master':
  Ignore test artifacts.
  Ignore TAGS.
  Log the result of a connect.
  If an altdomain was specified, use it instead of SRV lookups.
  Free the connection language.
  Handle a case where the query has no namespace.
2009-04-14 14:53:29 -06:00
Jack Moffitt
20bac5b4de Fixed small memory leak in id handler logic. 2009-04-14 14:22:34 -06:00
Dustin Sallings
690c0c1e85 Log the result of a connect. 2009-04-14 13:11:38 -07:00
Dustin Sallings
e852bfb62e If an altdomain was specified, use it instead of SRV lookups.
For whatever reason, SRV lookups are hanging for me for about 30
seconds making testing suck.
2009-04-14 13:11:38 -07:00
Dustin Sallings
3156f5044f Free the connection language.
This created a memory leak when freeing a connection.
2009-04-14 13:11:38 -07:00
Jack Moffitt
3fd7515dcf Abstracted XML parser library and switched to autotools building.
expat is still the default parser, but libxml2 can also be used
via an option to the configure script.  New parsers can easily be
added by implementing a parser_foo.c that uses the interface defined
in parser.h.
2009-04-14 13:47:20 -06:00
Pedro Melo
091f5aab71 Promote xmpp_send_raw and xmpp_send_raw_string to the public API
If you receive XML data to send from some place else in your app, you just want to send it.

Signed-off-by: Jack Moffitt <jack@metajack.im>
2009-01-25 10:37:58 -07:00
Pedro Melo
f27f2c5ba2 Promote xmpp_free to the public API
Some other APIs, like xmpp_stanza_to_text, return a point that must be freed by the caller with this API.

Signed-off-by: Jack Moffitt <jack@metajack.im>
2009-01-25 10:36:10 -07:00
Jack Moffitt
4f608fd957 First pass at fixing up OpenSSL support. It now seems to work. 2008-12-10 09:25:22 -07:00
Jack Moffitt
cb0ae178ee Remove spurious error notices on EINTR and EAGAIN in xmpp_run_once(). 2008-12-09 13:57:43 -07:00
Matthew Wild
fddd5f1245 Fix for refcount handling in stanzas, by Jack. 2008-09-18 04:13:29 +00:00
Matthew Wild
757d5bad74 + Add xmpp_conn_get_context() to get the ctx a connection belongs to. Fixes #10
* Properly use altdomain when no SRV record. Fixes #2
- Remove unused function declarations from strophe.h. Fixes #1
2008-09-18 03:56:08 +00:00
Jack Moffitt
6560ef253f Small patch to handler_fire_stanza() from Matthew Wild <mwild1@gmail.com>. prev was not advanced along with item. 2008-08-26 04:47:36 +00:00
Jack Moffitt
1c0bbb1f5d Reverting r513. I mistakenly committed my entire tree. 2008-08-26 04:46:41 +00:00