(str_append): Check for NULL.
Showing
1 changed file
with
2 additions
and
0 deletions
... | @@ -132,6 +132,8 @@ static int str_append_n(char** to, const char* from, size_t n) | ... | @@ -132,6 +132,8 @@ 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 | if (!from) | ||
136 | return 0; | ||
135 | return str_append_n(to, from, strlen(from)); | 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) | ... | ... |
-
Please register or sign in to post a comment