Le 1 novembre 2026 02:03:30 GMT+01:00, Pavel Sanda <[email protected]> a écrit :
>On Mon, Sep 28, 2026 at 10:14:16PM +0200, Pavel Sanda wrote:
>> I'll keep posting next pacthes for various issues, but should not
>
>Ok, the next one is sort of DOS - we crash on malformed .lyx input.
>
>Essentially, when parsing header the code assumes every " has it's ending " 
>counterpart,
>but if the .lyx is malformed and EOF is encountered instead of ending " we 
>might crash.
>
>The code uncoditionally resizes the token to strip the ending " which is dead
>end for an empty string. In case of non empty string we eat one last character
>(which is acceptable for malformed input).
>
>Minimal reproducer:
>"\r
>
>The first hunk fixes the crash. The second hunk is just safety measure, it 
>should
>not be possible to reach, but it's the same unsafe construct and the context 
>code
>could change one day.
>
>Pavel

Looks pretty good.

JMarc
-- 
lyx-devel mailing list
[email protected]
https://lists.lyx.org/mailman/listinfo/lyx-devel

Reply via email to