mirror of
https://github.com/Open-Cascade-SAS/OCCT.git
synced 2026-08-13 20:27:56 +08:00
56e162c480
Interface_ParamSet: - Eliminate use-after-free in Append() by deleting old buffer through a temp variable after reassigning the member pointer (CodeQL #5132/#2684) delabella.cpp: - Fix upcast array pointer arithmetic by parenthesizing cast to ensure pointer arithmetic uses derived class (Vert) size rather than base class (DelaBella_Vertex) size (CodeQL #5131) NCollection_SparseArrayBase: - Rework to replace virtual dispatch (createItem/destroyItem/copyItem) with function pointers passed as arguments to protected methods - Store only DestroyItemFunc in base class to enable safe cleanup in destructor without virtual dispatch - Pass CreateItemFunc and CopyItemFunc as arguments with zero per-instance storage overhead - Move Clear() and UnsetValue() from base public API to protected clearItems()/unsetValue() with function pointer parameters; template class provides public wrappers - Remove vtable entirely (no virtual methods remain) - This eliminates the pure virtual call during base class destruction (CodeQL #5012) AdvApp2Var_MathBase: - Rewrite comparison to avoid potential signed integer overflow: *ncfnew + 1 > ncut becomes *ncfnew >= ncut (CodeQL #2692)