'Wrapper for leak functions such that addresses which contain newline
bytes are not leaked.
This is useful if the address which is used for the leak is provided by
e.g. ``fgets()``.'

@staticmethod
def NoNewlines(function):

    @functools.wraps(function, updated=[])
    def whitespace_wrapper(address, *a, **kw):
        if ('\n' in pack(address)):
            log.info(('Ignoring    leak    request    for    %#x:    Contains    newlines' % address))
            return None
        return function(address, *a, **kw)
    return MemLeak(whitespace_wrapper)
