From: Göran Jönsson Date: Thu, 27 Jun 2019 06:04:07 +0000 (+0200) Subject: rtpsconnection: Fix number of n_vectors X-Git-Tag: 1.19.3~511^2~1010 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=35f2ea21e6a483c67027e7f1e2e67612f6707ba7;p=platform%2Fupstream%2Fgstreamer.git rtpsconnection: Fix number of n_vectors Body_offset mean that so much data have been written. Without this patch n_vectors somtimes becomes one more than it should and then there will be an vector that have a random size causing writev_bytes to cause a "Bad address" error. --- diff --git a/gst-libs/gst/rtsp/gstrtspconnection.c b/gst-libs/gst/rtsp/gstrtspconnection.c index fd4262f..4ec5d72 100644 --- a/gst-libs/gst/rtsp/gstrtspconnection.c +++ b/gst-libs/gst/rtsp/gstrtspconnection.c @@ -3905,7 +3905,7 @@ gst_rtsp_source_dispatch_write (GPollableOutputStream * stream, GstMemory *mem = gst_buffer_peek_memory (msg->body_buffer, m); /* Skip all memories we already wrote */ - if (offset + mem->size < msg->body_offset) { + if (offset + mem->size <= msg->body_offset) { offset += mem->size; continue; }