Bug: Exception handling for reading incorrect test file
- Dominant language
- C++
- Stars
- 13.2k
- Forks
- 3.2k
- Avg merge
- 2d 8h
- Merged PRs (30d)
- 21
Description
**Describe the bug**
A bug was found within the assimp. Though it might not be an intended use of the relevant API, the bug can still produce critical issues within a program using assimp. It would be best if the affected logic is checked beforehand.
The bug was found with a fuzzer based on the function "ReadFileFromMemory’'. Mistakes or an invalid test file inputs timeout.
This may cause problems in the use of libraries
**To Reproduce**
See attached assimp_readme.txt
[assimp_readme.txt](https://github.com/assimp/assimp/files/7247797/assimp_readme.txt)
[assimp_code.tar.gz](https://github.com/assimp/assimp/files/7247798/assimp_code.tar.gz)
**Expected behavior**
It does not end in an infinite loop state.
This can always cause problems when reading an invalid test file. Exception handling is required for reading an invalid test file.
**Platform (please complete the following information):**
- OS: Ubuntu 18.04
Contributor guide
Research direction
Start by unpacking assimp_code.tar.gz and reading assimp_readme.txt to reproduce the timeout through ReadFileFromMemory with the supplied invalid input. Trace the affected import path and verify that malformed test files terminate without entering an infinite loop.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- computer-graphics
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100