Commit 3662b9c4 3662b9c4747962ceabef9300da095f7e63b758be by Sergey Poznyakoff

(str_append): Check for NULL.

1 parent 5dac9802
...@@ -132,7 +132,9 @@ static int str_append_n(char** to, const char* from, size_t n) ...@@ -132,7 +132,9 @@ static int str_append_n(char** to, const char* from, size_t n)
132 } 132 }
133 static int str_append(char** to, const char* from) 133 static int str_append(char** to, const char* from)
134 { 134 {
135 return str_append_n(to, from, strlen(from)); 135 if (!from)
136 return 0;
137 return str_append_n(to, from, strlen(from));
136 } 138 }
137 static int str_append_char(char** to, char c) 139 static int str_append_char(char** to, char c)
138 { 140 {
......