Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37742201
en ru br
ALT Linux repos
S:1.3.0-alt2_39
4.1: 1.2.0-alt1
4.0: 1.2.0-alt1
3.0: 1.2.0-alt1

Group :: System/Libraries
RPM: lib3ds

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

Patch: lib3ds-1.3.0-lib3ds-mesh.c.diff
Download


diff -Naur lib3ds-1.3.0.orig/lib3ds/mesh.c lib3ds-1.3.0/lib3ds/mesh.c
--- lib3ds-1.3.0.orig/lib3ds/mesh.c	2007-06-20 19:04:08.000000000 +0200
+++ lib3ds-1.3.0/lib3ds/mesh.c	2010-09-14 06:34:39.987807911 +0200
@@ -87,8 +87,11 @@
             faces=lib3ds_io_read_word(io);
             for (i=0; i<faces; ++i) {
               index=lib3ds_io_read_word(io);
-              ASSERT(index<mesh->faces);
-              strcpy(mesh->faceL[index].material, name);
+              if (index<mesh->faces) {
+                strncpy(mesh->faceL[index].material, name, 64);
+              } else {
+                // TODO warning
+              }
             }
           }
           break;
 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin