huggingface / huggingface/datasets
RecursionError when loading GLB file with deeply nested JSON in Mesh feature
Open
- Dominant language
- Python
- Stars
- 22k
- Forks
- 3.4k
- Avg merge
- 5d 7h
- Merged PRs (30d)
- 17
Description
## Description
Loading a GLB file with deeply nested JSON chunk causes a RecursionError, crashing the application.
## Step to Reproduce
```python
from datasets import Dataset, Mesh
import tempfile, os, struct
def make_malicious_glb(depth=5000):
json_chunk = (b'{"a":' * depth + b'1' + b'}' * depth)
magic = b'glTF'
version = struct.pack('
Contributor guide
Assessment
This issue has not been assessed yet.