wav: clean up over-sized data handling
commit7da02c9fbf0ed68e61b63a4509a18d6c027c8c7c
authorMans Rullgard <mans@mansr.com>
Sat, 11 Jul 2020 12:37:55 +0000 (11 13:37 +0100)
committerMans Rullgard <mans@mansr.com>
Thu, 16 Jul 2020 12:06:05 +0000 (16 13:06 +0100)
tree0ed9fefee92ca4624273283cf6549cc6c49b5350
parent7b6a889217d62ed7e28188621403cc7542fd1f7e
wav: clean up over-sized data handling

Files with data size, total size, or sample count exceeding 4G
resulted in bizarre headers being written.  Clamp any values
exceeding 4G to UINT32_MAX without altering those that do fit.
Specifically, write a correct size when possible even if the
sample count is too large.
src/wav.c