summaryrefslogtreecommitdiff
path: root/stun
diff options
context:
space:
mode:
authorOlivier CrĂȘte <olivier.crete@collabora.com>2020-02-12 19:47:16 -0500
committerOlivier CrĂȘte <olivier.crete@collabora.com>2020-02-12 19:47:16 -0500
commitaa2a83bbf4728b25809c37cba06ff1ff1f390d3e (patch)
treea5084b2798e5508c78cfa90eaa111a416900483d /stun
parentbd14e25681725e936551824b0eea51098b81e335 (diff)
downloadlibnice-aa2a83bbf4728b25809c37cba06ff1ff1f390d3e.tar.gz
stun usage turn: Check return value as is done elsewhere
Diffstat (limited to 'stun')
-rw-r--r--stun/usages/turn.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/stun/usages/turn.c b/stun/usages/turn.c
index ec12642..80b30a0 100644
--- a/stun/usages/turn.c
+++ b/stun/usages/turn.c
@@ -96,7 +96,9 @@ size_t stun_usage_turn_create (StunAgent *agent, StunMessage *msg,
}
if (compatibility == STUN_USAGE_TURN_COMPATIBILITY_OC2007) {
- stun_message_append32(msg, STUN_ATTRIBUTE_MS_VERSION, 1);
+ if (stun_message_append32(msg, STUN_ATTRIBUTE_MS_VERSION, 1) !=
+ STUN_MESSAGE_RETURN_SUCCESS)
+ return 0;
}
if (lifetime >= 0) {