Fix remaining network message overflows#1935
Open
VReaperV wants to merge 1 commit intofor-0.56.0/syncfrom
Open
Fix remaining network message overflows#1935VReaperV wants to merge 1 commit intofor-0.56.0/syncfrom
VReaperV wants to merge 1 commit intofor-0.56.0/syncfrom
Conversation
slipher
reviewed
Mar 17, 2026
| MSG_WriteShort( &buf, i ); | ||
| MSG_WriteBigString( &buf, cl.gameState[i].c_str() ); | ||
|
|
||
| if ( MAX_MSGLEN - buf.cursize < 128 ) { |
Member
There was a problem hiding this comment.
A configstring can be up to 8k so this isn't enough to guarantee there is space
| MSG_WriteLong( msg, i ); | ||
| MSG_WriteString( msg, client->reliableCommands[ i & ( MAX_RELIABLE_COMMANDS - 1 ) ] ); | ||
|
|
||
| if ( MAX_MSGLEN - msg->cursize < 128 ) { |
Member
There was a problem hiding this comment.
I think commands could be longer than 128 bytes.
| MSG_WriteShort( &msg, start ); | ||
| MSG_WriteBigString( &msg, sv.configstrings[ start ] ); | ||
|
|
||
| if ( MAX_MSGLEN - msg.cursize < 128 ) { |
Member
There was a problem hiding this comment.
A configstring can be up to 8k so this isn't enough to guarantee there is space
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Same as #1427 but works for snapshots and a few other things too. Can be tested on
plat23with layout https://users.unvanquished.net/~reaper/maps/layouts/plat23/test.dat - build an armoury near the eggs and spam firebombs at them. On 0.56 this causes a crash, on this branch there's no crash (albeit it results in some rubber-banding while there's still a lot of fire, but it's better than crashing).