Merge pi-dr1-dev to aosp-master

Change-Id: Id4b9de2960dcde3b4f5568661eb003d4bbaded9f
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 @@
 							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;