* libunibreak can access a buffer out of range.
Change-Id: I0ad777213c7c185e2e62f0d35a931ebdf795c677
Signed-off-by: Victor Cebollada <v.cebollada@samsung.com>
/* TODO: Rule LB21a, as introduced by Revision 28 of UAX#14, is not
* yet implemented below. */
int brk = LINEBREAK_UNDEFINED;
- assert(lbpCtx->lbcCur <= LBP_RI);
- assert(lbpCtx->lbcNew <= LBP_RI);
+ assert((lbpCtx->lbcCur > 0) && (lbpCtx->lbcCur <= LBP_RI));
+ assert((lbpCtx->lbcNew > 0) && (lbpCtx->lbcNew <= LBP_RI));
switch (baTable[lbpCtx->lbcCur - 1][lbpCtx->lbcNew - 1])
{
case DIR_BRK: