Skip to content

Commit

Permalink
DVDReadBytes(): Check that requested size fits in ssize_t
Browse files Browse the repository at this point in the history
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
  • Loading branch information
hpi1 authored and jbkempf committed Sep 9, 2015
1 parent 1d4a5ce commit 752bbae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/dvd_reader.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 752bbae

Please sign in to comment.