diff options
Diffstat (limited to '')
-rw-r--r-- | src/lib.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -84,6 +84,7 @@ void printNode (xmlNodePtr node, void * data) { #define gnu_code_start \ _Pragma ("GCC diagnostic push") \ _Pragma ("GCC diagnostic ignored \"-Wpedantic\"") + _Pragma ("GCC diagnostic ignored \"-Wformat=\"") #define gnu_code_end \ _Pragma ("GCC diagnostic pop") /* this is the definition of the anonymous function - source: https://en.wikipedia.org/wiki/Anonymous_function#GCC */ @@ -94,6 +95,8 @@ void printNode (xmlNodePtr node, void * data) { &l_anonymous_functions_name; \ }) char * htmlspecialchars (const char * i) { /* remember to free the output */ + if (!i) + return NULL; size_t s = 128; char * o = malloc(s); size_t w = 0; |