CXMLDocument initWithXMLString crashes with empty XML string #21

Closed
JesseChisholm opened this Issue Mar 23, 2012 · 0 comments

Comments

Projects
None yet
2 participants
@JesseChisholm

If CXmlDocument initWithXMLString given a nil string will crash on line 76.

  • xmlParseDoc returns NULL
  • xmlGetLastError returns nil
  • line 76 does not test for this case, causing a nil dereference crash
    ** similar line 140 does test for this case, avoiding the crash

5minpause added a commit to 5minpause/TouchXML that referenced this issue Apr 4, 2012

5minpause added a commit to 5minpause/TouchXML that referenced this issue Apr 4, 2012

schwa added a commit that referenced this issue Apr 6, 2012

@schwa schwa closed this Apr 6, 2012

schwa added a commit that referenced this issue Aug 10, 2016

Merge branch 'master' into develop
* master:
  CXMLNode crash fix
  Fix for compiler implicit casts warning.
  Fix for tree.h include.
  Fixed wrong libxml/HTMLparser.h include
  Added travis.
  Add a target for building as a framework
  Fixed a small leak when init-ing from a url fails due to NSData instance not being loaded.
  fix enumeration of dictionary using O( N ) algo - "enumerateKeysAndObjectsUsingBlock"
  fixed header style
  added context to libxml2 parser
  missing [super dealloc]
  Refs #11 - unlink nodes before freeing. Conflicts:
  Possibile fix for Issue #21 (calling initWithXMLString: options: error: with nil)
  Possbile fix for Issue #21 (calling initWithXMLString: options: error: with nil)
  Possible fix for the #11
  Update Source/Tidy/CTidy.m
  Update Source/Tidy/CTidy.m
  Update Source/Tidy/CTidy.h
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment