Crash related to FWordWrapper::ProcessLine()

I’m getting an inconsistent crash in when enabling word wrapping on my game’s chat widget (made with Slate). Unfortunately, I can’t reproduce it reliably. I haven’t been able to get it to crash when I have a debugger attached. But it’s happened several times during playtesting, so I’ve had to disable word wrapping on my chat widget for now.

I looked at the code that the error message is reporting on, and it does seem suspicious. It seems like it might be possible to read past the beginning of the buffer? I’m not sure exactly what’s going on there.

I can provide more details if necessary.

Hey,

Yeah, FWordWrapper::ProcessLine did have some overflow vulnerabilities. These have since been fixed, but that happened post 4.4.

As of 4.5, STextBlock no longer uses FWordWrapper anyway, so either way, the crash should be fixed.

If you want a local fix, you need the following change:
https://github.com/EpicGames/UnrealEngine/commit/f22d015b902623c8aa7c0262ec1d956be9cb37a4

Thanks.

Awesome, that’s it! Thanks