diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/inputPlugins/mp4_plugin.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/inputPlugins/mp4_plugin.c b/src/inputPlugins/mp4_plugin.c index cc2b89efc..1e65f6667 100644 --- a/src/inputPlugins/mp4_plugin.c +++ b/src/inputPlugins/mp4_plugin.c @@ -171,6 +171,13 @@ static int mp4_decode(InputStream * inStream) dc.total_time = ((float)file_time) / scale; numSamples = mp4ff_num_samples(mp4fh, track); + if (numSamples > (long)(INT_MAX / sizeof(float))) { + ERROR("Integer overflow.\n"); + faacDecClose(decoder); + mp4ff_close(mp4fh); + free(mp4cb); + return -1; + } file_time = 0.0; |