summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPawin Vongmasa <pawin@google.com>2018-05-08 06:40:24 -0700
committerPawin Vongmasa <pawin@google.com>2018-05-08 06:40:24 -0700
commitfb710d3c6af6fd139e30d39eb852ba6bcfcec911 (patch)
tree249700f19ea170f804d64aa370ab6165872597c2
parentaf6e0b0c0cb946a4222d7f5bacc7bea11c33d814 (diff)
downloadneven-fb710d3c6af6fd139e30d39eb852ba6bcfcec911.tar.gz
Make bound check proper in bbf_Scanner_addOutPos
Bug: 78290481 Change-Id: Ifab456f40b5e8f14f2728ad67d1b3e2eeae0b947
-rw-r--r--Embedded/common/src/b_BitFeatureEm/Scanner.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Embedded/common/src/b_BitFeatureEm/Scanner.c b/Embedded/common/src/b_BitFeatureEm/Scanner.c
index 327e714..1a0ae2a 100644
--- a/Embedded/common/src/b_BitFeatureEm/Scanner.c
+++ b/Embedded/common/src/b_BitFeatureEm/Scanner.c
@@ -1064,7 +1064,7 @@ void bbf_Scanner_addOutPos( struct bbs_Context* cpA,
uint32 scaleA,
int32 actA )
{
- if( ( ptrA->outCountE * 4 ) < ptrA->outArrE.sizeE )
+ if( ( ptrA->outCountE * 4 + 3 ) < ptrA->outArrE.sizeE )
{
ptrA->outArrE.arrPtrE[ ptrA->outCountE * 4 + 0 ] = xA;
ptrA->outArrE.arrPtrE[ ptrA->outCountE * 4 + 1 ] = yA;