X-Git-Url: https://oss.titaniummirror.com/gitweb/?a=blobdiff_plain;f=tos%2Flib%2Fnet%2FDeluge%2FObjectTransferP.nc;h=8c6b499625c900260150a483b29cb3a44835816b;hb=da0cfeda9689aa64cfce0aa209f51803dcb11c21;hp=d2c2d820cfd1ee3d6f4020f6f0c094c6e1d42d55;hpb=594acbf436f5f78611348f7763a89c84f38ba46a;p=tinyos-2.x.git diff --git a/tos/lib/net/Deluge/ObjectTransferP.nc b/tos/lib/net/Deluge/ObjectTransferP.nc index d2c2d820..8c6b4996 100644 --- a/tos/lib/net/Deluge/ObjectTransferP.nc +++ b/tos/lib/net/Deluge/ObjectTransferP.nc @@ -130,8 +130,10 @@ implementation void sendAdvMsg(uint16_t addr) { - DelugeAdvMsg *pMsg = (DelugeAdvMsg *)(call SendAdvMsg.getPayload(&pMsgBuf)); - + DelugeAdvMsg *pMsg = (DelugeAdvMsg *)(call SendAdvMsg.getPayload(&pMsgBuf, sizeof(DelugeAdvMsg))); + if (pMsg == NULL) { + return; + } if (isBusy_pMsgBuf == FALSE) { pMsg->sourceAddr = TOS_NODE_ID; pMsg->version = DELUGE_VERSION;