Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Montagne <bastien@blender.org>2020-09-20 19:41:50 +0300
committerBastien Montagne <bastien@blender.org>2020-09-20 19:41:50 +0300
commit5ea1049e7520c0f369d2a76811410b1274699e81 (patch)
tree5d7f5158b8c329b9a7e3b0fa5aa6ac2ce65701a1 /source/blender/blenloader/intern/undofile.c
parent86c5d1f4aa07551b289619da501889a172a39e03 (diff)
Sanitize type 'size' parameters in our read/write file code
This patch tries to sanitize the types of our size parameters across our read and write code, which is currently fairly inconsistent (using `int`, `uint`, `size_t`...), by using `size_t` everywhere. Since in Blender file themselves we can only store chunk of size `MAX_INT`, added some asserts to ensure that as well. See {T79561} for details. Differential Revision: https://developer.blender.org/D8672
Diffstat (limited to 'source/blender/blenloader/intern/undofile.c')
-rw-r--r--source/blender/blenloader/intern/undofile.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/blenloader/intern/undofile.c b/source/blender/blenloader/intern/undofile.c
index 8ee539014f0..4da73138c38 100644
--- a/source/blender/blenloader/intern/undofile.c
+++ b/source/blender/blenloader/intern/undofile.c
@@ -154,7 +154,7 @@ void BLO_memfile_write_finalize(MemFileWriteData *mem_data)
}
}
-void BLO_memfile_chunk_add(MemFileWriteData *mem_data, const char *buf, uint size)
+void BLO_memfile_chunk_add(MemFileWriteData *mem_data, const char *buf, size_t size)
{
MemFile *memfile = mem_data->written_memfile;
MemFileChunk **compchunk_step = &mem_data->reference_current_chunk;