From ba6e40bee872673f4af4e32836d633b28e634997 Mon Sep 17 00:00:00 2001 From: Matthias Drochner Date: Wed, 21 Jul 2010 15:10:23 +0000 Subject: Advance buffer pointer after read In dvd_input.c:file_read(), if the read is not done in a single access, the buffer pointer doesn't get advanced so that the second read overwrites the data of the first. I actually don't remember under which circumstances this could happen, but the flaw in the code is obvious. The patch is from NetBSD's pkgsrc, and this patch is attributed to an "unnamed contributor" in the CVS log. --- src/input/libdvdnav/dvd_input.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/input/libdvdnav/dvd_input.c b/src/input/libdvdnav/dvd_input.c index 7b35f5eef..8eea51412 100644 --- a/src/input/libdvdnav/dvd_input.c +++ b/src/input/libdvdnav/dvd_input.c @@ -319,6 +319,7 @@ static int file_read(dvd_input_t dev, void *buffer, int blocks, int flags) return (int) (bytes / DVD_VIDEO_LB_LEN); } + buffer += ret; len -= ret; } -- cgit v1.2.3