diff options
author | Matthias Drochner <m.drochner@fz-juelich.de> | 2010-07-21 15:10:23 +0000 |
---|---|---|
committer | Matthias Drochner <m.drochner@fz-juelich.de> | 2010-07-21 15:10:23 +0000 |
commit | ba6e40bee872673f4af4e32836d633b28e634997 (patch) | |
tree | 98884b71c4114be4dbdfa667c0af4e94b863f6dd | |
parent | 06d09abeaa81336476845e1cc5db2a474ceaa9ad (diff) | |
download | xine-lib-ba6e40bee872673f4af4e32836d633b28e634997.tar.gz xine-lib-ba6e40bee872673f4af4e32836d633b28e634997.tar.bz2 |
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.
-rw-r--r-- | src/input/libdvdnav/dvd_input.c | 1 |
1 files changed, 1 insertions, 0 deletions
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; } |