Skip to content

Fix TCP read capped at 8 bytes (sizeof pointer) - #115

Merged
flipflip8952 merged 1 commit into
fixposition:mainfrom
Ascento-AG:fix/buffer-read-size
Aug 11, 2026
Merged

Fix TCP read capped at 8 bytes (sizeof pointer)#115
flipflip8952 merged 1 commit into
fixposition:mainfrom
Ascento-AG:fix/buffer-read-size

Conversation

@ben-du-pont

Copy link
Copy Markdown
Contributor

In FixpositionDriver::Read(), the TCP branch calls read(sensor_fd_, buf, sizeof(buf)).

Since buf is a uint8_t* parameter, sizeof(buf) evaluates to the pointer size (8 bytes on 64-bit), not the buffer capacity carried by the size argument. As a result, every TCP read is capped at 8 bytes regardless of the buffer passed in.

@ben-du-pont ben-du-pont changed the title Fix TCP read capping every recv at 8 bytes (sizeof pointer) Fix TCP read capped at 8 bytes (sizeof pointer) Aug 11, 2026
@flipflip8952

Copy link
Copy Markdown
Contributor

Good find! Thanks.

@flipflip8952
flipflip8952 self-requested a review August 11, 2026 10:47
@flipflip8952
flipflip8952 merged commit d7701ce into fixposition:main Aug 11, 2026
4 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