Commit 752bbae6 authored by Petri Hintukainen's avatar Petri Hintukainen Committed by Jean-Baptiste Kempf

DVDReadBytes(): Check that requested size fits in ssize_t

Signed-off-by: Jean-Baptiste Kempf's avatarJean-Baptiste Kempf <jb@videolan.org>
parent 1d4a5cee
......@@ -1354,7 +1354,7 @@ ssize_t DVDReadBytes( dvd_file_t *dvd_file, void *data, size_t byte_size )
int ret;
/* Check arguments. */
if( dvd_file == NULL || data == NULL )
if( dvd_file == NULL || data == NULL || (ssize_t)byte_size < 0 )
return -1;
seek_sector = dvd_file->seek_pos / DVD_VIDEO_LB_LEN;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment