[MPlayer-cvslog] r32592 - trunk/stream/stream_dvd.c

reimar subversion at mplayerhq.hu
Sat Nov 6 20:37:13 CET 2010


Author: reimar
Date: Sat Nov  6 20:37:13 2010
New Revision: 32592

Log:
Fix dvd:// fill_buffer function to actually write into the specified
buffer and check that the buffer is sufficiently large.

Modified:
   trunk/stream/stream_dvd.c

Modified: trunk/stream/stream_dvd.c
==============================================================================
--- trunk/stream/stream_dvd.c	Sat Nov  6 20:35:34 2010	(r32591)
+++ trunk/stream/stream_dvd.c	Sat Nov  6 20:37:13 2010	(r32592)
@@ -415,7 +415,10 @@ static void dvd_close(dvd_priv_t *d)
 
 static int fill_buffer(stream_t *s, char *buf, int len)
 {
-    off_t pos=dvd_read_sector(s->priv,s->buffer);
+  off_t pos;
+  if (len < 2048)
+    return -1;
+  pos = dvd_read_sector(s->priv, buf);
   if (pos < 0)
     return -1;
   s->pos = 2048*(pos - 1);


More information about the MPlayer-cvslog mailing list