Skip to content

Commit

Permalink
Add CVar sv_allowupload check on netchat validate
Browse files Browse the repository at this point in the history
  • Loading branch information
SergeyShorokhov committed Oct 6, 2020
1 parent 462484a commit 43f162d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rehlds/engine/net_chan.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -649,7 +649,7 @@ qboolean Netchan_Validate(netchan_t *chan, qboolean *frag_message, unsigned int
// total fragments should be <= MAX_FRAGMENTS and current fragment can't be > total fragments
if (i == FRAG_NORMAL_STREAM && FRAG_GETCOUNT(fragid[i]) > MAX_NORMAL_FRAGMENTS)
return FALSE;
if (i == FRAG_FILE_STREAM && FRAG_GETCOUNT(fragid[i]) > MAX_FILE_FRAGMENTS)
if (i == FRAG_FILE_STREAM && (!sv_allow_upload.value || FRAG_GETCOUNT(fragid[i]) > MAX_FILE_FRAGMENTS))
return FALSE;
if (FRAG_GETID(fragid[i]) > FRAG_GETCOUNT(fragid[i]))
return FALSE;
Expand Down

0 comments on commit 43f162d

Please sign in to comment.