- if(length > 500) { // Larger length can cause segmentation faults due to too deep recursion.
- av_log(NULL, AV_LOG_ERROR, "length too long\n");
+ // Larger length can cause segmentation faults due to too deep recursion.
+ if (length > SMKTREE_DECODE_BIG_MAX_RECURSION) {
+ av_log(NULL, AV_LOG_ERROR, "Maximum bigtree recursion level exceeded.\n");