[Bf-blender-cvs] [14b8f6c25b2] blender-v2.83-release: VSE: Implement sanity check for files with more channels than supported
Dalai Felinto
noreply at git.blender.org
Fri Oct 29 10:36:33 CEST 2021
Commit: 14b8f6c25b2912fdc669c1b5640dcb4bb7d927f1
Author: Dalai Felinto
Date: Fri Oct 29 10:33:40 2021 +0200
Branches: blender-v2.83-release
https://developer.blender.org/rB14b8f6c25b2912fdc669c1b5640dcb4bb7d927f1
VSE: Implement sanity check for files with more channels than supported
This is a follow up to 8fecc2a8525467ee2fbbaae16ddbbc10b3050d46.
This makes sure future .blend files that have more channels than the
limit won't break Blender.
For LTS this happens silently, without warning the users.
This is part of https://developer.blender.org/D12645
Differential Revision: https://developer.blender.org/D12648
===================================================================
M source/blender/blenloader/intern/readfile.c
===================================================================
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index 630ead642a3..47cbff0d391 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -6789,7 +6789,11 @@ static void link_recurs_seq(FileData *fd, ListBase *lb)
link_list(fd, lb);
for (seq = lb->first; seq; seq = seq->next) {
- if (seq->seqbase.first) {
+ /* Sanity check. */
+ if ((seq->machine < 1) || (seq->machine > MAXSEQ)) {
+ BLI_freelinkN(lb, seq);
+ }
+ else if (seq->seqbase.first) {
link_recurs_seq(fd, &seq->seqbase);
}
}
More information about the Bf-blender-cvs
mailing list