Skip to content
Snippets Groups Projects
Commit bbee4a25 authored by James R.'s avatar James R.
Browse files

Cover edge case of WRITESTRINGN

parent d5e1c1af
No related branches found
No related tags found
Loading
......@@ -131,7 +131,7 @@ UINT8 *PutFileNeeded(UINT16 firstfile)
nameonly(strcpy(wadfilename, wadfiles[i]->filename));
// Look below at the WRITE macros to understand what these numbers mean.
if (p + 1 + 4 + strlen(wadfilename) + 1 + 16 > p_start + MAXFILENEEDED)
if (p + 1 + 4 + min(strlen(wadfilename) + 1, MAX_WADPATH) + 16 > p_start + MAXFILENEEDED)
{
// Too many files to send all at once
if (netbuffer->packettype == PT_MOREFILESNEEDED)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment