Elm cnp: Fix string bounds checking.

Patch by Hyoyoung Chang.

SVN revision: 60269
This commit is contained in:
Tom Hacohen 2011-06-13 13:25:08 +00:00
parent 5b30088911
commit b0f58c2b27
1 changed files with 1 additions and 1 deletions

View File

@ -1198,7 +1198,7 @@ mark_up(const char *start, int inlen, int *lenp)
q = ret = malloc(l + 1);
/* Second pass: Change characters */
for (p = start; *p; )
for (p = start; ((!endp) || (p < endp)) && (*p); )
{
for (i = 0; i < N_ESCAPES; i++)
{