[sofia-sip] fix overflow in logging (tport)

[sofia-sip] bump .update
This commit is contained in:
Dragos Oancea 2020-01-16 20:33:16 +00:00 committed by Andrey Volk
parent f1c1f9085c
commit e3b1fb91c8
2 changed files with 4 additions and 2 deletions

View File

@ -1 +1 @@
Wed Dec 11 15:38:35 MST 2019 Fri Jan 17 15:37:19 UTC 2020

View File

@ -866,7 +866,9 @@ void tport_log_msg(tport_t *self, msg_t *msg,
} }
n = su_strncspn(s, end - s, "\r\n"); n = su_strncspn(s, end - s, "\r\n");
if (buffer_pos > buffer_size) {
break;
}
bytes_written = snprintf(buffer + buffer_pos, buffer_size - buffer_pos, "%.*s", (int)n, s); bytes_written = snprintf(buffer + buffer_pos, buffer_size - buffer_pos, "%.*s", (int)n, s);
if (bytes_written > 0) { if (bytes_written > 0) {
buffer_pos += bytes_written; buffer_pos += bytes_written;