shithub: choc

Download patch

ref: 8b6cfbfc6c934923b3c2c16e5e7e5a74d5d238e1
parent: 27b06c5711ad73900f01727b335aef5e8049be84
parent: 54fb12eeaa7d527defbe65e7e00e37d5feb7c597
author: Simon Howard <fraggle@soulsphere.org>
date: Wed Jun 24 18:52:19 EDT 2020

Merge pull request #1295 from chocolate-doom/CVE-2020-14983

CVE-2020-14983

--- a/src/d_loop.c
+++ b/src/d_loop.c
@@ -413,6 +413,11 @@
     ticdup = settings->ticdup;
     new_sync = settings->new_sync;
 
+    if (ticdup < 1)
+    {
+        I_Error("D_StartNetGame: invalid ticdup value (%d)", ticdup);
+    }
+
     // TODO: Message disabled until we fix new_sync.
     //if (!new_sync)
     //{
--- a/src/net_structrw.c
+++ b/src/net_structrw.c
@@ -116,7 +116,7 @@
         return false;
     }
 
-    for (i = 0; i < settings->num_players; ++i)
+    for (i = 0; i < settings->num_players && i < NET_MAXPLAYERS; ++i)
     {
         if (!NET_ReadInt8(packet,
                           (unsigned int *) &settings->player_classes[i]))