Skip to content

Conversation

@HedongGao
Copy link
Contributor

@HedongGao HedongGao commented Jan 14, 2026

Summary

In some scenarios, dynamic memory allocation is not allowed, so it is modified to a static allocation method.
By reading through the code, in the ptp_sendmsg function, the maximum value of buflen is sizeof (struct ptp_announce_s), so the char raw [sizeof (struct ether_ceader)+buflen]; is changed to char raw [sizeof (struct ether_ceader)+sizeof (struct ptp_announce_s);

Impact

No modification of user interface, no impact on functionality.

Testing

Use the development board to set up the GPTP runtime environment and test the clock synchronization function. After testing, gptp function is normal.

In some scenarios, dynamic memory allocation is not allowed, so it is modified to a static allocation method.

Signed-off-by: gaohedong <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants