(val)
| 50 | |
| 51 | |
| 52 | def _check_contains_null(val): |
| 53 | if isinstance(val, bytes): |
| 54 | for byte in val: |
| 55 | if isinstance(byte, bytes): |
| 56 | compare_to = chr(0) |
| 57 | else: |
| 58 | compare_to = 0 |
| 59 | if byte == compare_to: |
| 60 | return True |
| 61 | elif isinstance(val, str): |
| 62 | return '\x00' in val |
| 63 | return False |
| 64 | |
| 65 | |
| 66 | def _check_filters(filters, check_null_strings=True): |