File: 693.diff

package info (click to toggle)
libxkbcommon 1.7.0-2.1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 5,620 kB
  • sloc: ansic: 37,653; xml: 8,785; python: 1,639; yacc: 703; sh: 242; makefile: 23
file content (13 lines) | stat: -rw-r--r-- 566 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
Added support for `libxml2-2.14+`, which now disallows parsing trailing `NULL` bytes.

--- a/src/registry.c
+++ b/src/registry.c
@@ -1197,7 +1197,7 @@ validate(struct rxkb_context *ctx, xmlDo
 
     /* Note: do not use xmlParserInputBufferCreateStatic, it generates random
      * DTD validity errors for unknown reasons */
-    buf = xmlParserInputBufferCreateMem(dtdstr, sizeof(dtdstr),
+    buf = xmlParserInputBufferCreateMem(dtdstr, ARRAY_SIZE(dtdstr) - 1,
                                         XML_CHAR_ENCODING_UTF8);
     if (!buf)
         return false;