Skip to content

Commit

Permalink
Merge pull request #8362 from tony2001/read_property_crash_fixed
Browse files Browse the repository at this point in the history
read_property() handler is not supposed to return NULL
  • Loading branch information
haberman authored Mar 3, 2021
2 parents 069f989 + 2e7771d commit 4baed79
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion php/ext/google/protobuf/message.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 4baed79

Please sign in to comment.