zturtleman / mm3d

Maverick Model 3D is a 3D model editor and animator for games.
https://clover.moe/mm3d
GNU General Public License v2.0
110 stars 22 forks source link

Large memory overrun? Some screwy code in writeFile for MDT_CanvasBackgrounds #150

Closed m-7761 closed 3 years ago

m-7761 commented 3 years ago
 std::string fileStr = getRelativePath( modelPath.c_str(), file );
            uint32_t backSize = baseSize + fileStr.size() + 1;

            char * filedup = strdup( fileStr.c_str() );
            replaceSlash( filedup );
            utf8chrtrunc( filedup, PATH_MAX-1 );
zturtleman commented 3 years ago

Fixed in 6197411b4d7012c265898d10a4ddec11bf198be2. Thanks.