Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
JaylinYu committed Apr 15, 2023
1 parent fadc89e commit c5c93a9
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/core/message.c
Original file line number Diff line number Diff line change
Expand Up @@ -697,6 +697,10 @@ nni_msg_get_pub_pid(nni_msg *m)

pos = nni_msg_body(m);
NNI_GET16(pos, len);
NNI_GET16(pos + len + 2, pid);
return pid;
if (len > nni_msg_remaining_len(m) - 2)
return 0;
else {
NNI_GET16(pos + len + 2, pid);
return pid;
}
}

0 comments on commit c5c93a9

Please sign in to comment.