Skip to content
  • Krzysztof Blazewicz's avatar
    py/stream.c: use mp_obj_get_type in mp_get_stream_raise · 65620764
    Krzysztof Blazewicz authored
    In current state `mp_get_stream_raise` assumes that `self_in` is an object
    and always performs a pointer derefence which may cause a segfault.
    
    This function shall throw an exception whenever `self_in` does not implement
    a stream protocol, that includes qstr's and numbers.
    
    fixes #2331
    65620764