Hi Inderjit,

I think that it works when you have uint8_t* p; because for some reason you
have longer message than the length of TOS_Msg. Then only when you have
defined the pointer, you have enough space.

You have a check for valid length, and you compare with this expression 
MSG.length > TOSH_DATA_LENGTH
But then in the data filed you copy MSG.data and msg.type. 
If in the msg.length you have only length of the msg.data then your check is
not valid and after that with copy you use more space than is allocated by
definition of TOS_Msg tosMsg;

This can be checked easy. Just initialize p with value after lines with
memcopy and just before send. If I am right packets will contain the content
of p.


Cheers,
Hristo
 
_______________________________________________
Tinyos-help mailing list
[email protected]
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to