Revision: 7879
http://playerstage.svn.sourceforge.net/playerstage/?rev=7879&view=rev
Author: thjc
Date: 2009-06-23 13:01:37 +0000 (Tue, 23 Jun 2009)
Log Message:
-----------
check for index out of bounds even if assertions compiled out
Modified Paths:
--------------
code/player/trunk/client_libs/libplayerc/dev_aio.c
Modified: code/player/trunk/client_libs/libplayerc/dev_aio.c
===================================================================
--- code/player/trunk/client_libs/libplayerc/dev_aio.c 2009-06-23 11:14:00 UTC
(rev 7878)
+++ code/player/trunk/client_libs/libplayerc/dev_aio.c 2009-06-23 13:01:37 UTC
(rev 7879)
@@ -127,5 +127,7 @@
float playerc_aio_get_data(playerc_aio_t *device, uint32_t index)
{
assert(index < device->voltages_count);
+ if (index >= device->voltages_count)
+ return 0;
return device->voltages[index];
}
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
_______________________________________________
Playerstage-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-commit