diff options
author | defanor <defanor@uberspace.net> | 2020-02-29 18:00:48 +0300 |
---|---|---|
committer | defanor <defanor@uberspace.net> | 2020-02-29 18:00:48 +0300 |
commit | 60f39a3ae315cef94b47a18a9a51ba549051389c (patch) | |
tree | cb07b9b34165929ab44214b2534f4086d3351df4 /src/rexmpp.c | |
parent | 239248f77bb21139b158950a548ff84ada4b3bf1 (diff) |
Check that the initial JID is non-NULL
Diffstat (limited to 'src/rexmpp.c')
-rw-r--r-- | src/rexmpp.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/rexmpp.c b/src/rexmpp.c index 04ec798..c9ec44e 100644 --- a/src/rexmpp.c +++ b/src/rexmpp.c @@ -101,6 +101,11 @@ rexmpp_err_t rexmpp_init (rexmpp_t *s, s->xml_in_cb = xml_in_cb; s->xml_out_cb = xml_out_cb; + if (jid == NULL) { + rexmpp_log(s, LOG_CRIT, "No initial JID is provided."); + return REXMPP_E_JID; + } + s->xml_parser = xmlCreatePushParserCtxt(&sax, s, "", 0, NULL); if (s->xml_parser == NULL) { |