All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/1] Fix libxml2 unsafe memory access
@ 2015-10-28  5:22 kai.kang
  2015-10-28  5:22 ` [PATCH 1/1] libxml2: fix " kai.kang
  0 siblings, 1 reply; 7+ messages in thread
From: kai.kang @ 2015-10-28  5:22 UTC (permalink / raw)
  To: openembedded-core

From: Kai Kang <kai.kang@windriver.com>

The patch is from:

https://bugzilla.gnome.org/show_bug.cgi?id=746048

Build image with packagegroup-core-buildessential, boot the image and compile following c code:

==================================================
#include "string.h"

#include <libxml/HTMLparser.h>
#include <libxml/HTMLtree.h>

int main(int argc, char** argv)
{
  // Nokogiri::HTML::fragment("<!-- ")

  htmlDocPtr doc ;
  int options = HTML_PARSE_RECOVER | HTML_PARSE_NOERROR | HTML_PARSE_NOWARNING | HTML_PARSE_NONET ;

  char* HTMLFRAG_GOOD = "<html><body><!-- x" ;
  char* HTMLFRAG_BAD  = "<html><body><!--" ;

  char* HTMLFRAG = HTMLFRAG_BAD ;

  xmlInitParser();

  doc = htmlReadMemory(HTMLFRAG, strlen(HTMLFRAG),
                       NULL,
                       "UTF-8",
                       options);

  xmlFreeDoc(doc);
}
==================================================

Run with valgrind, there is no warning.



The following changes since commit 8a0d8eee432924433c3e70198aaeab3161476c5f:

  toaster manual: Updated the set up and use chapter (2015-10-27 07:28:22 +0000)

are available in the git repository at:

  git://git.yoctoproject.org/poky-contrib kangkai/libxml2
  http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=kangkai/libxml2

Kai Kang (1):
  libxml2: fix unsafe memory access

 .../libxml2/libxml2-fix-unsafe-memory-access.patch | 97 ++++++++++++++++++++++
 meta/recipes-core/libxml/libxml2_2.9.2.bb          |  3 +-
 2 files changed, 99 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-core/libxml/libxml2/libxml2-fix-unsafe-memory-access.patch

-- 
2.6.1



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-10-29  1:43 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-28  5:22 [PATCH 0/1] Fix libxml2 unsafe memory access kai.kang
2015-10-28  5:22 ` [PATCH 1/1] libxml2: fix " kai.kang
2015-10-28  9:41   ` Jussi Kukkonen
2015-10-28 10:12     ` Kang Kai
2015-10-28 10:55       ` Alexander Kanavin
2015-10-28 11:15         ` Burton, Ross
2015-10-29  1:43           ` Kang Kai

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.