metadata_iterators.c: Add missing check for is_writable
Patch-from: lvqcl <lvqcl.mail@gmail.com>
This commit is contained in:
parent
cd567f7dcb
commit
4684608fb1
@ -837,6 +837,11 @@ FLAC_API FLAC__bool FLAC__metadata_simple_iterator_delete_block(FLAC__Metadata_S
|
||||
FLAC__ASSERT_DECLARATION(FLAC__off_t debug_target_offset = iterator->offset[iterator->depth];)
|
||||
FLAC__bool ret;
|
||||
|
||||
if(!iterator->is_writable) {
|
||||
iterator->status = FLAC__METADATA_SIMPLE_ITERATOR_STATUS_NOT_WRITABLE;
|
||||
return false;
|
||||
}
|
||||
|
||||
if(iterator->type == FLAC__METADATA_TYPE_STREAMINFO) {
|
||||
iterator->status = FLAC__METADATA_SIMPLE_ITERATOR_STATUS_ILLEGAL_INPUT;
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user