stklieme/HTMLDocument — pull request #2 by samalone (2013-03-13 09:20:57+00:00)
Title: Memory and static analyzer fixes

I have a few fixes for HTMLDocument for your consideration.

The changes to HTMLDocument.m fix two problems:

* convertStringEncoding could return NULL if CFStringGetCStringPtr returned NULL
* 2 initWithData: methods assumed the data was null-terminated

I discovered both of these problems using the "Enable Scribble" and "Enable Guard Edges" debugger settings while tracking down bugs in my own code.

I also added a couple of NULL checks to HTMLNode.m just to make the clang static analyzer happy.