Browse Source

A buffer overflow in enumerateConsoleClassesByCategory

Glenn Smith 7 năm trước cách đây
mục cha
commit
ed10ce2511
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  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;
       }
    }