Memory stomp with PixelStreaming plugin

Hello,

When starting the editor with the PixelStreaming plugin enabled, and with -stompmalloc, we encountered a memory stomp in FAudioInput::PushAudio().

When calling FResampler::ProcessAudio(), the size of InAudioBuffer is supposed to be at least InSamples * InNumChannels, according to the code in libSampleRate in linear_vari_process()

The current code crashes when trying to read

priv->in_count = data->input_frames * state->channels ; at line 110 in src_linear.cpp because priv->in_count is twice the size of the buffer (2 channels)

Our proposed fix is https://github.com/EpicGames/UnrealEngine/pull/13165. Could you confirm this looks right?

Thanks,

Damien

Hey there Damien!

Thank you so much for your contribution, we’re just giving this fix a test and QA. We’ll keep you updated with our findings and approve the merge once it’s all clear.

Kind Regards,

Michael Wallace

Thank you for your patience Damien.

We’ve made slight changes and fixed the issue, primed and ready for 5.6.

You can see the commit here: https://github.com/EpicGames/UnrealEngine/commit/c13c2d25866bdfde651005c06c94d7e7cbfb757f

Thank you again for your contribution, this is a great find!

I’ll close off the ticket here, but if you had any further questions or need any help, please feel free to re-open, or create a new ticket.

Kind Regards,

Michael Wallace