[Orca-checkins] r411 - in trunk/orca/lib/SE: 3.2.1 3.3 3.3.1

dmberezin at hotmail.com dmberezin at hotmail.com
Tue Jan 4 11:55:00 PST 2005


Author: dmberezin at hotmail.com
Date: Tue Jan  4 11:49:56 2005
New Revision: 411

Modified:
   trunk/orca/lib/SE/3.2.1/workinfo_class.se
   trunk/orca/lib/SE/3.3.1/workinfo_class.se
   trunk/orca/lib/SE/3.3/workinfo_class.se
Log:
Fix small bug in workinfo class

* lib/SE/3.2.1/workinfo_class.se
* lib/SE/3.3.1/workinfo_class.se
* lib/SE/3.3/workinfo_class.se
  Add check to prevent access to 'wi' array with negative index.


Modified: trunk/orca/lib/SE/3.2.1/workinfo_class.se
==============================================================================
--- trunk/orca/lib/SE/3.2.1/workinfo_class.se	(original)
+++ trunk/orca/lib/SE/3.2.1/workinfo_class.se	Tue Jan  4 11:49:56 2005
@@ -257,7 +257,7 @@
     }
 
     if (number != -1) {                            // Data is available
-      if (number < wc) {
+      if (number > -1 && number < wc) {
         w = wi[++number];                          // Return next workload data
       } else {
         w = wi[0];                                 // Set w to Total data

Modified: trunk/orca/lib/SE/3.3.1/workinfo_class.se
==============================================================================
--- trunk/orca/lib/SE/3.3.1/workinfo_class.se	(original)
+++ trunk/orca/lib/SE/3.3.1/workinfo_class.se	Tue Jan  4 11:49:56 2005
@@ -257,7 +257,7 @@
     }
 
     if (number != -1) {                            // Data is available
-      if (number < wc) {
+      if (number > -1 && number < wc) {
         w = wi[++number];                          // Return next workload data
       } else {
         w = wi[0];                                 // Set w to Total data

Modified: trunk/orca/lib/SE/3.3/workinfo_class.se
==============================================================================
--- trunk/orca/lib/SE/3.3/workinfo_class.se	(original)
+++ trunk/orca/lib/SE/3.3/workinfo_class.se	Tue Jan  4 11:49:56 2005
@@ -257,7 +257,7 @@
     }
 
     if (number != -1) {                            // Data is available
-      if (number < wc) {
+      if (number > -1 && number < wc) {
         w = wi[++number];                          // Return next workload data
       } else {
         w = wi[0];                                 // Set w to Total data



More information about the Orca-checkins mailing list