瀏覽代碼

A buffer overflow in enumerateConsoleClassesByCategory

Glenn Smith 7 年之前
父節點
當前提交
ed10ce2511
共有 1 個文件被更改,包括 1 次插入1 次删除
  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;
       }
    }