1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-09-28 03:06:20 -04:00

Fix another off-by-one error similar to the SGML comment parsing

This commit is contained in:
Jonas Fonseca 2005-12-31 01:14:52 +01:00 committed by Jonas Fonseca
parent ab7ba39d42
commit e8ff8bd5f0

View File

@ -210,7 +210,7 @@ skip_cdata_section(struct dom_scanner *scanner, unsigned char **string)
unsigned char *pos = *string;
int length = 0;
for (; pos < scanner->end - 3; pos++)
for (; pos < scanner->end - 2; pos++)
if (pos[0] == ']' && pos[1] == ']' && pos[2] == '>') {
length = pos - *string;
pos += 3;