[GH-ISSUE #459] Buffer overflow when receiving multiple packets of 1-3 bytes #241

Closed
opened 2026-02-27 15:49:31 +03:00 by kerem · 2 comments
Owner

Originally created by @Netskyes on GitHub (May 20, 2016).
Original GitHub issue: https://github.com/quasar/Quasar/issues/459

Originally assigned to: @MaxXor on GitHub.

Hi, so the issue occurs when client is processing packets and the readableDataLen is less than HEADER_SIZE, then it resets readableDataLen to 0 and gets ready to process new packet.

If the new packet size is also less than HEADER_SIZE, it will keep writing to _tempHeader and eventually (in case where a few packets size is less than HEADER_SIZE) cause buffer overflow.

Originally created by @Netskyes on GitHub (May 20, 2016). Original GitHub issue: https://github.com/quasar/Quasar/issues/459 Originally assigned to: @MaxXor on GitHub. Hi, so the issue occurs when client is processing packets and the readableDataLen is less than HEADER_SIZE, then it resets readableDataLen to 0 and gets ready to process new packet. If the new packet size is also less than HEADER_SIZE, it will keep writing to _tempHeader and eventually (in case where a few packets size is less than HEADER_SIZE) cause buffer overflow.
kerem 2026-02-27 15:49:31 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@MaxXor commented on GitHub (May 20, 2016):

This usually doesn't happen often in normal program operation. But I'll take a look into it to fix it.

<!-- gh-comment-id:220582851 --> @MaxXor commented on GitHub (May 20, 2016): This usually doesn't happen often in normal program operation. But I'll take a look into it to fix it.
Author
Owner

@Netskyes commented on GitHub (May 20, 2016):

I agree, but it still can happen so thought to let you know :)

<!-- gh-comment-id:220586268 --> @Netskyes commented on GitHub (May 20, 2016): I agree, but it still can happen so thought to let you know :)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/Quasar#241
No description provided.