~ubuntu-branches/ubuntu/precise/libxslt/precise-updates

« back to all changes in this revision

Viewing changes to libxslt/functions.c

  • Committer: Package Import Robot
  • Author(s): Marc Deslauriers
  • Date: 2012-09-28 15:13:38 UTC
  • mfrom: (28.1.1 precise-proposed)
  • Revision ID: package-import@ubuntu.com-20120928151338-yfhkskiueudfqcl0
Tags: 1.1.26-8ubuntu1.2
* SECURITY UPDATE: denial of service via out-of-bounds read
  - libxslt/pattern.c: fix improper loop exit.
  - fe5a4fa33eb85bce3253ed3742b1ea6c4b59b41b
  - CVE-2011-3970
* SECURITY UPDATE: denial of service via out-of-bounds read
  - libxslt/xsltutils.h: check for XML_ELEMENT_NODE
  - e6a0bc8081271f33b9899eb78e1da1a2a0428419
  - CVE-2012-2825
* SECURITY UPDATE: denial of service via crafted XSLT expression
  - harden code in libexslt/functions.c, libxslt/attributes.c,
    libxslt/functions.c, libxslt/pattern.c, libxslt/preproc.c,
    libxslt/templates.c, libxslt/transform.c, libxslt/variables.c,
    libxslt/xslt.c, libxslt/xsltutils.c.
  - 8566ab4a10158d195adb5f1f61afe1ee8bfebd12
  - 4da0f7e207f14a03daad4663865c285eb27f93e9
  - 24653072221e76d2f1f06aa71225229b532f8946
  - 1564b30e994602a95863d9716be83612580a2fed
  - CVE-2012-2870
* SECURITY UPDATE: denial of service and possible code execution during
  handling of XSL transforms
  - libxslt/transform.c: check for XML_NAMESPACE_DECL
  - 937ba2a3eb42d288f53c8adc211bd1122869f0bf
  - CVE-2012-2871
* SECURITY UPDATE: denial of service and possible code execution via
  double free during XSL transforms
  - libxslt/templates.c: Fix dictionary string usage
  - 54977ed7966847e305a2008cb18892df26eeb065
  - CVE-2012-2893

Show diffs side-by-side

added added

removed removed

Lines of Context:
654
654
void
655
655
xsltGenerateIdFunction(xmlXPathParserContextPtr ctxt, int nargs){
656
656
    xmlNodePtr cur = NULL;
 
657
    xmlXPathObjectPtr obj = NULL;
657
658
    long val;
658
659
    xmlChar str[30];
659
660
    xmlDocPtr doc;
661
662
    if (nargs == 0) {
662
663
        cur = ctxt->context->node;
663
664
    } else if (nargs == 1) {
664
 
        xmlXPathObjectPtr obj;
665
665
        xmlNodeSetPtr nodelist;
666
666
        int i, ret;
667
667
 
684
684
            if (ret == -1)
685
685
                cur = nodelist->nodeTab[i];
686
686
        }
687
 
        xmlXPathFreeObject(obj);
688
687
    } else {
689
688
        xsltTransformError(xsltXPathGetTransformContext(ctxt), NULL, NULL,
690
689
                "generate-id() : invalid number of args %d\n", nargs);
707
706
 
708
707
    }
709
708
 
 
709
    if (obj)
 
710
        xmlXPathFreeObject(obj);
 
711
 
710
712
    val = (long)((char *)cur - (char *)doc);
711
713
    if (val >= 0) {
712
714
      sprintf((char *)str, "idp%ld", val);