Faule Socke 4a65e76ca7 Fix buffer overflow in obj loader
The overflow-checking code in ObjFileImporter::createVertexArray is at
the wrong position, allowing buffer overflows in preceding code.

This fix moves the code to the right spot.

An actual overflow can be caused by usign some more bugs and weird
behaviours and injecting a malformed line statement into the object
file, containing only one index. Such a malformed file could for
example look like:

o 1

v 0 0 0
v 1 1 1
v 2 2 2

l 1
f 1 2 3

Because the code in ObjFileImporter::createTopology incorrectly handles
line-type faces containing only one index (in line 364), it
underestimates the number of required indices and therefore causes the
buffer allocated in line 421 to be too small.

I believe, the correct fix for this would be in the parser and
rejecting such faces early. However the overflow check was misplaced
anyway.

If you can't reproduce a crash, just insert some more "l 1" lines
before the "f 1 2 3" line until it crashes. The behaviour of heap buffer
overflows strongly depends on memory layout and allocation history.
2017-12-23 17:57:48 +01:00
2017-11-09 17:19:26 -05:00
2017-12-23 17:57:48 +01:00
2017-12-12 02:28:03 -08:00
2017-12-11 13:21:35 +01:00
2017-04-07 17:46:53 +02:00
2017-11-09 17:19:26 -05:00
2017-11-09 17:19:26 -05:00
2017-12-12 20:34:53 +01:00
2017-10-03 14:11:23 -05:00
2017-12-02 17:58:33 +02:00
2016-04-03 01:38:00 +01:00
2017-12-11 13:22:20 +01:00
2017-12-10 18:25:50 +01:00
2015-11-03 10:51:13 +01:00
2017-02-27 18:34:04 -05:00
2013-01-20 22:52:52 +01:00
2017-11-22 16:11:46 +01:00

Open Asset Import Library (assimp)

A library to import and export various 3d-model-formats including scene-post-processing to generate missing render data.

Current build status

Linux Build Status Windows Build Status Coverity Scan Build Status Coverage Status Join the chat at https://gitter.im/assimp/assimp

APIs are provided for C and C++. There are various bindings to other languages (C#, Java, Python, Delphi, D). Assimp also runs on Android and iOS.

Additionally, assimp features various mesh post processing tools: normals and tangent space generation, triangulation, vertex cache locality optimization, removal of degenerate primitives and duplicate vertices, sorting by primitive type, merging of redundant materials and many more.

This is the development repo containing the latest features and bugfixes. For productive use though, we recommend one of the stable releases available from Github Assimp Releases.

Monthly donations via Patreon:
Patreon


One-off donations via PayPal:
PayPal


Please check our Wiki as well: https://github.com/assimp/assimp/wiki

Supported file formats

A full list is here. Importers:

  • 3D
  • 3DS
  • 3MF
  • AC
  • AC3D
  • ACC
  • AMJ
  • ASE
  • ASK
  • B3D;
  • BLEND (Blender)
  • BVH
  • COB
  • CMS
  • DAE/Collada
  • DXF
  • ENFF
  • FBX
  • glTF 1.0 + GLB
  • glTF 2.0
  • HMB
  • IFC-STEP
  • IRR / IRRMESH
  • LWO
  • LWS
  • LXO
  • MD2
  • MD3
  • MD5
  • MDC
  • MDL
  • MESH / MESH.XML
  • MOT
  • MS3D
  • NDO
  • NFF
  • OBJ
  • OFF
  • OGEX
  • PLY
  • PMX
  • PRJ
  • Q3O
  • Q3S
  • RAW
  • SCN
  • SIB
  • SMD
  • STL
  • STP
  • TER
  • UC
  • VTA
  • X
  • X3D
  • XGL
  • ZGL

Additionally, some formats are supported by dependency on non-free code or external SDKs (not built by default):

Exporters:

Building

Take a look into the INSTALL file. Our build system is CMake, if you used CMake before there is a good chance you know what to do.

Ports

Other tools

open3mod is a powerful 3D model viewer based on Assimp's import and export abilities.

Repository structure

Open Asset Import Library is implemented in C++. The directory structure is:

/code		Source code
/contrib	Third-party libraries
/doc		Documentation (doxysource and pre-compiled docs)
/include	Public header C and C++ header files
/scripts 	Scripts used to generate the loading code for some formats
/port		Ports to other languages and scripts to maintain those.
/test		Unit- and regression tests, test suite of models
/tools		Tools (old assimp viewer, command line `assimp`)
/samples	A small number of samples to illustrate possible
                    use cases for Assimp
/workspaces	Build environments for vc,xcode,... (deprecated,
		CMake has superseeded all legacy build options!)

Where to get help

For more information, visit our website. Or check out the ./doc- folder, which contains the official documentation in HTML format. (CHMs for Windows are included in some release packages and should be located right here in the root folder).

If the docs don't solve your problem, ask on StackOverflow. If you think you found a bug, please open an issue on Github.

For development discussions, there is also a (very low-volume) mailing list, assimp-discussions (subscribe here)

Open Asset Import Library is a library to load various 3d file formats into a shared, in-memory format. It supports more than 40 file formats for import and a growing selection of file formats for export.

And we also have a Gitter-channel:Gitter Join the chat at https://gitter.im/assimp/assimp

Contributing

Contributions to assimp are highly appreciated. The easiest way to get involved is to submit a pull request with your changes against the main repository's master branch.

License

Our license is based on the modified, 3-clause BSD-License.

An informal summary is: do whatever you want, but include Assimp's license text with your product - and don't sue us if our code doesn't work. Note that, unlike LGPLed code, you may link statically to Assimp. For the legal details, see the LICENSE file.

Why this name

Sorry, we're germans :-), no english native speakers ...

Description
No description provided
Readme BSD-3-Clause 311 MiB
Languages
C++ 65.3%
COBOL 15.3%
C 11.2%
Python 2.1%
CMake 1.8%
Other 4%