vendor/libgit2/src/message.c in rugged-1.1.1 vs vendor/libgit2/src/message.c in rugged-1.2.0

- old
+ new

@@ -26,11 +26,13 @@ const size_t message_len = strlen(message); int consecutive_empty_lines = 0; size_t i, line_length, rtrimmed_line_length; char *next_newline; + int error; - git_buf_sanitize(message_out); + if ((error = git_buf_sanitize(message_out)) < 0) + return error; for (i = 0; i < strlen(message); i += line_length) { next_newline = memchr(message + i, '\n', message_len - i); if (next_newline != NULL) {