Fix crash when parsing FLAC header

This commit is contained in:
Martchus 2022-05-23 19:55:32 +02:00
parent b27c82ef8c
commit e40c1901e1
1 changed files with 1 additions and 1 deletions

View File

@ -192,7 +192,7 @@ std::streamoff FlacStream::makeHeader(ostream &outputStream, Diagnostics &diag)
do {
// parse block header
originalStream.read(copy.buffer(), 4);
header.parseHeader(copy.buffer());
header.parseHeader(std::string_view(copy.buffer(), 4));
// skip/copy block
switch (static_cast<FlacMetaDataBlockType>(header.type())) {