summaryrefslogtreecommitdiff
path: root/main/message.c
diff options
context:
space:
mode:
authorSean Bright <sean.bright@gmail.com>2017-03-21 09:26:28 -0400
committerSean Bright <sean.bright@gmail.com>2017-03-21 08:45:37 -0600
commit6b4b87787c0735bfe63445d625e2e8749a7caecb (patch)
tree9aa00a29a926497a76126752c7dcc7df48a4dfe7 /main/message.c
parentf5603cb1ece5001d1288004c9bc6ed51448deb81 (diff)
res_pjsip_messaging: Check URI type before dereferencing
We aren't validating that the URI we just parsed is a SIP/SIPS one before trying to access the user, host, and port members of a possibly uninitialized structure. Also update the MessageSend documentation to indicate what 'from' formats are accepted. ASTERISK-26484 #close Reported by: Vinod Dharashive Change-Id: I476b5cc5f18a7713d0ee945374f2a1c164857d30
Diffstat (limited to 'main/message.c')
-rw-r--r--main/message.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/main/message.c b/main/message.c
index a6b048828..fcdf705fe 100644
--- a/main/message.c
+++ b/main/message.c
@@ -125,8 +125,10 @@
</parameter>
<parameter name="from" required="false">
<para>A From URI for the message if needed for the
- message technology being used to send this message.</para>
- <xi:include xpointer="xpointer(/docs/info[@name='MessageFromInfo'])" />
+ message technology being used to send this message. This can be a
+ SIP(S) URI, such as <literal>Alice &lt;sip:alice@atlanta.com&gt;</literal>,
+ a string in the format <literal>alice@atlanta.com</literal>, or simply
+ a username such as <literal>alice</literal>.</para>
</parameter>
</syntax>
<description>