File 0001-Patch-1-Fixes-heap-buffer-overflow-in-_osip_message_to_str.patch of Package libosip2.4662

--- src/osipparser2/osip_message_to_str.c
+++ src/osipparser2/osip_message_to_str.c
@@ -464,6 +464,13 @@
 
 		/* A start-line isn't required for message/sipfrag parts. */
 	} else {
+		size_t message_len = strlen(tmp);
+		if (_osip_message_realloc (&message, dest, message_len + 3, &malloc_size) < 0) {
+			osip_free (tmp);
+			*dest = NULL;
+			return OSIP_NOMEM;
+		}
+
 		message = osip_str_append(message, tmp);
 		osip_free(tmp);
 		message = osip_strn_append(message, CRLF, 2);
openSUSE Build Service is sponsored by