ChunkParser: Incorrect decoding of small xml files

if encoding was autodetected, in xmlParseChunk, if initial size is 86 (a
chunk in UTF-16 encoding), the code that tries to read only the first line
will set the size to 90, which eventually leads to a memmove of 90 bytes
(in xmlBufferAdd) which will copy extra random memory bytes, which will
make the parser to fail because of these extra bytes.
1 file changed
tree: 7dcba34176c062a0b5574801102274b5768580a9
  1. bakefile/
  2. doc/
  3. example/
  4. include/
  5. macos/
  6. optim/
  7. python/
  8. result/
  9. test/
  10. vms/
  11. VxWorks/
  12. win32/
  13. xstc/
  14. .cvsignore
  15. .gitignore
  16. acconfig.h
  17. acinclude.m4
  18. AUTHORS
  19. autogen.sh
  20. build_glob.py
  21. c14n.c
  22. catalog.c
  23. ChangeLog
  24. check-relaxng-test-suite.py
  25. check-relaxng-test-suite2.py
  26. check-xinclude-test-suite.py
  27. check-xml-test-suite.py
  28. check-xsddata-test-suite.py
  29. chvalid.c
  30. chvalid.def
  31. config.h.in
  32. configure.in
  33. Copyright
  34. dbgen.pl
  35. dbgenattr.pl
  36. debugXML.c
  37. dict.c
  38. DOCBparser.c
  39. elfgcchack.h
  40. encoding.c
  41. entities.c
  42. error.c
  43. genChRanges.py
  44. gentest.py
  45. genUnicode.py
  46. global.data
  47. globals.c
  48. HACKING
  49. hash.c
  50. HTMLparser.c
  51. HTMLtree.c
  52. INSTALL
  53. install-sh
  54. INSTALL.libxml2
  55. legacy.c
  56. libxml-2.0-uninstalled.pc.in
  57. libxml-2.0.pc.in
  58. libxml.3
  59. libxml.h
  60. libxml.m4
  61. libxml.spec.in
  62. libxml2.doap
  63. libxml2.syms
  64. list.c
  65. MAINTAINERS
  66. Makefile.am
  67. Makefile.tests
  68. Makefile.win
  69. missing
  70. mkinstalldirs
  71. nanoftp.c
  72. nanohttp.c
  73. NEWS
  74. parser.c
  75. parserInternals.c
  76. pattern.c
  77. README
  78. README.cvs-commits
  79. README.tests
  80. regressions.py
  81. regressions.xml
  82. relaxng.c
  83. rngparser.c
  84. runsuite.c
  85. runtest.c
  86. runxmlconf.c
  87. SAX.c
  88. SAX2.c
  89. schematron.c
  90. testapi.c
  91. testAutomata.c
  92. testC14N.c
  93. testchar.c
  94. testdict.c
  95. testdso.c
  96. testHTML.c
  97. testModule.c
  98. testOOM.c
  99. testOOMlib.c
  100. testOOMlib.h
  101. testReader.c
  102. testrecurse.c
  103. testRegexp.c
  104. testRelax.c
  105. testSAX.c
  106. testSchemas.c
  107. testThreads.c
  108. testThreadsWin32.c
  109. testURI.c
  110. testXPath.c
  111. threads.c
  112. TODO
  113. TODO_SCHEMAS
  114. tree.c
  115. trio.c
  116. trio.h
  117. triodef.h
  118. trionan.c
  119. trionan.h
  120. triop.h
  121. triostr.c
  122. triostr.h
  123. uri.c
  124. valid.c
  125. xinclude.c
  126. xlink.c
  127. xml2-config.1
  128. xml2-config.in
  129. xml2Conf.sh.in
  130. xmlcatalog.c
  131. xmlIO.c
  132. xmllint.c
  133. xmlmemory.c
  134. xmlmodule.c
  135. xmlreader.c
  136. xmlregexp.c
  137. xmlsave.c
  138. xmlschemas.c
  139. xmlschemastypes.c
  140. xmlstring.c
  141. xmlunicode.c
  142. xmlwriter.c
  143. xpath.c
  144. xpointer.c