Commit 076902ef by devttys0 Committed by GitHub

Merge pull request #218 from pfosphor/master

Update kwarg processing to ensure modules don't receive a mutable reference to defaults
parents 291a0359 11b544e1
......@@ -10,6 +10,7 @@ import time
import inspect
import argparse
import traceback
from copy import copy
import binwalk.core.statuserver
import binwalk.core.common
import binwalk.core.settings
......@@ -901,7 +902,7 @@ class Modules(object):
if has_key(kwargs, module_argument.name):
arg_value = kwargs[module_argument.name]
else:
arg_value = module_argument.default
arg_value = copy(module_argument.default)
setattr(obj, module_argument.name, arg_value)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment