From 9a4c277592c486fc568c186cdc846b2cdcba7753 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Wed, 27 Apr 2011 16:00:32 +0000 Subject: [PATCH] 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. --- src/osgPlugins/ply/plyfile.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/osgPlugins/ply/plyfile.cpp b/src/osgPlugins/ply/plyfile.cpp index 0d956c063..2b66a6090 100644 --- a/src/osgPlugins/ply/plyfile.cpp +++ b/src/osgPlugins/ply/plyfile.cpp @@ -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;