fix buffer overflow seg fault when using cache

This commit is contained in:
William Bell
2025-09-02 18:35:43 +01:00
parent 571efe46b7
commit c2e0cdc6d6
8 changed files with 75 additions and 49 deletions

View File

@@ -258,6 +258,9 @@ int load_cache(Translated *translated_dest, char *joined_paths, uint64_t hash,
*translated_dest = init_translator(source_path);
translated_dest->registerCount = register_count;
arena_resize(&translated_dest->constants, constantsSize);
if (fread(translated_dest->constants.data, 1, constantsSize, bytecode_file) !=