dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #11518
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 3303: Fixed division by zero vulnerability
------------------------------------------------------------
revno: 3303
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2011-04-06 18:49:03 +0200
message:
Fixed division by zero vulnerability
modified:
dhis-2/dhis-web/dhis-web-dataentry/src/main/java/org/hisp/dhis/de/action/FormAction.java
--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk
Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-web/dhis-web-dataentry/src/main/java/org/hisp/dhis/de/action/FormAction.java'
--- dhis-2/dhis-web/dhis-web-dataentry/src/main/java/org/hisp/dhis/de/action/FormAction.java 2011-01-25 22:15:46 +0000
+++ dhis-2/dhis-web/dhis-web-dataentry/src/main/java/org/hisp/dhis/de/action/FormAction.java 2011-04-06 16:49:03 +0000
@@ -388,7 +388,7 @@
for ( DataElementCategory cat : categoryCombo.getCategories() )
{
- if ( cat.getCategoryOptions().size() > 0 )
+ if ( catColSpan > 0 && cat.getCategoryOptions().size() > 0 )
{
catColSpan = catColSpan / cat.getCategoryOptions().size();
int total = optionCombos.size() / (catColSpan * cat.getCategoryOptions().size());