[Feature][ZXW-265]merge P56U03 version
Only Configure: No
Affected branch: master
Affected module: unknow
Is it affected on both ZXIC and MTK: only ZXIC
Self-test: Yes
Doc Update: No
Change-Id: I873f6df64e2605a77b8b8bfec35b21e7f33c5444
diff --git a/ap/libc/glibc/glibc-2.23/posix/regexec.c b/ap/libc/glibc/glibc-2.23/posix/regexec.c
old mode 100644
new mode 100755
index ec46c3a..5c2e0dd
--- a/ap/libc/glibc/glibc-2.23/posix/regexec.c
+++ b/ap/libc/glibc/glibc-2.23/posix/regexec.c
@@ -1304,8 +1304,10 @@
else if (naccepted)
{
char *buf = (char *) re_string_get_buffer (&mctx->input);
- if (memcmp (buf + regs[subexp_idx].rm_so, buf + *pidx,
- naccepted) != 0)
+ if (mctx->input.valid_len - *pidx < naccepted
+ || (memcmp (buf + regs[subexp_idx].rm_so, buf + *pidx,
+ naccepted)
+ != 0))
return -1;
}
}