Skip to content

lo_server_recv_raw_stream_socket allocation fixes#179

Merged
radarsat1 merged 6 commits intomasterfrom
lo_server_recv_raw_stream_socket-allocation-fixes
Feb 24, 2026
Merged

lo_server_recv_raw_stream_socket allocation fixes#179
radarsat1 merged 6 commits intomasterfrom
lo_server_recv_raw_stream_socket-allocation-fixes

Conversation

@radarsat1
Copy link
Copy Markdown
Owner

various fixes for lo_server_recv_raw_stream_socket:

  • fix loop memory handling wrt retries
  • get rid of confusing bytes_written variable.
  • careful about alignment issues when referencing casted (uint32_t*)
  • correct socket error check
  • handle realloc more safely

Previously out of memory would leave an allocated buffer hanging.
…variable.

This is just a temporary variable but it's a bit confusing to read it when
it's both declared at the top and shadowed inside a loop; in the end it's
not really needed, so just get rid of it.
The "again" loop logic could cause an unterminated stack allocation loop,
and there was a buffer overflow risk in SLIP mode.

Fixes #177.
Copy link
Copy Markdown

@BriochePuppet BriochePuppet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this patch. It looks good from my side.

@radarsat1 radarsat1 merged commit f72115c into master Feb 24, 2026
5 of 8 checks passed
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