DO NOT MERGE: Disallow namespace nodes in XPointer ranges

Namespace nodes must be copied to avoid use-after-free errors.
But they don't necessarily have a physical representation in a
document, so simply disallow them in XPointer ranges.

Found with afl-fuzz.

Fixes CVE-2016-4658.

Bug: 36554207
Change-Id: Ie570c4a53ae8ca82ed4ca19701ab7d8ba9b0468f
(cherry picked from commit 802cd32b480db799d282557ebbfddc1cf074be5f)
1 file changed
tree: 14940d6ea777c7525d71d217a2842eef464d0bf4
  1. bakefile/
  2. doc/
  3. example/
  4. include/
  5. macos/
  6. optim/
  7. os400/
  8. python/
  9. result/
  10. test/
  11. vms/
  12. VxWorks/
  13. win32/
  14. xstc/
  15. .gitignore
  16. acinclude.m4
  17. Android.mk
  18. AUTHORS
  19. autogen.sh
  20. buf.c
  21. buf.h
  22. build_glob.py
  23. c14n.c
  24. catalog.c
  25. ChangeLog
  26. check-relaxng-test-suite.py
  27. check-relaxng-test-suite2.py
  28. check-xinclude-test-suite.py
  29. check-xml-test-suite.py
  30. check-xsddata-test-suite.py
  31. chvalid.c
  32. chvalid.def
  33. CleanSpec.mk
  34. config.h
  35. configure.ac
  36. Copyright
  37. dbgen.pl
  38. dbgenattr.pl
  39. debugXML.c
  40. dict.c
  41. DOCBparser.c
  42. elfgcchack.h
  43. enc.h
  44. encoding.c
  45. entities.c
  46. error.c
  47. genChRanges.py
  48. gentest.py
  49. genUnicode.py
  50. global.data
  51. globals.c
  52. HACKING
  53. hash.c
  54. HTMLparser.c
  55. HTMLtree.c
  56. INSTALL.libxml2
  57. legacy.c
  58. libxml-2.0-uninstalled.pc.in
  59. libxml-2.0.pc.in
  60. libxml.3
  61. libxml.h
  62. libxml.m4
  63. libxml.spec.in
  64. libxml2-config.cmake.in
  65. libxml2.doap
  66. libxml2.syms
  67. list.c
  68. MAINTAINERS
  69. Makefile.am
  70. Makefile.tests
  71. Makefile.win
  72. MODULE_LICENSE_MIT
  73. nanoftp.c
  74. nanohttp.c
  75. NEWS
  76. parser.c
  77. parserInternals.c
  78. pattern.c
  79. README
  80. README.cvs-commits
  81. README.tests
  82. regressions.py
  83. regressions.xml
  84. relaxng.c
  85. rngparser.c
  86. runsuite.c
  87. runtest.c
  88. runxmlconf.c
  89. save.h
  90. SAX.c
  91. SAX2.c
  92. schematron.c
  93. testapi.c
  94. testAutomata.c
  95. testC14N.c
  96. testchar.c
  97. testdict.c
  98. testdso.c
  99. testHTML.c
  100. testlimits.c
  101. testModule.c
  102. testOOM.c
  103. testOOMlib.c
  104. testOOMlib.h
  105. testReader.c
  106. testrecurse.c
  107. testRegexp.c
  108. testRelax.c
  109. testSAX.c
  110. testSchemas.c
  111. testThreads.c
  112. testThreadsWin32.c
  113. testURI.c
  114. testXPath.c
  115. threads.c
  116. timsort.h
  117. TODO
  118. TODO_SCHEMAS
  119. tree.c
  120. trio.c
  121. trio.h
  122. triodef.h
  123. trionan.c
  124. trionan.h
  125. triop.h
  126. triostr.c
  127. triostr.h
  128. uri.c
  129. valid.c
  130. xinclude.c
  131. xlink.c
  132. xml2-config.1
  133. xml2-config.in
  134. xml2Conf.sh.in
  135. xmlcatalog.c
  136. xmlIO.c
  137. xmllint.c
  138. xmlmemory.c
  139. xmlmodule.c
  140. xmlreader.c
  141. xmlregexp.c
  142. xmlsave.c
  143. xmlschemas.c
  144. xmlschemastypes.c
  145. xmlstring.c
  146. xmlunicode.c
  147. xmlwriter.c
  148. xpath.c
  149. xpointer.c
  150. xzlib.c
  151. xzlib.h