Skip to content

heap buffer overflow with long generic function name#19727

Closed
chrisbra wants to merge 1 commit intovim:masterfrom
chrisbra:func-name
Closed

heap buffer overflow with long generic function name#19727
chrisbra wants to merge 1 commit intovim:masterfrom
chrisbra:func-name

Conversation

@chrisbra
Copy link
Member

Problem: Using a long generic function name may cause a heap buffer
overflow in common_function().
Solution: Allocate memory for the full name instead of using IObuff.
(Kaixuan Li)

Problem:    Using a long generic function name may cause a heap buffer
            overflow in common_function().
Solution:   Allocate memory for the full name instead of using IObuff.
            (Kaixuan Li)

Signed-off-by: Christian Brabandt <cb@256bit.org>

" Test for long gerneric type name {{{1
func Test_function_long_generic_name()
func TestFunc()
Copy link
Member

Choose a reason for hiding this comment

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

Should this be def TestFunc()?

endfunc

" Test for long gerneric type name {{{1
func Test_function_long_generic_name()
Copy link
Member

Choose a reason for hiding this comment

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

Both of these functions should be def functions?

Copy link
Member Author

Choose a reason for hiding this comment

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

shouldn't really matter, no?

Copy link
Member

Choose a reason for hiding this comment

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

To detect this buffer overflow condition, func or def definition shouldn't really matter.

@chrisbra chrisbra closed this in f9bed02 Mar 17, 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.

2 participants