Commit a70fcdd6 authored by Erik de Castro Lopo's avatar Erik de Castro Lopo

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.
parent 9949ce15
......@@ -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;
......
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