Browse Source

A buffer overflow in enumerateConsoleClassesByCategory

Glenn Smith 7 years ago
parent
commit
eab086e184
1 changed files with 1 additions and 1 deletions
  1. 1 1
      Engine/source/console/consoleObject.cpp

+ 1 - 1
Engine/source/console/consoleObject.cpp

@@ -888,7 +888,7 @@ DefineEngineFunction( enumerateConsoleClassesByCategory, const char*, ( String c
           && ( repCategory[ categoryLength ] == ' ' || repCategory[ categoryLength ] == '\0' ) )
       {
          classes.push_back( rep );
-         bufSize += dStrlen( rep->getClassName() + 1 );
+         bufSize += dStrlen( rep->getClassName() ) + 1;
       }
    }