diff options
author | Koop Mast <kwm@FreeBSD.org> | 2012-05-18 11:51:18 +0000 |
---|---|---|
committer | Koop Mast <kwm@FreeBSD.org> | 2012-05-18 11:51:18 +0000 |
commit | b7e1fac56a7003a79034be336d51e12fb264b7b5 (patch) | |
tree | f912ba333a0456172366a9196ead6f964beb7ee9 /textproc/libxml2/files | |
parent | - Remove unneeded USE_SOLR line (diff) |
Document and fix a off-by-one vulnability in libxml2.
Obtained from: libxml upstream
Security: b8ae4659-a0da-11e1-a294-bcaec565249c
Notes
Notes:
svn path=/head/; revision=296901
Diffstat (limited to 'textproc/libxml2/files')
-rw-r--r-- | textproc/libxml2/files/patch-xpointer.c | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/textproc/libxml2/files/patch-xpointer.c b/textproc/libxml2/files/patch-xpointer.c new file mode 100644 index 000000000000..877ea2a7d920 --- /dev/null +++ b/textproc/libxml2/files/patch-xpointer.c @@ -0,0 +1,41 @@ +From d8e1faeaa99c7a7c07af01c1c72de352eb590a3e Mon Sep 17 00:00:00 2001 +From: Jüri Aedla <asd@ut.ee> +Date: Mon, 07 May 2012 07:06:56 +0000 +Subject: Fix an off by one pointer access + +getting out of the range of memory allocated for xpointer decoding +CVE-2011-3102 + +--- +diff --git a/xpointer.c b/xpointer.c +index 37afa3a..0b463dd 100644 +--- xpointer.c ++++ xpointer.c +@@ -1007,21 +1007,14 @@ xmlXPtrEvalXPtrPart(xmlXPathParserContextPtr ctxt, xmlChar *name) { + NEXT; + break; + } +- *cur++ = CUR; + } else if (CUR == '(') { + level++; +- *cur++ = CUR; + } else if (CUR == '^') { +- NEXT; +- if ((CUR == ')') || (CUR == '(') || (CUR == '^')) { +- *cur++ = CUR; +- } else { +- *cur++ = '^'; +- *cur++ = CUR; +- } +- } else { +- *cur++ = CUR; ++ if ((NXT(1) == ')') || (NXT(1) == '(') || (NXT(1) == '^')) { ++ NEXT; ++ } + } ++ *cur++ = CUR; + NEXT; + } + *cur = 0; +-- +cgit v0.9.0.2 |