Commit 0d0f8fe7 authored by Dafydd Harries's avatar Dafydd Harries

assert that payload is aligned when packing STUN message

darcs-hash:20070131143243-c9803-1ba794adfd98d7be8082ba0b032bbd89e521c538.gz
parent 97188414
......@@ -275,6 +275,7 @@ stun_message_pack (StunMessage *msg, gchar **packed)
length += stun_attribute_pack (*attr, NULL);
}
g_assert (length % 4 == 0);
tmp = g_malloc0 (length + 20);
*(guint16 *) (tmp + 0) = htons (msg->type);
*(guint16 *) (tmp + 2) = htons (length);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment