[libxml2] Add TODO comment in xmlSwitchEncoding
- From: Nick Wellnhofer <nwellnhof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libxml2] Add TODO comment in xmlSwitchEncoding
- Date: Sat, 10 Jun 2017 16:31:46 +0000 (UTC)
commit 45ce1ee3994b73e30b8e2bda9dbfbb99e5347b66
Author: Nick Wellnhofer <wellnhofer aevum de>
Date: Fri Jun 9 15:27:25 2017 +0200
Add TODO comment in xmlSwitchEncoding
It would be nice if we could recover from unsupported encodings in
external entities.
parserInternals.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/parserInternals.c b/parserInternals.c
index b867cbc..67e5518 100644
--- a/parserInternals.c
+++ b/parserInternals.c
@@ -1101,6 +1101,11 @@ xmlSwitchEncoding(xmlParserCtxtPtr ctxt, xmlCharEncoding enc)
break;
}
}
+ /*
+ * TODO: We could recover from errors in external entites if we
+ * didn't stop the parser. But most callers of this function don't
+ * check the return value.
+ */
if (handler == NULL) {
xmlStopParser(ctxt);
return(-1);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]