Closed
Description
#include <libxml/HTMLparser.h>
#include <libxml++/libxml++.h>
#include <string>
int
main(void)
{
std::string text = "BLABLA";
xmlDoc* doc = htmlReadDoc((xmlChar*)text.c_str(), NULL, NULL, HTML_PARSE_RECOVER | HTML_PARSE_NOERROR | HTML_PARSE_NOWARNING);
// Encapsulate raw libxml document in a libxml++ wrapper
xmlpp::Document doc1(doc);
return 0;
}
compile as:
g++ -o test test.cpp
./test segfaults
Metadata
Metadata
Assignees
Labels
No labels