[libdvdnav-devel] Fix possible buffer overflow
Petri Hintukainen
git at videolan.org
Wed May 20 21:12:05 CEST 2015
libdvdread | branch: master | Petri Hintukainen <phintuka at gmail.com> | Wed May 20 13:41:01 2015 +0300| [a0b8b3e4e1e95131430149c24c75d19fb8219087] | committer: Jean-Baptiste Kempf
Fix possible buffer overflow
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/libdvdread.git/?a=commit;h=a0b8b3e4e1e95131430149c24c75d19fb8219087
---
src/dvd_reader.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/dvd_reader.c b/src/dvd_reader.c
index cd65e7d..005d90b 100644
--- a/src/dvd_reader.c
+++ b/src/dvd_reader.c
@@ -498,8 +498,9 @@ static dvd_reader_t *DVDOpenCommon( const char *ppath,
}
if(path_copy[0] == '\0') {
- path_copy[0] = '/';
- path_copy[1] = '\0';
+ free( path_copy );
+ if( !(path_copy = strdup( "/" ) ) )
+ goto DVDOpen_error;
}
#if defined(__APPLE__)
More information about the libdvdnav-devel
mailing list