Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Vulnerability in Comparison of different type sizes #1001

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

FeedehC
Copy link

@FeedehC FeedehC commented Mar 1, 2023

Little change in sizes of for loop iterator "i", from uint16_t to uint32_t, to avoid possible infinite loop, which depends on the value of "plength".
More information in issue: #1000

@Flole998
Copy link

Flole998 commented Mar 6, 2023

Well, now length could potentially overflow so the buffer is incorrectly filled. Also you're still mixing datatypes, an unsigned int and an uint32_t could potentially have different sizes, so I suggest to use unsigned int for the length everywhere.

hmueller01 added a commit to hmueller01/pubsubclient that referenced this pull request Mar 10, 2024
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