From 29521b72d90aa5bc11b4d9b715fc2c8710733eb3 Mon Sep 17 00:00:00 2001 From: brliron Date: Sat, 2 Dec 2017 17:49:44 +0100 Subject: [PATCH] thcrap_tas_fro: BP_nsml_read_file: make a deep copy of the bp_info instead of a swallow copy. --- thcrap_tasofro/src/nsml.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/thcrap_tasofro/src/nsml.cpp b/thcrap_tasofro/src/nsml.cpp index 3e464d03..70462291 100644 --- a/thcrap_tasofro/src/nsml.cpp +++ b/thcrap_tasofro/src/nsml.cpp @@ -226,7 +226,8 @@ int BP_nsml_read_file(x86_reg_t *regs, json_t *bp_info) const char *file_name = (const char*)json_object_get_immediate(bp_info, regs, "file_name"); // ---------- - json_t *new_bp_info = json_copy(bp_info); + // bp_info may be used by several threads at the same time, so we can't change its values. + json_t *new_bp_info = json_deep_copy(bp_info); char *uFilename = nullptr; if (file_name) {