1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-20 19:02:41 +01:00
Files
OpenTTD/src
rubidium42 f00564eeb2 Fix: String validation could leave invalid Utf8 encoded strings (#9096)
In case a character was encoded in multiple bytes, but required fewer bytes to be encoded, the first byte would be copied to the output leaving an invalid Utf8 encoded string. Later uses of the validated string would use the same decode logic, which would yield a question mark and just read a single byte, so nothing dangerous happened.
Furthermore, because the next byte would not be a first byte of an encoded Utf8 character, the last few valid characters could be removed by the validation as well.
2021-04-29 23:16:41 +01:00
..
2021-03-14 20:47:31 +01:00
2021-04-29 17:52:22 +00:00
2021-04-04 08:01:54 +01:00
2021-03-01 21:56:26 +00:00
2021-03-01 21:56:26 +00:00
2021-04-22 22:57:00 +02:00