You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When calling opus_decode with a bad value (too large) argument frame_size, the ALLOC(out, frame_size*st->channels, float); is requesting a large stack allocation (stack overflow), if it doesn't go into the branch frame_size = IMIN(frame_size, nb_samples) before to limit the frame_size in https://github.com/xiph/opus/blob/v1.5.1/src/opus_decoder.c#L875.
Hi!
We're testing with Opus APIs and want to suggest a potential fix in
opus_decode
for limiting a stack allocation requestALLOC
.Its argument
frame_size
is passed intoALLOC
(https://github.com/xiph/opus/blob/v1.5.1/src/opus_decoder.c#L884) and maybe there could be a check before the stack allocation (if it doesn't enter line https://github.com/xiph/opus/blob/v1.5.1/src/opus_decoder.c#L875) so that it wouldn't accept any bad value and having undefined behaviors?The text was updated successfully, but these errors were encountered: