Skip to content

Commit c760fc1

Browse files
committed
Add Sanity Checks for setting the read size
* Does not allow read sizes < 1 * Does not allow read sizes above chunk sizes
1 parent b72cec1 commit c760fc1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/vorbisfile.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1913,7 +1913,7 @@ vorbis_comment *ov_comment(OggVorbis_File *vf,int link){
19131913
}
19141914

19151915
void ov_set_read_size(OggVorbis_File *vf,int read_size) {
1916-
vf->read_size = read_size;
1916+
vf->read_size = MAX(1, MIN(read_size, CHUNKSIZE));
19171917
}
19181918

19191919
static int host_is_big_endian() {

0 commit comments

Comments
 (0)