dmsurti / AssimpKit

A library (macOS, iOS) that converts the files supported by Assimp to Scene Kit scenes.
http://assimpkit.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
477 stars 54 forks source link

~ Segmentation fault fix #110

Closed vpopovyc closed 6 years ago

vpopovyc commented 6 years ago

In case of nVertices && maxWeights is quite big numbers

1473 -- float nodeGeometryWeights[nVertices * maxWeights];

makes that line

1480 -- NSMutableDictionary *meshWeights = [[NSMutableDictionary alloc] init];

to trigger EXC_BAD_ACCESS(code=1)

codecov-io commented 6 years ago

Codecov Report

Merging #110 into master will increase coverage by 0.01%. The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #110      +/-   ##
==========================================
+ Coverage   74.74%   74.76%   +0.01%     
==========================================
  Files          17       17              
  Lines        1564     1565       +1     
==========================================
+ Hits         1169     1170       +1     
  Misses        395      395
Impacted Files Coverage Δ
AssimpKit/Code/Model/AssimpImporter.m 89.09% <100%> (+0.01%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 03ebf41...22131cc. Read the comment docs.

dmsurti commented 6 years ago

@vpopovyc Thanks for this fix. Sorry for the delay in merging, like everybody else busy at work :-)