diff options
Diffstat (limited to 'src/input/mmsh.c')
-rw-r--r-- | src/input/mmsh.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/input/mmsh.c b/src/input/mmsh.c index 1f909fd5c..db3a256c2 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.9 2003/01/25 15:00:10 tmattern Exp $ + * $Id: mmsh.c,v 1.10 2003/01/31 14:06:17 miguelfreitas Exp $ * * based on mms.c and specs from avifile * (http://avifile.sourceforge.net/asf-1.0.htm) @@ -1022,10 +1022,14 @@ static int get_media_packet (mmsh_t *this) { } } -int mmsh_peek_header (mmsh_t *this, char *data) { +int mmsh_peek_header (mmsh_t *this, char *data, int maxsize) { - memcpy (data, this->asf_header, this->asf_header_len); - return this->asf_header_len; + int len; + + len = (this->asf_header_len < maxsize) ? this->asf_header_len : maxsize; + + memcpy(data, this->asf_header, len); + return len; } int mmsh_read (mmsh_t *this, char *data, int len) { |