Commit 1f632a7d authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Fixes off by one bug

parent 0c87ea63
......@@ -88,12 +88,12 @@ void Message::BuildHeader(const char* payload_type)
{
unsigned int mh_size;
mh_size = 4;
mh_size += 4; //(IPv4 specific)
// size+= authentification length (N/A)
mh_size += strlen(payload_type+1);
mh_size = 4
+ 4 /*(IPv4 specific)*/
/* + authentification length (N/A)*/
+ strlen(payload_type) + 1;
sap=(char*)malloc(mh_size*sizeof(char));
sap=(char*)malloc(mh_size);
/* Byte 1 : Version number V1 = 001 (3 bits)
......
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