Skip to content

String buffer overflow on ping for long Forge modlists  #15

@chloeruka

Description

@chloeruka

itzg/mc-monitor#21 has some of the context for the error.

I have a Forge modded server running Enigmatica 6 on MC 1.16.5, but it breaks on ping as FML2 server handshakes can be unpredictably long since they also ship the entire modlist for the client compatibility check. The exact error I'm speaking of originates from here:
https://github.com/Raqbit/mc-pinger/blob/9baeff22a28b666d7f564d760331c9a5df7ed61d/encoding/types.go#L135-L137

I see there's a draft to replace some of this code with a new code-gen library described in #9. I have a workaround so I'm not that bothered by this if you don't want to tackle Forge compatibility, but if you and @itzg did have an appetite to resolve this and want a hand I can try to find time to contribute if you can indicate what needs doing. It may also be worth considering if you can join forces somehow with https://github.com/xrjr/mcutils as that ping implementation does work for me in this narrow use-case (see itzg/mc-monitor#22).

Reproducing

I have some logs and a hex dump for my initial reproduction of the issue.

If I get the time this weekend I'll try to pop a more reproducable test case into the discussion.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions