justdan96 / tsMuxer

tsMuxer is a transport stream muxer for remuxing/muxing elementary streams, EVO/VOB/MPG, MKV/MKA, MP4/MOV, TS, M2TS to TS to M2TS. Supported video codecs H.264/AVC, H.265/HEVC, VC-1, MPEG2. Supported audio codecs AAC, AC3 / E-AC3(DD+), DTS/ DTS-HD.
Apache License 2.0
853 stars 144 forks source link

Fix off-by-one error in GraphicsPath::AddString() call #601

Closed lighterowl closed 2 years ago

lighterowl commented 2 years ago

AddString's documentation clearly says that its second parameter is supposed to be the number of characters to display. Since the vector returned by toWide() is always null-terminated and the termination character is included in its size(), this resulted in AddString() treating the termination character as something it is supposed to actually draw.

Perhaps some versions of AddString() explicitly stop at the termination character and don't process any further characters : this is probably why this issue has gone unnoticed for so long.

Fixes #598