Commits

Shlomi Fish committed b3dcffa

Add a patch for ctxt being null.

  • Participants
  • Parent commits 5f36ba5

Comments (0)

Files changed (2)

 Revision history for Perl extension XML::LibXML
 
+    - Patch to a potential NULL dereference in xpath.c.
+        - Thanks to Ville Skyttä <ville.skytta@iki.fi> and cppcheck.
+
 2.0002          Sun Jul  8 18:09:13 IDT 2012
     - Applied spelling fixes correction patch by
     Ville Skyttä <ville.skytta@iki.fi>.
 xmlXPathObjectPtr
 domXPathCompFindCtxt( xmlXPathContextPtr ctxt, xmlXPathCompExprPtr comp, int to_bool ) {
     xmlXPathObjectPtr res = NULL;
-    if ( comp != NULL && ctxt->node != NULL && comp != NULL ) {
+    if ( ctxt != NULL && ctxt->node != NULL && comp != NULL ) {
         xmlDocPtr tdoc = NULL;
         xmlNodePtr froot = ctxt->node;