diff options
Diffstat (limited to 'media-libs/lib3ds/files/lib3ds-1.3.0-mesh.c.patch')
-rw-r--r-- | media-libs/lib3ds/files/lib3ds-1.3.0-mesh.c.patch | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/media-libs/lib3ds/files/lib3ds-1.3.0-mesh.c.patch b/media-libs/lib3ds/files/lib3ds-1.3.0-mesh.c.patch new file mode 100644 index 000000000000..1455660596bf --- /dev/null +++ b/media-libs/lib3ds/files/lib3ds-1.3.0-mesh.c.patch @@ -0,0 +1,17 @@ +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; |