Commit a4a5baad authored by Kai Vehmanen's avatar Kai Vehmanen

Fixed bug in adding zero-padding to STUN messages protected with message...

Fixed bug in adding zero-padding to STUN messages protected with message integrity. Patch by Petteri Puolakka.

darcs-hash:20061204153548-7659e-53b324ef6d72d743499813891cd8113847cf835f.gz
parent b8f2f80f
......@@ -46,6 +46,7 @@ Contributors to this release
/>
- **template**: First Surname (patch to nua/soa/msg)
- Petteri Puolakka (patch to stun)
See the AUTHORS file in the distribution package.
......@@ -68,3 +69,5 @@ Bugs fixed in this release
/>
- **template**: #9499652 sf.net bug item title
- Bug in zero-padding STUN messages with a message integrity
attribute. Patch by Petteri Puolakka.
......@@ -443,7 +443,7 @@ int stun_encode_message_integrity(stun_attr_t *attr,
}
/* zero padding */
if (len % 64 == 0) {
if (len % 64 != 0) {
padded_len = len + (64 - (len % 64));
padded_text = (unsigned char *) malloc(padded_len);
......
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