[Nice] [nice/master] Restore plen setting in the same place

Olivier Crête olivier.crete at collabora.co.uk
Wed Nov 5 14:01:20 PST 2008


---
 stun/stunsend.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/stun/stunsend.c b/stun/stunsend.c
index 1170c7b..17032dc 100644
--- a/stun/stunsend.c
+++ b/stun/stunsend.c
@@ -507,6 +507,8 @@ stun_finish_long (uint8_t *msg, size_t *restrict plen,
     if (ptr == NULL)
       return ENOBUFS;
 
+    *plen = ptr + 4 -msg;
+
     fpr = htonl (stun_fingerprint (msg, *plen));
     memcpy (ptr, &fpr, sizeof (fpr));
   }
-- 
1.5.6.5




More information about the Nice mailing list