Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class COIN_DLL_API SoDetail {
- ....
- virtual ~SoDetail();
- virtual SoDetail * copy(void) const = 0;
- ....
- }
- class SoPointDetail : public SoDetail {
- };
- void
- soshape_primdata::shapeVertex(const SoPrimitiveVertex * const v)
- {
- ....
- SoPointDetail* newparray = new SoPointDetail[this->arraySize];
- memcpy(newparray, this->pointDetails,
- sizeof(SoPointDetail)* this->counter);
- ....
- }
- This suspicious code was found in Coin3D project by PVS-Studio static code analyzer.
- Warning message is:
- V598 The 'memcpy' function is used to copy the fields of 'SoPointDetail' class. Virtual method table will be damaged by this. soshape_primdata.cpp 202
- PVS-Studio is a static analyzer for detecting bugs in the source code of applications written in C, C++, C++11, C++/CX. Site: http://www.viva64.com/en/pvs-studio/
Advertisement
Add Comment
Please, Sign In to add comment