aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2023-03-23 23:09:50 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2023-03-23 23:09:50 +0000
commita7f9e5a91482a611cb702301f7f1c9ca5e90867c (patch)
tree38db379f523c94ec60d6cc5d0e3c153c0297180b
parenta70f901b1b194c80978d33a8f219f3cbab71d2c5 (diff)
parentb4dc99e0d65aa43a49ea6d013df74b92befae2f5 (diff)
downloadlibxml2-android13-qpr3-s13-release.tar.gz
Change-Id: If16949bc1edde2fde4596466458f63f9b64cbce5
-rw-r--r--parser.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/parser.c b/parser.c
index 506c78a8..f11f017a 100644
--- a/parser.c
+++ b/parser.c
@@ -12170,7 +12170,11 @@ done:
#endif
return(ret);
encoding_error:
- {
+ if (ctxt->input->end - ctxt->input->cur < 4) {
+ __xmlErrEncoding(ctxt, XML_ERR_INVALID_CHAR,
+ "Input is not proper UTF-8, indicate encoding !\n",
+ NULL, NULL);
+ } else {
char buffer[150];
snprintf(buffer, 149, "Bytes: 0x%02X 0x%02X 0x%02X 0x%02X\n",