==23896==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x12f9daec1827 at pc 0x7ffcad83699c bp 0x00c61574c910 sp 0x00c61574c910
READ of size 1 at 0x12f9daec1827 thread T0
==23896==WARNING: Failed to use and restart external symbolizer!
#0 0x7ffcad83699b in Assimp::IOStreamBuffer<char>::getNextLine C:\Users\aavenel\Dev\assimp\include\assimp\IOStreamBuffer.h:299
#1 0x7ffcad83ce69 in Assimp::PLY::DOM::ParseHeader C:\Users\aavenel\Dev\assimp\code\AssetLib\Ply\PlyParser.cpp:428
#2 0x7ffcad83d58e in Assimp::PLY::DOM::ParseInstanceBinary C:\Users\aavenel\Dev\assimp\code\AssetLib\Ply\PlyParser.cpp:498
#3 0x7ffcad83302a in Assimp::PLYImporter::InternReadFile C:\Users\aavenel\Dev\assimp\code\AssetLib\Ply\PlyLoader.cpp:189
#4 0x7ffcad4f2f48 in Assimp::BaseImporter::ReadFile C:\Users\aavenel\Dev\assimp\code\Common\BaseImporter.cpp:135
#5 0x7ffcad51ee46 in Assimp::Importer::ReadFile C:\Users\aavenel\Dev\assimp\code\Common\Importer.cpp:709
#6 0x7ff7dd8f9f1a in ImportModel C:\Users\aavenel\Dev\assimp\tools\assimp_cmd\Main.cpp:307
#7 0x7ff7dd8fdf9e in Assimp_Info C:\Users\aavenel\Dev\assimp\tools\assimp_cmd\Info.cpp:344
#8 0x7ff7dd8fc04f in main C:\Users\aavenel\Dev\assimp\tools\assimp_cmd\Main.cpp:222
#9 0x7ff7dd9030eb in __scrt_common_main_seh D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288
#10 0x7ffd39e57343 in BaseThreadInitThunk+0x13 (C:\WINDOWS\System32\KERNEL32.DLL+0x180017343)
#11 0x7ffd3a2626b0 in RtlUserThreadStart+0x20 (C:\WINDOWS\SYSTEM32\ntdll.dll+0x1800526b0)
Allows to export unlimited (more than 4) bones per vertex
Use JOINTS_1,2,.. and WEIGHTS_1,2,...
Added AI_CONFIG_EXPORT_GLTF_UNLIMITED_SKINNING_BONES_PER_VERTEX flag
The omitted vertex colors are treated as (0, 0, 0, 1).
e.g
v 0.0 0.0 0.0
v 0.0 0.0 1.0 0.0 0.0 0.0
v 0.0 1.0 0.0
v 1.0 0.0 0.0 1.0 0.6 0.3
v 1.0 1.0 0.0
The pointer to a newline could not advance enough, when the line ended with \r\n. The resulting buffer was correct, as the buffer range went from <start> until \r, but that the pointer increased by just 1 could lead to the problem that the next pointer points at \n, which is still part of the newline and therefore, "getNextBlock" got 1 byte too much.
Refs Issue #4871
This can happen currently for example if NaNs are introduced in accessor bounds as rapidjson cannot write NaN/inf floats (see subsequent commit for fix there) and will halt writing to buffer at this point. Fix here ensures that whenever anything like this happens we throw an exception so this ends up as a registered export failure case, rather than silently exporting the incomplete JSON