Introduction
Introduction Statistics Contact Development Disclaimer Help
check the returned length of xml_entitytostr() properly - grabtitle - stupid HT…
git clone git://git.codemadness.org/grabtitle
Log
Files
Refs
README
LICENSE
---
commit dcb355c8766619ad66061167c55b9f44c6ab7569
parent 1c506adc3502530014355ae774f8b306e9a8f4bb
Author: Hiltjo Posthuma <[email protected]>
Date: Wed, 12 Dec 2018 19:04:56 +0100
check the returned length of xml_entitytostr() properly
... this shouldn't matter though since the buffer is always big enough here.
Diffstat:
M grabtitle.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/grabtitle.c b/grabtitle.c
@@ -71,7 +71,7 @@ xmldataentity(XMLParser *p, const char *d, size_t dl)
char buf[16];
ssize_t len;
- if ((len = xml_entitytostr(d, buf, sizeof(buf))))
+ if ((len = xml_entitytostr(d, buf, sizeof(buf))) > 0)
xmldata(p, buf, (size_t)len);
else
xmldata(p, d, dl);
You are viewing proxied material from codemadness.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.