diff --git a/oyente/analysis.py b/oyente/analysis.py
index 64fe634c..b4b731da 100644
--- a/oyente/analysis.py
+++ b/oyente/analysis.py
@@ -63,7 +63,10 @@ def check_reentrancy_bug(path_conditions_and_vars, stack, global_state):
new_path_condition.append(var == global_state["Ia"][storage_key])
transfer_amount = stack[2]
if isSymbolic(transfer_amount) and str(transfer_amount).startswith("Ia_store"):
- storage_key = str(transfer_amount).split("-")[1]
+ try:
+ storage_key = str(transfer_amount).split("-")[1]
+ except:
+ storage_key = str(transfer_amount).split("Ia_store_")[1]
try:
if int(storage_key) in global_state["Ia"]:
new_path_condition.append(global_state["Ia"][int(storage_key)] != 0)
diff --git a/oyente/symExec.py b/oyente/symExec.py
index 445011f5..059748bc 100755
--- a/oyente/symExec.py
+++ b/oyente/symExec.py
@@ -755,7 +755,7 @@ def sym_exec_ins(params):
elif instr_parts[0] == "ASSERTFAIL":
if source_map:
source_code = source_map.find_source_code(global_state["pc"])
- if func_call == -1 and "assert" in source_code:
+ if "assert" in source_code:
global_problematic_pcs["assertion_failure"].append(Assertion(global_state["pc"], models[-1]))
elif func_call != -1:
global_problematic_pcs["assertion_failure"].append(Assertion(func_call, models[-1]))
@@ -2051,16 +2051,16 @@ def detect_money_concurrency():
for idx, pcs in enumerate(flows):
pcs = validator.remove_false_positives(pcs)
if global_params.WEB:
- s += "flow " + str(idx + 1) + ":
"
+ s += "Flow " + str(idx + 1) + ":
"
else:
- s += "\nflow " + str(idx + 1) + ":"
+ s += "\nFlow " + str(idx + 1) + ":"
for pc in pcs:
source_code = source_map.find_source_code(pc).split("\n", 1)[0]
if not source_code:
continue
location = source_map.get_location(pc)
if global_params.WEB:
- s += "%s:%s:%s: Money concurrency bug:
" % (source_map.cname.split(":", 1)[1], location['begin']['line'] + 1, location['begin']['column'] + 1)
+ s += "%s:%s:%s:
" % (source_map.cname.split(":", 1)[1], location['begin']['line'] + 1, location['begin']['column'] + 1)
s += "%s
" % source_code
s += "^
"
else:
@@ -2069,6 +2069,7 @@ def detect_money_concurrency():
s += "^"
if s:
any_bug = True
+ s = "Money concurrency bug:
" + "