Fixed Coverity reported issue.
CID 11636: Allocation size mismatch (SIZECHECK) "my_alloc(sizeof (struct PlyProperty) /*36*/ * elem->nprops, 1292, "..\\..\\..\\..\\src\\osgPlugins\\ply\\plyfile.cpp")" allocates memory. [show details] Allocating a multiple of 36 bytes to pointer "other->props", which needs 8 bytes.
This commit is contained in:
parent
e345a7bacd
commit
9a4c277592
@ -1289,7 +1289,7 @@ PlyOtherProp *ply_get_other_properties(
|
||||
}
|
||||
#endif
|
||||
other->size = elem->other_size;
|
||||
other->props = (PlyProperty **) myalloc (sizeof(PlyProperty) * elem->nprops);
|
||||
other->props = (PlyProperty **) myalloc (sizeof(PlyProperty*) * elem->nprops);
|
||||
|
||||
/* save descriptions of each "other" property */
|
||||
nprops = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user