diff options
| author | Thibaut Mattern <tmattern@users.sourceforge.net> | 2003-12-05 22:31:41 +0000 | 
|---|---|---|
| committer | Thibaut Mattern <tmattern@users.sourceforge.net> | 2003-12-05 22:31:41 +0000 | 
| commit | 580c90297688e095c131f8077f3e78c2b04f08d2 (patch) | |
| tree | 48a0bd2d48bcbd3baf818f53b8cdda7cabce4719 /src | |
| parent | ee0e935bfc25d295d7895c47924d008760b009d5 (diff) | |
| download | xine-lib-580c90297688e095c131f8077f3e78c2b04f08d2.tar.gz xine-lib-580c90297688e095c131f8077f3e78c2b04f08d2.tar.bz2 | |
Should the segfault with the "save" input plugin.
CVS patchset: 5847
CVS date: 2003/12/05 22:31:41
Diffstat (limited to 'src')
| -rw-r--r-- | src/input/mms.c | 12 | ||||
| -rw-r--r-- | src/input/mmsh.c | 15 | 
2 files changed, 10 insertions, 17 deletions
| diff --git a/src/input/mms.c b/src/input/mms.c index 0dac66f88..57bfd19de 100644 --- a/src/input/mms.c +++ b/src/input/mms.c @@ -17,7 +17,7 @@   * along with this program; if not, write to the Free Software   * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA   * - * $Id: mms.c,v 1.37 2003/12/04 21:48:36 tmattern Exp $ + * $Id: mms.c,v 1.38 2003/12/05 22:31:41 tmattern Exp $   *   * MMS over TCP protocol   *   based on work from major mms @@ -1138,7 +1138,7 @@ int mms_read (mms_t *this, char *data, int len) {        else          n = bytes_left; -      memcpy (&data[total], &this->asf_header[this->asf_header_read], n); +      xine_fast_memcpy (&data[total], &this->asf_header[this->asf_header_read], n);        this->asf_header_read += n;        total += n; @@ -1157,20 +1157,18 @@ int mms_read (mms_t *this, char *data, int len) {          bytes_left = this->buf_size;        } -      if (len <= bytes_left) -        n = len; +      if ((len - total) < bytes_left) +        n = len - total;        else          n = bytes_left; -      memcpy (&data[total], &this->buf[this->buf_read], n); +      xine_fast_memcpy (&data[total], &this->buf[this->buf_read], n);        this->buf_read += n;        total += n;      }    } -    return total; -  } diff --git a/src/input/mmsh.c b/src/input/mmsh.c index f1c06da2e..1cb6308f6 100644 --- a/src/input/mmsh.c +++ b/src/input/mmsh.c @@ -17,7 +17,7 @@   * along with this program; if not, write to the Free Software   * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA   * - * $Id: mmsh.c,v 1.24 2003/12/05 15:54:58 f1rmb Exp $ + * $Id: mmsh.c,v 1.25 2003/12/05 22:31:41 tmattern Exp $   *   * MMS over HTTP protocol   *   written by Thibaut Mattern @@ -880,7 +880,7 @@ int mmsh_read (mmsh_t *this, char *data, int len) {        else  	n = bytes_left; -      memcpy (&data[total], &this->asf_header[this->asf_header_read], n); +      xine_fast_memcpy (&data[total], &this->asf_header[this->asf_header_read], n);        this->asf_header_read += n;        total += n; @@ -890,10 +890,8 @@ int mmsh_read (mmsh_t *this, char *data, int len) {        bytes_left = this->buf_size - this->buf_read; -      while (!bytes_left) { -	 +      if (bytes_left == 0) {  	this->buf_read = 0; -  	if (!get_media_packet (this)) {            xprintf (this->stream->xine, XINE_VERBOSITY_LOG,  	           "libmmsh: get_media_packet failed\n"); @@ -901,22 +899,19 @@ int mmsh_read (mmsh_t *this, char *data, int len) {  	}  	bytes_left = this->buf_size;        } -       -      if ((len-total)<bytes_left) +      if ((len-total) < bytes_left)  	n = len-total;        else  	n = bytes_left; -      memcpy (&data[total], &this->buf[this->buf_read], n); +      xine_fast_memcpy (&data[total], &this->buf[this->buf_read], n);        this->buf_read += n;        total += n;      }    } -    return total; -  } | 
