X-Git-Url: https://oss.titaniummirror.com/gitweb/?a=blobdiff_plain;f=tos%2Flib%2Fnet%2FDeluge%2FFlashVolumeManager%2FFlashVolumeManagerP.nc;fp=tos%2Flib%2Fnet%2FDeluge%2FFlashVolumeManager%2FFlashVolumeManagerP.nc;h=56558c4214a17c8b14bf11c143a016a5e005de59;hb=c1a7ccc021805d45c9d62003c6528c744c2742a6;hp=657d6795901340670d415bc907f47eeeba994a9c;hpb=58ade51c5d838097ffb691a7da6e72f1439cdf32;p=tinyos-2.x.git diff --git a/tos/lib/net/Deluge/FlashVolumeManager/FlashVolumeManagerP.nc b/tos/lib/net/Deluge/FlashVolumeManager/FlashVolumeManagerP.nc index 657d6795..56558c42 100644 --- a/tos/lib/net/Deluge/FlashVolumeManager/FlashVolumeManagerP.nc +++ b/tos/lib/net/Deluge/FlashVolumeManager/FlashVolumeManagerP.nc @@ -186,7 +186,7 @@ implementation } // Converts the image number that the user wants to the real image number - imgNum = imgNum2volumeId[request->imgNum]; + imgNum = request->imgNum < DELUGE_NUM_VOLUMES ? imgNum2volumeId[request->imgNum] : 0xFF; if (imgNum != 0xFF) { error = SUCCESS;