Be a bit more defensive here just in case the wav header has invalid data.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31006 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
6b9846f69d
commit
e47b453ffd
@ -302,7 +302,7 @@ WavReader::Sniff(int32 *streamCount)
|
||||
|
||||
fMetaData.extra_size = format.extra_size;
|
||||
if (fMetaData.extra_size > 0) {
|
||||
memcpy(fMetaData.extra_data, format.extra_data, format.extra_size);
|
||||
memcpy(fMetaData.extra_data, format.extra_data, min_c(format.extra_size, sizeof(format.extra_data)));
|
||||
}
|
||||
fMetaData.channels = UINT16(format.channels);
|
||||
fMetaData.samples_per_sec = UINT32(format.samples_per_sec);
|
||||
|
Loading…
Reference in New Issue
Block a user