summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVegard Storheil Eriksen <zyp@jvnv.net>2011-10-10 00:18:56 +0200
committerVegard Storheil Eriksen <zyp@jvnv.net>2011-10-10 00:18:56 +0200
commit44ef490e9a16b774af9b51c47e4f53c2265e5f44 (patch)
tree5c95742dfc7b7d4041d56646b09dbfe6152ed30b
parentd91d26ffc2a763469d403a8a297b2905785e80a8 (diff)
Avoid PPMSum buffer overrun.
-rw-r--r--ppmsum.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/ppmsum.cpp b/ppmsum.cpp
index 927efa8..506b964 100644
--- a/ppmsum.cpp
+++ b/ppmsum.cpp
@@ -36,6 +36,7 @@ void PPMSum::irq() {
index = 0;
} else {
index++;
+ index &= 0xf;
}
} else if(sr & 0x04) {