`xmpp_run_once()` uses `FD_SET()` to determine which sockets to `select()`
on. The socket gets initialized to `INVALID_SOCKET = -1` inside
`xmpp_conn_new()` which leads to a buffer overflow once `FD_SET()` is
called.
This is only exposed when enabling a higher optimization level, which
was only done in the `release-test` CI job.
* Fix this testcase by initializing the socket to a possible value.
* Build the Valgrind CI jobs with `-O2`.
* Make the output of the `release-test` more verbose.
Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
* Refactor `xmpp_sm_state_restore()`
Add new internal functions to load u32 and string values. This also brings
length checks in order to verify we don't read more sm_state than there
potentially is and type checks to ensure we have the correct CBOR types.
Each element is added to the queue right after creation, so it won't leak
in case creating its content fails.
* Refactor `sm_state_serialize()`
* Store & restore ints as/from big endian, CBOR requires that
* Bring API names in line with the usual naming
* Auto-format sources
Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
* `release` creates the tarballs
* `test-release` takes the tarballs, extracts them, builds the library
and tests and runs the tests
* `docs` run doxygen
Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
XEP-0077 will not be implemented as part of libstrophe's API, but an
example is provided. The example shows how to use the "raw" connection
to register a user.
Closes#54.
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.