huggingface / huggingface/datasets

RecursionError when loading GLB file with deeply nested JSON in Mesh feature

Open
#8,246 1 comment 1 reaction 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.