sfeed

Simple RSS and Atom feed parser
git clone https://git.sinitax.com/codemadness/sfeed
Log | Files | Refs | README | LICENSE | Upstream | sfeed.txt

commit 2e00d9c904e6b03a6198651d15dc827526fa319c
parent 81499ca75a8c1cb2440c89241b5f5d06e5c44f5a
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date:   Fri, 22 Jan 2021 22:40:40 +0100

xml.c: fix typo / regression in checking codepoint range for utf-16 surrogate pair

Regression in commit 12b279581fbbcde2b36eb4b78d70a1c52d4a209a

0xdffff should be 0xdfff.

printf '<item><title>&#x1f448;</title></item>' | sfeed

Before (bad):
	&#x1f448;

After:
	👈

Diffstat:
Mxml.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xml.c b/xml.c @@ -253,7 +253,7 @@ numericentitytostr(const char *e, char *buf, size_t bufsiz) l = strtol(e, &end, 10); /* invalid value or not a well-formed entity or invalid code point */ if (errno || e == end || *end != ';' || l < 0 || l > 0x10ffff || - (l >= 0xd800 && l <= 0xdffff)) + (l >= 0xd800 && l <= 0xdfff)) return -1; len = codepointtoutf8(l, buf); buf[len] = '\0';