meghs94 / tinyos-main

Automatically exported from code.google.com/p/tinyos-main
1 stars 0 forks source link

RPL: Indexing into memory location after array #80

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Hi.

In RPLOF0P.nc (and RPLMRHOFP):
 uint16_t desiredParent = MAX_PARENT;

should be:
 uint16_t desiredParent = MAX_PARENT-1;

Since, if desiredParent is not changed before its getting used:
 parent_t* parentNode = call ParentTable.get(desiredParent);

it might index the array in RPLRankP:
parent_t parentSet[MAX_PARENT];

in the memory location after the array.

Original issue reported on code.google.com by marku...@gmail.com on 10 Nov 2011 at 2:50

GoogleCodeExporter commented 8 years ago
Closed in r5823

Original comment by sdh...@gmail.com on 15 Nov 2011 at 5:54