]> de.git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
one more input underrun check in pvs decompression
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 21 Oct 2003 11:34:57 +0000 (11:34 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 21 Oct 2003 11:34:57 +0000 (11:34 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@3593 d7cf8633-e32d-0410-b094-e92efae38249

model_brush.c

index e927d009b90d0442b4029699aee9cbe15d91da46..1a66eae7854786ee9d383e4b4d3c22415fa83b26 100644 (file)
@@ -709,6 +709,11 @@ static void Mod_Q1BSP_DecompressVis(const qbyte *in, const qbyte *inend, qbyte *
                        *out++ = c;
                else
                {
+                       if (in == inend)
+                       {
+                               Con_DPrintf("Mod_Q1BSP_DecompressVis: input underrun on model \"%s\"\n", loadmodel->name);
+                               return;
+                       }
                        for (c = *in++;c > 0;c--)
                        {
                                if (out == outend)