summaryrefslogtreecommitdiff
path: root/textproc/xmlstarlet/files/patch-fix-unesc-dqout
blob: e164f3257e94f92d96eb546b7accec66b7f84f88 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
Description: unesc fails to handle " and ' correctly because it thinks they are too long.
Author: Norbert Kiesel <nk@iname.com>
Bug: https://bugs.debian.org/837122
Last-Update: 2016-09-08

--- src/xml_escape.c
+++ src/xml_escape.c
@@ -222,7 +222,7 @@
                 semicolon_off++;
             }
             entity_len = semicolon_off - i;
-            if (entity_len < MAX_ENTITY_NAME) {
+            if (entity_len <= MAX_ENTITY_NAME) {
                 memcpy(entity, &str[i], entity_len);
                 entity[entity_len] = '\0';
                 if (str[semicolon_off] == ';') {