From 442cfdd14ea01f8c9d494d544213b40dc696841f Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Sun, 5 Mar 2023 00:29:24 -0800 Subject: Make sure the fmt chunk is large enough --- examples/alstream.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'examples/alstream.c') diff --git a/examples/alstream.c b/examples/alstream.c index b561406c..e89481b1 100644 --- a/examples/alstream.c +++ b/examples/alstream.c @@ -185,7 +185,7 @@ static int OpenPlayerFile(StreamPlayer *player, const char *filename) /* If there's an issue getting the chunk or block alignment, load as * 16-bit and have libsndfile do the conversion. */ - if(!iter || sf_get_chunk_size(iter, &inf) != SF_ERR_NO_ERROR) + if(!iter || sf_get_chunk_size(iter, &inf) != SF_ERR_NO_ERROR || inf.datalen < 14) player->sample_type = Int16; else { -- cgit v1.2.3