TypeError: object of type 'NoneType' has no len()
fextr opened this issue · comments
Hi!
I'm struggling with the following error during the execution of slither .
or slitherin . --pess
Versions:
slither - 0.10.2
slitherin - 0.6.1
I will be grateful for your help
Traceback (most recent call last):
File "/opt/slither/bin/slither", line 8, in <module>
sys.exit(main())
File "/opt/slither/lib/python3.9/site-packages/slither/__main__.py", line 753, in main
main_impl(all_detector_classes=detectors, all_printer_classes=printers)
File "/opt/slither/lib/python3.9/site-packages/slither/__main__.py", line 859, in main_impl
) = process_all(filename, args, detector_classes, printer_classes)
File "/opt/slither/lib/python3.9/site-packages/slither/__main__.py", line 107, in process_all
) = process_single(compilation, args, detector_classes, printer_classes)
File "/opt/slither/lib/python3.9/site-packages/slither/__main__.py", line 87, in process_single
return _process(slither, detector_classes, printer_classes)
File "/opt/slither/lib/python3.9/site-packages/slither/__main__.py", line 137, in _process
detector_resultss = slither.run_detectors()
File "/opt/slither/lib/python3.9/site-packages/slither/slither.py", line 290, in run_detectors
results = [d.detect() for d in self._detectors]
File "/opt/slither/lib/python3.9/site-packages/slither/slither.py", line 290, in <listcomp>
results = [d.detect() for d in self._detectors]
File "/opt/slither/lib/python3.9/site-packages/slither/detectors/abstract_detector.py", line 203, in detect
for r in [output.data for output in self._detect()]:
File "/opt/slither/lib/python3.9/site-packages/slitherin/detectors/potential_arith_overflow.py", line 110, in _detect
vulnerable_expressions = self._find_vulnerable_expressions(f)
File "/opt/slither/lib/python3.9/site-packages/slitherin/detectors/potential_arith_overflow.py", line 89, in _find_vulnerable_expressions
if len(irs) > 0 and isinstance(irs[-1], ops.Return) and len(fun.return_type) == 1 and str(fun.return_type[0]) in INT_TYPES: # @todo currently works only with single returns
TypeError: object of type 'NoneType' has no len()