# HG changeset patch # User reimar # Date 1289072233 0 # Node ID 9677da0cd9b2ab89d273810a46d4d2938206748f # Parent 5ab4633a9d4def8b1f4d9f82d621ccb4d9e6ebcc Fix dvd:// fill_buffer function to actually write into the specified buffer and check that the buffer is sufficiently large. diff -r 5ab4633a9d4d -r 9677da0cd9b2 stream/stream_dvd.c --- a/stream/stream_dvd.c Sat Nov 06 19:35:34 2010 +0000 +++ b/stream/stream_dvd.c Sat Nov 06 19:37:13 2010 +0000 @@ -415,7 +415,10 @@ 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);