diff options
| author | serpilliere <serpilliere@users.noreply.github.com> | 2016-01-30 23:47:58 +0100 |
|---|---|---|
| committer | serpilliere <serpilliere@users.noreply.github.com> | 2016-01-30 23:47:58 +0100 |
| commit | d21a47392556f9b20241aa70d3e1e7151d56e34f (patch) | |
| tree | bd6002a816a67d9f74434b62df675c36c4e538c2 /miasm2/core | |
| parent | 3672de7c319f39273cb7e34797cb928f424ff7c4 (diff) | |
| parent | 9b6c327d81ded9eb777130d7a4efb1dbe8a78c77 (diff) | |
| download | miasm-d21a47392556f9b20241aa70d3e1e7151d56e34f.tar.gz miasm-d21a47392556f9b20241aa70d3e1e7151d56e34f.zip | |
Merge pull request #315 from commial/dangerous-default-value
Fix dangerous-default-value
Diffstat (limited to 'miasm2/core')
| -rw-r--r-- | miasm2/core/asmbloc.py | 25 |
1 files changed, 18 insertions, 7 deletions
diff --git a/miasm2/core/asmbloc.py b/miasm2/core/asmbloc.py index 38d3d17a..a6584602 100644 --- a/miasm2/core/asmbloc.py +++ b/miasm2/core/asmbloc.py @@ -411,11 +411,16 @@ class asm_symbol_pool: def dis_bloc(mnemo, pool_bin, label, offset, job_done, symbol_pool, - dont_dis=[], split_dis=[ - ], follow_call=False, dontdis_retcall=False, lines_wd=None, - dis_bloc_callback=None, dont_dis_nulstart_bloc=False, - attrib={}): + dont_dis=None, split_dis=None, follow_call=False, + dontdis_retcall=False, lines_wd=None, dis_bloc_callback=None, + dont_dis_nulstart_bloc=False, attrib=None): # pool_bin.offset = offset + if dont_dis is None: + dont_dis = [] + if split_dis is None: + split_dis = [] + if attrib is None: + attrib = {} lines_cpt = 0 in_delayslot = False delayslot_count = mnemo.delayslot @@ -538,12 +543,18 @@ def dis_bloc(mnemo, pool_bin, label, offset, job_done, symbol_pool, return cur_block, offsets_to_dis -def dis_bloc_all(mnemo, pool_bin, offset, job_done, symbol_pool, dont_dis=[], - split_dis=[], follow_call=False, dontdis_retcall=False, +def dis_bloc_all(mnemo, pool_bin, offset, job_done, symbol_pool, dont_dis=None, + split_dis=None, follow_call=False, dontdis_retcall=False, blocs_wd=None, lines_wd=None, blocs=None, dis_bloc_callback=None, dont_dis_nulstart_bloc=False, - attrib={}): + attrib=None): log_asmbloc.info("dis bloc all") + if dont_dis is None: + dont_dis = [] + if split_dis is None: + split_dis = [] + if attrib is None: + attrib = {} if blocs is None: blocs = AsmCFG() todo = [offset] |