Skip to content

Commit

Permalink
thcrap_tas_fro: BP_nsml_read_file: make a deep copy of the bp_info
Browse files Browse the repository at this point in the history
instead of a swallow copy.
  • Loading branch information
brliron committed Dec 2, 2017
1 parent de93eec commit 29521b7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion thcrap_tasofro/src/nsml.cpp
Expand Up @@ -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) {
Expand Down

0 comments on commit 29521b7

Please sign in to comment.