Menu

#22 Obj: segfault when first line is a material

closed-fixed
nobody
Assimp lib (91)
5
2010-08-27
2010-08-26
Ingo Kresse
No

Hi, I was just checking if materials work for .obj files. I managed to crash the Assimp library with the attached model.

One extra null-pointer check fixed it (patch attached, too).

Cheers,
Ingo

Discussion

  • Ingo Kresse

    Ingo Kresse - 2010-08-26

    .obj model which crashed ObjParser

     
  • Ingo Kresse

    Ingo Kresse - 2010-08-26

    Material File for offending .obj model

     
  • Ingo Kresse

    Ingo Kresse - 2010-08-26

    null-pointer check which fixed the crash

     
  • Alexander Gessler

    • status: open --> pending
     
  • Alexander Gessler

    Good catch! Crash reproduced, patch works for me, result looks fine.
    Can I check-in the sample file for regression testing?

    Bye, Alex

     
  • Ingo Kresse

    Ingo Kresse - 2010-08-27

    Sure, this mesh may be distributed freely.

    It is part of a model for the KUKA lightweight robot and was downloaded here: http://toychest.in.tum.de/wiki/projects:kuka_lwr. It is licensed under Creative-Commons-by-Attribution-3.0. The obj file was exported from Blender.

    (Now I'm just puzzled why the other meshes didn't crash the parser :)

    Bye, Ingo

     
  • Ingo Kresse

    Ingo Kresse - 2010-08-27
    • status: pending --> open
     
  • Alexander Gessler

    Thanks!
    All committed as r807. You mind if I add you to CREDITS?
    I'm closing the issue now, please reopen if necessary.

    Bye, Alex

     
  • Alexander Gessler

    • status: open --> closed-fixed
     
MongoDB Logo MongoDB