Merge pull request #8362 from tony2001/read_property_crash_fixed

read_property() handler is not supposed to return NULL
This commit is contained in:
Joshua Haberman 2021-03-03 10:14:31 -08:00 committed by GitHub
commit 4baed791f5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -334,7 +334,7 @@ static zval *Message_read_property(PROTO_VAL *obj, PROTO_STR *member,
Message* intern = PROTO_VAL_P(obj);
const upb_fielddef *f = get_field(intern, member);
if (!f) return NULL;
if (!f) return &EG(uninitialized_zval);
Message_get(intern, f, rv);
return rv;
}