Skip to content

gtp: assign value to data[0] after PrependBytes#130

Merged
mosajjal merged 1 commit intogopacket:masterfrom
constant-mihai:fix-gtp-prepend-bytes
Oct 25, 2025
Merged

gtp: assign value to data[0] after PrependBytes#130
mosajjal merged 1 commit intogopacket:masterfrom
constant-mihai:fix-gtp-prepend-bytes

Conversation

@constant-mihai
Copy link
Copy Markdown
Contributor

PrependBytes doesn't zero out the returned bytes. If the SerializeBuffer is reused, then it might contain garbage data.

This PR introduces a test that encapsulates two packets in a sequence, while reusing the same SerializeBuffer.

PrependBytes doesn't zero out the returned bytes. If the SerializeBuffer
is reused, then it might contain garbage data.
@mosajjal mosajjal merged commit f972276 into gopacket:master Oct 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants