[libdvdnav-devel] [PATCH 2/7] Fix possible buffer overflow

Jean-Baptiste Kempf jb at videolan.org
Wed May 20 21:13:29 CEST 2015


Applied. Thanks.

Le 20/05/2015 12:41, Petri Hintukainen a écrit :
> ---
>   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__)
>


-- 
Jean-Baptiste Kempf
http://www.jbkempf.com/ - +33 672 704 734
Sent from my Electronic Device


More information about the libdvdnav-devel mailing list