mirror of
https://github.com/claunia/flac.git
synced 2025-12-16 18:54:26 +00:00
metadata_object.c: Remove un-needed asserts
These asserts were being triggered by AFL (American Fuzzy Lop) and serve seemingly no useful purpose. The are only enabled in debug builds where they abort the program which is otherwise in a safe state. Removing these asserts will potentially allow AFL to turn up other problems elsewhere.
This commit is contained in:
@@ -73,8 +73,6 @@ static FLAC__bool copy_bytes_(FLAC__byte **to, const FLAC__byte *from, unsigned
|
||||
*to = x;
|
||||
}
|
||||
else {
|
||||
FLAC__ASSERT(0 == from);
|
||||
FLAC__ASSERT(bytes == 0);
|
||||
*to = 0;
|
||||
}
|
||||
return true;
|
||||
@@ -567,11 +565,9 @@ FLAC_API FLAC__StreamMetadata *FLAC__metadata_object_clone(const FLAC__StreamMet
|
||||
return 0;
|
||||
}
|
||||
if(object->data.vorbis_comment.num_comments == 0) {
|
||||
FLAC__ASSERT(0 == object->data.vorbis_comment.comments);
|
||||
to->data.vorbis_comment.comments = 0;
|
||||
}
|
||||
else {
|
||||
FLAC__ASSERT(0 != object->data.vorbis_comment.comments);
|
||||
to->data.vorbis_comment.comments = vorbiscomment_entry_array_copy_(object->data.vorbis_comment.comments, object->data.vorbis_comment.num_comments);
|
||||
if(0 == to->data.vorbis_comment.comments) {
|
||||
to->data.vorbis_comment.num_comments = 0;
|
||||
|
||||
Reference in New Issue
Block a user