diff options
author | coopercc <coopercc> | 2000-10-20 15:14:36 +0000 |
---|---|---|
committer | coopercc <coopercc> | 2000-10-20 15:14:36 +0000 |
commit | f0d9a967d5770cff63c028e0b18dafed906cbf82 (patch) | |
tree | e8a476484eced82e423c21258bbd290f117e63a6 /lib/xmltok_impl.c | |
parent | 7e868fa01860b8eb83d6025eee0cbf2cfa36bf07 (diff) | |
download | libexpat-f0d9a967d5770cff63c028e0b18dafed906cbf82.tar.gz |
Revised fix for abort occurring with a percent followed by whitespace or
another percent in entity values.
Diffstat (limited to 'lib/xmltok_impl.c')
-rw-r--r-- | lib/xmltok_impl.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/xmltok_impl.c b/lib/xmltok_impl.c index 73617f7..36d2065 100644 --- a/lib/xmltok_impl.c +++ b/lib/xmltok_impl.c @@ -1270,8 +1270,11 @@ int PREFIX(entityValueTok)(const ENCODING *enc, const char *ptr, const char *end *nextTokPtr = ptr; return XML_TOK_DATA_CHARS; case BT_PERCNT: - if (ptr == start) - return PREFIX(scanPercent)(enc, ptr + MINBPC(enc), end, nextTokPtr); + if (ptr == start) { + int tok = PREFIX(scanPercent)(enc, ptr + MINBPC(enc), + end, nextTokPtr); + return (tok == XML_TOK_PERCENT) ? XML_TOK_INVALID : tok; + } *nextTokPtr = ptr; return XML_TOK_DATA_CHARS; case BT_LF: |