6b0053a20255ca05ebe2f3cf8125c175ecc83f44 |
|
20-Feb-2014 |
Johan B. C. Engelen <j.b.c.engelen@alumnus.utwente.nl> |
Reverting r13045.
1. It contains a memleak
realpath allocates new memory if the second argument is NULL. In the added code, this memory is never freed.
2. Breaks build on Windows (realpath(...) not found)
3. Please don't add functions that use C-strings unnecessarily.
Simply rewrite parseDataUri to parseDataUri(const std::string &uri), and use C++'s string methods. ("#include <cstring.h>" is a huge red flag upon code review)
4. Please read this about "realpath"
http://insanecoding.blogspot.ch/2007/11/pathmax-simply-isnt.html |