Skip to content

Commit

Permalink
payload can never be NULL
Browse files Browse the repository at this point in the history
  • Loading branch information
WinterMute committed May 2, 2022
1 parent bf50bfd commit d14f931
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions nx/source/display/parcel.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@ Result parcelTransact(Binder *session, u32 code, Parcel *in_parcel, Parcel *out_
in_hdr->objects_size = in_parcel->objects_size;
in_hdr->objects_off = sizeof(ParcelHeader) + in_parcel->payload_size;

if (in_parcel->payload != NULL)
memcpy(&in[in_hdr->payload_off], in_parcel->payload, in_parcel->payload_size);
memcpy(&in[in_hdr->payload_off], in_parcel->payload, in_parcel->payload_size);

if (in_parcel->objects != NULL)
memcpy(&in[in_hdr->objects_off], in_parcel->objects, in_parcel->objects_size);
Expand Down

0 comments on commit d14f931

Please sign in to comment.