shithub: mp3dec

Download patch

ref: a50256232900935021e1a854418edcb7f8b4ae51
parent: 50ed51d544e2d5100d45eabd2d92d50137eb13c7
author: lieff <[email protected]>
date: Fri Aug 21 16:41:02 EDT 2020

test: add additional invalid param case for mp3dec_ex_read_frame

--- a/minimp3_test.c
+++ b/minimp3_test.c
@@ -534,6 +534,8 @@
     ASSERT(0 == ret); /* invalid param case, no decoder structure to report an error */
     ret = mp3dec_ex_read(&dec, 0, 10);
     ASSERT(0 == ret && MP3D_E_PARAM == dec.last_error); /* invalid param case */
+    ret = mp3dec_ex_read_frame(0, (mp3d_sample_t**)buf, 10);
+    ASSERT(0 == ret); /* invalid param case, no decoder structure to report an error */
     ret = mp3dec_ex_read_frame(&dec, 0, 10);
     ASSERT(0 == ret && MP3D_E_PARAM == dec.last_error); /* invalid param case */