Skip to content

Commit

Permalink
don't overwrite an element with Void if Void can't be written
Browse files Browse the repository at this point in the history
The head would not render anyway, so we should return a proper error.
  • Loading branch information
robUx4 committed Feb 18, 2024
1 parent 7d5d83d commit cd29958
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/EbmlVoid.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,10 @@ std::uint64_t EbmlVoid::Overwrite(const EbmlElement & EltToVoid, IOCallback & ou
// the element can't be written here !
return 0;
}
if (!CanWrite(writeFilter)) {
// Void is filtered out, we can't write it
return 0;
}

const std::uint64_t CurrentPosition = output.getFilePointer();

Expand Down

0 comments on commit cd29958

Please sign in to comment.