Skip to content

Fix/der bugs#5773

Closed
ethan-thompson wants to merge 2 commits intoFreeRADIUS:masterfrom
ethan-thompson:fix/der-bugs
Closed

Fix/der bugs#5773
ethan-thompson wants to merge 2 commits intoFreeRADIUS:masterfrom
ethan-thompson:fix/der-bugs

Conversation

@ethan-thompson
Copy link
Contributor

A few bugs found in the DER protocol code

Signed-off-by: ethan-thompson <ethan.thompson@networkradius.com>
Signed-off-by: ethan-thompson <ethan.thompson@networkradius.com>
}

return memcmp(a->data, b->data, b->len);
size_t min_len = (a->len < b->len) ? a->len : b->len;
Copy link
Member

Choose a reason for hiding this comment

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

Uh, yeah. Just pass it directly to memcmp

more = ((uint8_t) (i > 0)) << 7;

FR_DBUFF_IN_RETURN(&our_dbuff, (uint8_t) (more | part));
wrote = true;
Copy link
Member

Choose a reason for hiding this comment

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

More explanation about why this is an issue?

Copy link
Member

Choose a reason for hiding this comment

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

The previous code skipped 0x00 in the middle of a number :(

@alandekok
Copy link
Member

alandekok commented Mar 20, 2026 via email

@arr2036
Copy link
Member

arr2036 commented Mar 20, 2026 via email

@alandekok
Copy link
Member

merged, thanks

@alandekok alandekok closed this Mar 21, 2026
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.

3 participants